[RFC] Probing ttys by default

Bjørn Mork bjorn at mork.no
Fri Mar 21 06:36:11 PDT 2014

Sven Köhler <sven.koehler at gmail.com> writes:

> The value of ATTR{bmCapabilities} you find below may be from the CDC ACM
> descriptor instead of the CDC Call Management descriptor.
> At least for my UMTS card that is true, and I see a value of 7 instead
> of 3. My best guess is, that udev doesn't handle it very well if there
> are two fields of the same name in different descriptors of the same device.

Ah, you're right.  Thanks for clearing that up.  Then it's not going to
be that simple to write a rule processing the CDC Call Management 

This doesn't really have much to do with udev.  It's the driver that
parses the descriptors and export some functional descriptor fields as
sysfs attributes.

The code making this appear in sysfs/udev is:

static ssize_t show_caps
(struct device *dev, struct device_attribute *attr, char *buf)
	struct usb_interface *intf = to_usb_interface(dev);
	struct acm *acm = usb_get_intfdata(intf);

	return sprintf(buf, "%d", acm->ctrl_caps);
static DEVICE_ATTR(bmCapabilities, S_IRUGO, show_caps, NULL);

			ac_management_function = buffer[3];
			call_management_function = buffer[3];
			call_interface_num = buffer[4];
			if ((quirks & NOT_A_MODEM) == 0 && (call_management_function & 3) != 3)
				dev_err(&intf->dev, "This device cannot do calls on its own. It is not a modem.\n");

	acm->ctrl_caps = ac_management_function;
	if (quirks & NO_CAP_LINE)
		acm->ctrl_caps &= ~USB_CDC_CAP_LINE;

So the driver parse and use USB_CDC_CALL_MANAGEMENT_TYPE descriptor, but
it doesn't export any of it.  If MM or other userspace tools want to
inspect it, then the only option is to parse it again out of either the
"descriptors" sysfs field or the /dev/bus/usb character device.


More information about the ModemManager-devel mailing list