qmi_wwan fails with error -22

Muri Nicanor muri+libqmi at immerda.ch
Mon Nov 2 12:07:01 PST 2015


hi,

i've now upgraded my firmware to 12.500.00.15.1803 Rev.A.

if i use this udev rule:
> SUBSYSTEM=="usb", ATTR{idVendor}=="03f0", ATTR{idProduct}=="581d",
> ATTR{bNumConfigurations}=="3", ATTR{bConfigurationValue}!="1"
> ATTR{bConfigurationValue}="1"

with the kernel patches provided, i get:

> dmesg -t |egrep "usb 2-6|wwan|serial"
usb 2-6: new high-speed USB device number 5 using xhci_hcd
usb 2-6: New USB device found, idVendor=03f0, idProduct=581d
usb 2-6: New USB device strings: Mfr=2, Product=3, SerialNumber=4
usb 2-6: Product: HP lt4112 Gobi 4G Module
usb 2-6: Manufacturer: Hewlett-Packard
usb 2-6: SerialNumber: 0123456789ABCD12
usbcore: registered new interface driver qmi_wwan
qmi_wwan 2-6:1.3: cdc-wdm0: USB WDM device
qmi_wwan 2-6:1.3 wwan0: register 'qmi_wwan' at usb-0000:00:14.0-6,
WWAN/QMI device, ea:03:eb:19:xx:xx
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver qcserial
usbserial: USB Serial support registered for Qualcomm USB modem
qcserial 2-6:1.0: Qualcomm USB modem converter detected
usb 2-6: Qualcomm USB modem converter now attached to ttyUSB0
qcserial 2-6:1.1: Qualcomm USB modem converter detected
usb 2-6: Qualcomm USB modem converter now attached to ttyUSB1
qcserial 2-6:1.2: Qualcomm USB modem converter detected
usb 2-6: Qualcomm USB modem converter now attached to ttyUSB2
qcserial 2-6:1.4: Qualcomm USB modem converter detected
usb 2-6: Qualcomm USB modem converter now attached to ttyUSB3

if qcserial is loaded, modemmanager/networkmanager always try to connect
via ppp. if i blacklist qcserial, modemmanager doesn't recognice the modem:

> Nov  2 20:38:14 tekla ModemManager[3760]: <info>  Creating modem with
> plugin 'Generic' and '2' ports
> Nov  2 20:38:14 tekla ModemManager[3760]: <warn>  Could not grab port
> (usbmisc/cdc-wdm0): 'Cannot add port 'usbmisc/cdc-wdm0', unsupported'
> Nov  2 20:38:14 tekla ModemManager[3760]: <warn>  Couldn't create
> modem
> for device at '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-6': Failed
> to find primary AT port

but qmicli also doesn't work:
sudo qmicli -d /dev/cdc-wdm0 --dms-get-ids -v
                                                           1 ↵
[02 Nov 2015, 20:41:22] [Debug] [/dev/cdc-wdm0] Opening device with
flags 'none'...
[02 Nov 2015, 20:41:22] [Debug] QMI Device at '/dev/cdc-wdm0' ready
[02 Nov 2015, 20:41:22] [Debug] [/dev/cdc-wdm0] Assuming service 'dms'
is supported...
[02 Nov 2015, 20:41:22] [Debug] [/dev/cdc-wdm0] Allocating new client ID...
[02 Nov 2015, 20:41:22] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<<   length = 16
<<<<<<   data   = 01:0F:00:00:00:00:00:01:22:00:04:00:01:01:00:02

[02 Nov 2015, 20:41:22] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< QMUX:
<<<<<<   length  = 15
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 4
<<<<<<   message     = "Allocate CID" (0x0022)
<<<<<< TLV:
<<<<<<   type       = "Service" (0x01)
<<<<<<   length     = 1
<<<<<<   value      = 02
<<<<<<   translated = dms
error: couldn't create client for the 'dms' service: CID allocation
failed in the CTL client: Transaction timed out

if i use this udev rule:

> SUBSYSTEM=="usb", ATTR{idVendor}=="03f0", ATTR{idProduct}=="581d",
> ATTR{bNumConfigurations}=="3", ATTR{bConfigurationValue}!="3"
> ATTR{bConfigurationValue}="3"

with the kernel patches provided, i get:
> dmesg -t |egrep "usb 2-6|wwan|serial"
usb 2-6: new high-speed USB device number 5 using xhci_hcd
usb 2-6: New USB device found, idVendor=03f0, idProduct=581d
usb 2-6: New USB device strings: Mfr=2, Product=3, SerialNumber=4
usb 2-6: Product: HP lt4112 Gobi 4G Module
usb 2-6: Manufacturer: Hewlett-Packard
usb 2-6: SerialNumber: 0123456712ABCA17
usbcore: registered new interface driver qmi_wwan
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver qcserial
usbserial: USB Serial support registered for Qualcomm USB modem
cdc_mbim 2-6:3.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-6, CDC
MBIM, d2:ca:56:01:52:2c
qcserial 2-6:3.2: Qualcomm USB modem converter detected
usb 2-6: Qualcomm USB modem converter now attached to ttyUSB0

ModemManager says:
Nov  2 20:48:22 tekla ModemManager[2991]: [/dev/cdc-wdm0] Read max
control message size from descriptors file: 4096
Nov  2 20:48:22 tekla kernel: [  316.177548] cdc_mbim 2-6:3.0: nonzero
urb status received: -EPIPE
Nov  2 20:48:24 tekla ModemManager[2991]: <info>  Couldn't find support
for device at '/sys/devices/pci0000:00/0000:00:19.0': not supported by
any plugin
Nov  2 20:48:24 tekla ModemManager[2991]: <info>  Couldn't find support
for device at '/sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0': not
supported by any plugin
Nov  2 20:48:52 tekla ModemManager[2991]: proxy configuration failed: closed
Nov  2 20:48:52 tekla ModemManager[2991]: <info>  Creating modem with
plugin 'Generic' and '2' ports
Nov  2 20:48:52 tekla ModemManager[2991]: <warn>  Could not grab port
(usbmisc/cdc-wdm0): 'Cannot add port 'usbmisc/cdc-wdm0', unsupported'
Nov  2 20:48:52 tekla ModemManager[2991]: <warn>  Couldn't create modem
for device at '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-6': Failed to
find primary AT port

and mbimcli says:
> sudo mbimcli -d /dev/cdc-wdm0 --query-radio-state
> error: couldn't open the MbimDevice: Transaction timed out

if i understand correctly, i should be able to start mbimcli or qmicli
(or mbim-network or qmi-network) and then be able to dhcp on wwan0?

cheers,
muri

On 11/01/2015 01:13 AM, Bjørn Mork wrote:
> Martin Hauke <mardnh at gmx.de> writes:
> 
>> On 30.10.2015 21:26, Bjørn Mork wrote:
>>> I'm attaching a proposed fix for qcserial, in case you feel up to some
>>> driver patching.  It's not dangerous :)
>>>
>>> It would be great to have this tested on more than one lt4112.  I'll
>>> leave it here for a while for comments, and hopefully some testing,
>>> before I send it to the usb serial maintainer for review.
>>>
>>> Any comments are appreciated.  Even those questioning my sanity :)
>>
>>
>> Your patches are working fine with the lt4112 (Firmware revision:
>> 11.234.45.01.00) from my HP Z-Book 14.
>>
>> # dmesg -t |egrep "usb 2-6|wwan|serial"
>> --------------------------------------------------------------------
>> usb 2-6: new high-speed USB device number 4 using xhci_hcd
>> usb 2-6: New USB device found, idVendor=03f0, idProduct=581d
>> usb 2-6: New USB device strings: Mfr=2, Product=3, SerialNumber=4
>> usb 2-6: Product: HP lt4112 Gobi 4G Module
>> usb 2-6: Manufacturer: Hewlett-Packard
>> usb 2-6: SerialNumber: 0123456789ABCDEF
>> usbcore: registered new interface driver usbserial
>> usbcore: registered new interface driver usbserial_generic
>> usbserial: USB Serial support registered for generic
>> qmi_wwan 2-6:1.4: cdc-wdm0: USB WDM device
>> qmi_wwan 2-6:1.4 wwan0: register 'qmi_wwan' at usb-0000:00:14.0-6,
>> WWAN/QMI device, a2:cb:29:2f:xx:xx
>> usbcore: registered new interface driver qmi_wwan
>> usbcore: registered new interface driver qcserial
>> usbserial: USB Serial support registered for Qualcomm USB modem
>> usb 2-6: Num Interfaces = 6
>> usb 2-6: This Interface = 0
>> usb 2-6: Huawei type serial port found (ff/01/02)
>> qcserial 2-6:1.0: Qualcomm USB modem converter detected
>> usb 2-6: Qualcomm USB modem converter now attached to ttyUSB0
>> usb 2-6: Num Interfaces = 6
>> usb 2-6: This Interface = 1
>> usb 2-6: Huawei type serial port found (ff/01/03)
>> qcserial 2-6:1.1: Qualcomm USB modem converter detected
>> usb 2-6: Qualcomm USB modem converter now attached to ttyUSB1
>> usb 2-6: Num Interfaces = 6
>> usb 2-6: This Interface = 2
>> usb 2-6: Huawei type serial port found (ff/01/01)
>> qcserial 2-6:1.2: Qualcomm USB modem converter detected
>> usb 2-6: Qualcomm USB modem converter now attached to ttyUSB2
>> usb 2-6: Num Interfaces = 6
>> usb 2-6: This Interface = 5
>> usb 2-6: Huawei type serial port found (ff/01/05)
>> qcserial 2-6:1.5: Qualcomm USB modem converter detected
>> usb 2-6: Qualcomm USB modem converter now attached to ttyUSB3
>> --------------------------------------------------------------------
>>
>> Before submitting my initial patch I tested 2 different laptop models
>> having those HP-branded Huawei ME906E devices (my HP Z-Book 14 and a HP
>> Envy 840 from a coworker). Those modems had firmware revision 11.x.
>> Both worked out of the box with my patch and as far as I have
>> seen at that time they had activated the same features/ports.
>>
>> Later it turned out that the layout is not static for those devices.
>> HP changed the modem layout completely with firmware version 12.x to
>> make it "Windows 8.1 ready".
>> Nowadays most (if not all) lt4112-equipped HP-systems are shipped with
>> firmware 12.x.
>>
>> I wanted to rewrite/fix this since some time but never got into it.
>> Bjørn, thanks a lot for stepping in here.
> 
> Thanks for testing both of you!  I'll submit these patches asap.  The
> qmi_wwan one should be fine.  Let's see what Johan and the other USB
> experts say about the qcserial one.
> 
> 
> Bjørn
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libqmi-devel
> 





More information about the libqmi-devel mailing list