libqmi / Quectel EC21/EC25

Sebastian Sjoholm sebastian.sjoholm at gmail.com
Wed Sep 21 03:11:09 UTC 2016


> 
> Anyway, looking at usbmon dumps is a start.  It will probably only
> confirm what you already see: The driver sends a request and gets no
> reply.  But confirming it is usefull, since it eliminates other more unlikely
> errors.  See https://www.kernel.org/doc/Documentation/usb/usbmon.txt for
> instructions.  Note that libpcap also can be built with usbmon support,
> enabling USB captures in wireshark/tshark/tcpdump.  Much easier to use
> wireshark dissectors than trying to make sense of of the hex dumps
> yourself :)
> 

Here is trace from USB;

Short version:

Capturing on 'usbmon0'
  1   0.000000         host -> 3.9          USB 64 URB_INTERRUPT in
  2   0.005008         host -> 3.0          USB 80 URB_CONTROL out
  3   0.006981          3.0 -> host         USB 64 URB_CONTROL out
  4  10.278242          3.9 -> host         USB 64 URB_INTERRUPT in
^C4 packets captured

Long version:

Capturing on 'usbmon0'
Frame 1: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
    Interface id: 0 (usbmon0)
    Encapsulation type: USB packets with Linux header and padding (115)
    Arrival Time: Sep 21, 2016 04:59:46.349081000 CEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1474426786.349081000 seconds
    [Time delta from previous captured frame: 0.000000000 seconds]
    [Time delta from previous displayed frame: 0.000000000 seconds]
    [Time since reference or first frame: 0.000000000 seconds]
    Frame Number: 1
    Frame Length: 64 bytes (512 bits)
    Capture Length: 64 bytes (512 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: usb]
USB URB
    URB id: 0x000000008c09b600
    URB type: URB_SUBMIT ('S')
    URB transfer type: URB_INTERRUPT (0x01)
    Endpoint: 0x89, Direction: IN
        1... .... = Direction: IN (1)
        .000 1001 = Endpoint value: 9
    Device: 3
    URB bus id: 2
    Device setup request: not relevant ('-')
    Data: not present ('<')
    URB sec: 1474426786
    URB usec: 349081
    URB status: Operation now in progress (-EINPROGRESS) (-115)
    URB length [bytes]: 8
    Data length [bytes]: 0
    [bInterfaceClass: Unknown (0xffff)]
    Unused Setup Header
    Interval: 256
    Start frame: 0
    Copy of Transfer Flags: 0x00000200
    Number of ISO descriptors: 0

Frame 2: 80 bytes on wire (640 bits), 80 bytes captured (640 bits) on interface 0
    Interface id: 0 (usbmon0)
    Encapsulation type: USB packets with Linux header and padding (115)
    Arrival Time: Sep 21, 2016 04:59:46.354025000 CEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1474426786.354025000 seconds
    [Time delta from previous captured frame: 0.004944000 seconds]
    [Time delta from previous displayed frame: 0.004944000 seconds]
    [Time since reference or first frame: 0.004944000 seconds]
    Frame Number: 2
    Frame Length: 80 bytes (640 bits)
    Capture Length: 80 bytes (640 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: usb]
USB URB
    URB id: 0x000000008c09b800
    URB type: URB_SUBMIT ('S')
    URB transfer type: URB_CONTROL (0x02)
    Endpoint: 0x00, Direction: OUT
        0... .... = Direction: OUT (0)
        .000 0000 = Endpoint value: 0
    Device: 3
    URB bus id: 2
    Device setup request: relevant (0)
    Data: present (0)
    URB sec: 1474426786
    URB usec: 354025
    URB status: Operation now in progress (-EINPROGRESS) (-115)
    URB length [bytes]: 16
    Data length [bytes]: 16
    Interval: 0
    Start frame: 0
    Copy of Transfer Flags: 0x00000000
    Number of ISO descriptors: 0
    [bInterfaceClass: Unknown (0xffff)]
    [bInterfaceClass: Unknown (0xffff)]
URB setup
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x01)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: 0
    wValue: 0x0000
    wIndex: 4
    wLength: 16
    Data Fragment: 010f0000000000012200040001010003
Leftover Capture Data: 010f0000000000012200040001010003

Frame 3: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
    Interface id: 0 (usbmon0)
    Encapsulation type: USB packets with Linux header and padding (115)
    Arrival Time: Sep 21, 2016 04:59:46.356073000 CEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1474426786.356073000 seconds
    [Time delta from previous captured frame: 0.002048000 seconds]
    [Time delta from previous displayed frame: 0.002048000 seconds]
    [Time since reference or first frame: 0.006992000 seconds]
    Frame Number: 3
    Frame Length: 64 bytes (512 bits)
    Capture Length: 64 bytes (512 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: usb]
USB URB
    URB id: 0x000000008c09b800
    URB type: URB_COMPLETE ('C')
    URB transfer type: URB_CONTROL (0x02)
    Endpoint: 0x00, Direction: OUT
        0... .... = Direction: OUT (0)
        .000 0000 = Endpoint value: 0
    Device: 3
    URB bus id: 2
    Device setup request: not relevant ('-')
    Data: not present ('>')
    URB sec: 1474426786
    URB usec: 356073
    URB status: Success (0)
    URB length [bytes]: 16
    Data length [bytes]: 0
    [Request in: 2]
    [Time from request: 0.002048000 seconds]
    Unused Setup Header
    Interval: 0
    Start frame: 0
    Copy of Transfer Flags: 0x00000000
    Number of ISO descriptors: 0

Frame 4: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
    Interface id: 0 (usbmon0)
    Encapsulation type: USB packets with Linux header and padding (115)
    Arrival Time: Sep 21, 2016 04:59:56.454311000 CEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1474426796.454311000 seconds
    [Time delta from previous captured frame: 10.098238000 seconds]
    [Time delta from previous displayed frame: 10.098238000 seconds]
    [Time since reference or first frame: 10.105230000 seconds]
    Frame Number: 4
    Frame Length: 64 bytes (512 bits)
    Capture Length: 64 bytes (512 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: usb]
USB URB
    URB id: 0x000000008c09b600
    URB type: URB_COMPLETE ('C')
    URB transfer type: URB_INTERRUPT (0x01)
    Endpoint: 0x89, Direction: IN
        1... .... = Direction: IN (1)
        .000 1001 = Endpoint value: 9
    Device: 3
    URB bus id: 2
    Device setup request: not relevant ('-')
    Data: present (0)
    URB sec: 1474426796
    URB usec: 454311
    URB status: No such file or directory (-ENOENT) (-2)
    URB length [bytes]: 0
    Data length [bytes]: 0
    [Request in: 1]
    [Time from request: 10.105230000 seconds]
    [bInterfaceClass: Unknown (0xffff)]
    Unused Setup Header
    Interval: 256
    Start frame: 0
    Copy of Transfer Flags: 0x00000200
    Number of ISO descriptors: 0

^C4 packets captured


> Have you tried to follow the Quectel instructions and see if that makes
> it work?  Using GobiNet is probably easiest.  If it works, then

I have followed the qmi_wwan section, but they have used much earlier qmi_wwan as reference, the raw-ip section they have included I did not add as the raw-ip support should already be included.

> a comparison of a short probe + one request with the same from qmi_wwan
> should provide some answers.
> 

I will see if I can get the GobiNet to work.

>> error: couldn't create client for the 'nas' service: CID allocation failed
>> in the CTL client: Transaction timed out
> 
> 
> The only thing I can think of is that these modems might need the same
> DTR toggling as the MC7455 etc. If so, then my simple assumption that we
> could automatically apply this based on USB3 support could be failing.
> 
> These modems are based on relatively new Qualcomm chips, but without
> USB3 support, is that correct?
> 

Yes, no USB 3.0 support. The Chipset seems to be 9x07 based.

> Look for the
> 
> 	if (le16_to_cpu(dev->udev->descriptor.bcdUSB) >= 0x0201) {
> 		qmi_wwan_manage_power(dev, 1);
> 		qmi_wwan_change_dtr(dev, true);
> 	}
> 
> part and enable that unconditionally.  Does that make a difference?
> 

I added this to be active unconditionally, but it did not make any difference.

-Sebastian



More information about the libqmi-devel mailing list