Dear all, I have a problem with some modems that don't support USB <2.00 for the network interface. In this case, PPP must be used.
It is a modem-specific limitation, and maybe it should have a udev flag: MM_USE_PPP_OVER_USB1, or something more creative. The question is how to recognize the overall USB version . The udev USB version property for the device will be >=2.00, but along the way, either the root hub or an intermediate one, will bring the effective version down. The speed property is "cumulative": if a hub along the way is 12Mbps, then the final speed for the device is shown as 12Mbps: looking at device '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.4/3-2.4.3/3-2.4.3.2/3-2.4.3.2:1.0/tty/ttyACM4': KERNEL=="ttyACM4" SUBSYSTEM=="tty" DRIVER=="" looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.4/3-2.4.3/3-2.4.3.2/3-2.4.3.2:1.0': KERNELS=="3-2.4.3.2:1.0" SUBSYSTEMS=="usb" DRIVERS=="cdc_acm" ATTRS{authorized}=="1" ATTRS{bAlternateSetting}==" 0" ATTRS{bInterfaceClass}=="02" ATTRS{bInterfaceNumber}=="00" ATTRS{bInterfaceProtocol}=="01" ATTRS{bInterfaceSubClass}=="02" ATTRS{bNumEndpoints}=="01" ATTRS{bmCapabilities}=="2" ATTRS{iad_bFirstInterface}=="00" ATTRS{iad_bFunctionClass}=="02" ATTRS{iad_bFunctionProtocol}=="01" ATTRS{iad_bFunctionSubClass}=="02" ATTRS{iad_bInterfaceCount}=="02" ATTRS{interface}=="CDC Abstract Control Model (ACM)" ATTRS{supports_autosuspend}=="1" looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.4/3-2.4.3/3-2.4.3.2': KERNELS=="3-2.4.3.2" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{authorized}=="1" ATTRS{avoid_reset_quirk}=="0" ATTRS{bConfigurationValue}=="1" ATTRS{bDeviceClass}=="ef" ATTRS{bDeviceProtocol}=="01" ATTRS{bDeviceSubClass}=="02" ATTRS{bMaxPacketSize0}=="64" ATTRS{bMaxPower}=="500mA" ATTRS{bNumConfigurations}=="1" ATTRS{bNumInterfaces}=="12" ATTRS{bcdDevice}=="0318" ATTRS{bmAttributes}=="a0" ATTRS{busnum}=="3" ATTRS{configuration}=="" ATTRS{devnum}=="79" ATTRS{devpath}=="2.4.3.2" ATTRS{idProduct}=="0065" ATTRS{idVendor}=="1e2d" ATTRS{ltm_capable}=="no" ATTRS{manufacturer}=="Cinterion" ATTRS{maxchild}=="0" ATTRS{product}=="LTE Modem" ATTRS{quirks}=="0x0" ATTRS{removable}=="unknown" ATTRS{serial}=="8d8f52c8" ATTRS{speed}=="12" ATTRS{urbnum}=="463" ATTRS{version}==" 2.10" It is possible to cross the entire parent chain, and then get the minimum version. I don't have a root hub USB 1.x at hand, but I have found an old external USB hub 1.1, and connected this way: device - hub1.1 - hub2.0 - roothub2.0: name: ttyACM4, version: NULL, minversion: NULL name: ttyACM4, version: NULL, minversion: NULL name: ttyACM4, version: 2.10. minversion: 2.10 name: ttyACM4, version: 1.10. minversion: 1.10 name: ttyACM4, version: 2.00. minversion: 1.10 name: ttyACM4, version: 2.00. minversion: 1.10 name: ttyACM4, version: 2.00. minversion: 1.10 name: ttyACM4, version: NULL, minversion: 1.10 name: ttyACM4, version: NULL, minversion: 1.10 I have placed some code in mm-kernel-device-udev.c to obtain the chain above. The question is whether there is a better way to do this, possibly without touching the udev implementation. Or whether it is acceptable to read the speed property instead of rebuilding the effective usb version: is it ok to replace a variable for another here for all foreseeable cases? Thank you all in advance, Kind Regards, Giacinto
_______________________________________________ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel