On Sat, Oct 4, 2014 at 12:02 AM, Oliver Neukum <[email protected]> wrote:
>
> I suggest you take an usbmon trace to look for the CDC notification.
>
Hi again, took a while to respond because I have been away on a trip.
I am new at sniffing USB traffic, so forgive me if the below info is
inadequate. I reset the 4G modem with AT+CFUN=4 followed by AT+CFUN=6.
The modem is on bus 3, device id 10, and after reset the new device Id
is 11. Below is a text dump (exported from wireshark) of the first few
USB packets seen when the device pops up after reset (takes ~10
seconds from AT+CFUN=6 is issued).
Two additional things to note:
1. When I do the command that freezes the cdc-wdm control line for
several minutes (AT+CGACT=1,1), I do not see the AT command in the USB
dump as I do with other AT commands like AT+CFUN.
2. In the kernel logs I can see an error message (not caused by
AT+CGACT) that emanates from linux/drivers/usb/class/cdc-wdm.c:
Oct 7 13:43:36 hilbert kernel: [13872.317954] huawei_cdc_ncm 3-3:1.2:
unknown notification 3 received: index 2 len 4
Excerpt from when device pops up after reset with AT+CFUN:
No. Time Source Destination
Protocol Length Info
2995 53.388617000 host 11.0 USB
64 GET DESCRIPTOR Request DEVICE
Frame 2995: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
on interface 0
Interface id: 0
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Oct 7, 2014 11:52:44.223130000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1412675564.223130000 seconds
[Time delta from previous captured frame: 0.015917000 seconds]
[Time delta from previous displayed frame: 0.015917000 seconds]
[Time since reference or first frame: 53.388617000 seconds]
Frame Number: 2995
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: 0xffff8800c7aa2b40
URB type: URB_SUBMIT ('S')
URB transfer type: URB_CONTROL (0x02)
Endpoint: 0x80, Direction: IN
1... .... = Direction: IN (1)
.000 0000 = Endpoint value: 0
Device: 11
URB bus id: 3
Device setup request: relevant (0)
Data: not present ('<')
URB sec: 1412675564
URB usec: 223130
URB status: Operation now in progress (-EINPROGRESS) (-115)
URB length [bytes]: 18
Data length [bytes]: 0
[Response in: 2996]
URB setup
bmRequestType: 0x80
1... .... = Direction: Device-to-host
.00. .... = Type: Standard (0x00)
...0 0000 = Recipient: Device (0x00)
bRequest: GET DESCRIPTOR (6)
Descriptor Index: 0x00
bDescriptorType: DEVICE (1)
Language Id: no language specified (0x0000)
wLength: 18
No. Time Source Destination
Protocol Length Info
2996 53.388789000 11.0 host USB
82 GET DESCRIPTOR Response DEVICE
Frame 2996: 82 bytes on wire (656 bits), 82 bytes captured (656 bits)
on interface 0
Interface id: 0
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Oct 7, 2014 11:52:44.223302000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1412675564.223302000 seconds
[Time delta from previous captured frame: 0.000172000 seconds]
[Time delta from previous displayed frame: 0.000172000 seconds]
[Time since reference or first frame: 53.388789000 seconds]
Frame Number: 2996
Frame Length: 82 bytes (656 bits)
Capture Length: 82 bytes (656 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: usb]
USB URB
URB id: 0xffff8800c7aa2b40
URB type: URB_COMPLETE ('C')
URB transfer type: URB_CONTROL (0x02)
Endpoint: 0x80, Direction: IN
1... .... = Direction: IN (1)
.000 0000 = Endpoint value: 0
Device: 11
URB bus id: 3
Device setup request: not relevant ('-')
Data: present (0)
URB sec: 1412675564
URB usec: 223302
URB status: Success (0)
URB length [bytes]: 18
Data length [bytes]: 18
[Request in: 2995]
[Time from request: 0.000172000 seconds]
[bInterfaceClass: Unknown (0xffff)]
DEVICE DESCRIPTOR
bLength: 18
bDescriptorType: DEVICE (1)
bcdUSB: 0x0200
bDeviceClass: Device (0x00)
bDeviceSubClass: 0
bDeviceProtocol: 0 (Use class code info from Interface Descriptors)
bMaxPacketSize0: 64
idVendor: Huawei Technologies Co., Ltd. (0x12d1)
idProduct: Modem/Networkcard (0x1506)
bcdDevice: 0x0102
iManufacturer: 3
iProduct: 2
iSerialNumber: 0
bNumConfigurations: 1
No. Time Source Destination
Protocol Length Info
2997 53.388816000 host 11.0 USB
64 GET DESCRIPTOR Request CONFIGURATION
Frame 2997: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
on interface 0
Interface id: 0
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Oct 7, 2014 11:52:44.223329000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1412675564.223329000 seconds
[Time delta from previous captured frame: 0.000027000 seconds]
[Time delta from previous displayed frame: 0.000027000 seconds]
[Time since reference or first frame: 53.388816000 seconds]
Frame Number: 2997
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: 0xffff8800c85923c0
URB type: URB_SUBMIT ('S')
URB transfer type: URB_CONTROL (0x02)
Endpoint: 0x80, Direction: IN
1... .... = Direction: IN (1)
.000 0000 = Endpoint value: 0
Device: 11
URB bus id: 3
Device setup request: relevant (0)
Data: not present ('<')
URB sec: 1412675564
URB usec: 223329
URB status: Operation now in progress (-EINPROGRESS) (-115)
URB length [bytes]: 9
Data length [bytes]: 0
[Response in: 2998]
URB setup
bmRequestType: 0x80
1... .... = Direction: Device-to-host
.00. .... = Type: Standard (0x00)
...0 0000 = Recipient: Device (0x00)
bRequest: GET DESCRIPTOR (6)
Descriptor Index: 0x00
bDescriptorType: CONFIGURATION (2)
Language Id: no language specified (0x0000)
wLength: 9
No. Time Source Destination
Protocol Length Info
2998 53.388967000 11.0 host USB
73 GET DESCRIPTOR Response CONFIGURATION
Frame 2998: 73 bytes on wire (584 bits), 73 bytes captured (584 bits)
on interface 0
Interface id: 0
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Oct 7, 2014 11:52:44.223480000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1412675564.223480000 seconds
[Time delta from previous captured frame: 0.000151000 seconds]
[Time delta from previous displayed frame: 0.000151000 seconds]
[Time since reference or first frame: 53.388967000 seconds]
Frame Number: 2998
Frame Length: 73 bytes (584 bits)
Capture Length: 73 bytes (584 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: usb]
USB URB
URB id: 0xffff8800c85923c0
URB type: URB_COMPLETE ('C')
URB transfer type: URB_CONTROL (0x02)
Endpoint: 0x80, Direction: IN
1... .... = Direction: IN (1)
.000 0000 = Endpoint value: 0
Device: 11
URB bus id: 3
Device setup request: not relevant ('-')
Data: present (0)
URB sec: 1412675564
URB usec: 223480
URB status: Success (0)
URB length [bytes]: 9
Data length [bytes]: 9
[Request in: 2997]
[Time from request: 0.000151000 seconds]
[bInterfaceClass: Unknown (0xffff)]
CONFIGURATION DESCRIPTOR
bLength: 9
bDescriptorType: CONFIGURATION (2)
wTotalLength: 223
bNumInterfaces: 5
bConfigurationValue: 1
iConfiguration: 4
Configuration bmAttributes: 0x80 NOT SELF-POWERED NO REMOTE-WAKEUP
1... .... = Must be 1: Must be 1 for USB 1.1 and higher
.0.. .... = Self-Powered: This device is powered from the USB bus
..0. .... = Remote Wakeup: This device does NOT support remote wakeup
bMaxPower: 250 (500mA)
No. Time Source Destination
Protocol Length Info
2999 53.388999000 host 11.0 USB
64 GET DESCRIPTOR Request CONFIGURATION
Frame 2999: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
on interface 0
Interface id: 0
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Oct 7, 2014 11:52:44.223512000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1412675564.223512000 seconds
[Time delta from previous captured frame: 0.000032000 seconds]
[Time delta from previous displayed frame: 0.000032000 seconds]
[Time since reference or first frame: 53.388999000 seconds]
Frame Number: 2999
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: 0xffff8800c85923c0
URB type: URB_SUBMIT ('S')
URB transfer type: URB_CONTROL (0x02)
Endpoint: 0x80, Direction: IN
1... .... = Direction: IN (1)
.000 0000 = Endpoint value: 0
Device: 11
URB bus id: 3
Device setup request: relevant (0)
Data: not present ('<')
URB sec: 1412675564
URB usec: 223512
URB status: Operation now in progress (-EINPROGRESS) (-115)
URB length [bytes]: 223
Data length [bytes]: 0
[Response in: 3000]
URB setup
bmRequestType: 0x80
1... .... = Direction: Device-to-host
.00. .... = Type: Standard (0x00)
...0 0000 = Recipient: Device (0x00)
bRequest: GET DESCRIPTOR (6)
Descriptor Index: 0x00
bDescriptorType: CONFIGURATION (2)
Language Id: no language specified (0x0000)
wLength: 223
No. Time Source Destination
Protocol Length Info
3000 53.389172000 11.0 host USB
287 GET DESCRIPTOR Response CONFIGURATION
Frame 3000: 287 bytes on wire (2296 bits), 287 bytes captured (2296
bits) on interface 0
Interface id: 0
Encapsulation type: USB packets with Linux header and padding (115)
Arrival Time: Oct 7, 2014 11:52:44.223685000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1412675564.223685000 seconds
[Time delta from previous captured frame: 0.000173000 seconds]
[Time delta from previous displayed frame: 0.000173000 seconds]
[Time since reference or first frame: 53.389172000 seconds]
Frame Number: 3000
Frame Length: 287 bytes (2296 bits)
Capture Length: 287 bytes (2296 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: usb]
USB URB
URB id: 0xffff8800c85923c0
URB type: URB_COMPLETE ('C')
URB transfer type: URB_CONTROL (0x02)
Endpoint: 0x80, Direction: IN
1... .... = Direction: IN (1)
.000 0000 = Endpoint value: 0
Device: 11
URB bus id: 3
Device setup request: not relevant ('-')
Data: present (0)
URB sec: 1412675564
URB usec: 223685
URB status: Success (0)
URB length [bytes]: 223
Data length [bytes]: 223
[Request in: 2999]
[Time from request: 0.000173000 seconds]
[bInterfaceClass: Unknown (0xffff)]
CONFIGURATION DESCRIPTOR
bLength: 9
bDescriptorType: CONFIGURATION (2)
wTotalLength: 223
bNumInterfaces: 5
bConfigurationValue: 1
iConfiguration: 4
Configuration bmAttributes: 0x80 NOT SELF-POWERED NO REMOTE-WAKEUP
1... .... = Must be 1: Must be 1 for USB 1.1 and higher
.0.. .... = Self-Powered: This device is powered from the USB bus
..0. .... = Remote Wakeup: This device does NOT support remote wakeup
bMaxPower: 250 (500mA)
INTERFACE DESCRIPTOR (0.0): class Vendor Specific
bLength: 9
bDescriptorType: INTERFACE (4)
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 3
bInterfaceClass: Vendor Specific (0xff)
bInterfaceSubClass: 0x02
bInterfaceProtocol: 0x10
iInterface: 0
UNKNOWN DESCRIPTOR
bLength: 5
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 4
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 5
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 6
bDescriptorType: Unknown (36)
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x81 IN Endpoint:1
1... .... = Direction: IN Endpoint
.... 0001 = Endpoint Number: 0x01
bmAttributes: 0x03
.... ..11 = Transfertype: Interrupt-Transfer (0x03)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 64
...0 0... .... .... = Transactions per microframe: 1 (0)
.... ..00 0100 0000 = Maximum Packet Size: 64
bInterval: 5
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x82 IN Endpoint:2
1... .... = Direction: IN Endpoint
.... 0010 = Endpoint Number: 0x02
bmAttributes: 0x02
.... ..10 = Transfertype: Bulk-Transfer (0x02)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 512
.... ..10 0000 0000 = Maximum Packet Size: 512
bInterval: 32
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x01 OUT Endpoint:1
0... .... = Direction: OUT Endpoint
.... 0001 = Endpoint Number: 0x01
bmAttributes: 0x02
.... ..10 = Transfertype: Bulk-Transfer (0x02)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 512
.... ..10 0000 0000 = Maximum Packet Size: 512
bInterval: 32
INTERFACE DESCRIPTOR (1.0): class Vendor Specific
bLength: 9
bDescriptorType: INTERFACE (4)
bInterfaceNumber: 1
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: Vendor Specific (0xff)
bInterfaceSubClass: 0x02
bInterfaceProtocol: 0x12
iInterface: 0
UNKNOWN DESCRIPTOR
bLength: 5
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 4
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 5
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 6
bDescriptorType: Unknown (36)
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x83 IN Endpoint:3
1... .... = Direction: IN Endpoint
.... 0011 = Endpoint Number: 0x03
bmAttributes: 0x02
.... ..10 = Transfertype: Bulk-Transfer (0x02)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 512
.... ..10 0000 0000 = Maximum Packet Size: 512
bInterval: 32
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x02 OUT Endpoint:2
0... .... = Direction: OUT Endpoint
.... 0010 = Endpoint Number: 0x02
bmAttributes: 0x02
.... ..10 = Transfertype: Bulk-Transfer (0x02)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 512
.... ..10 0000 0000 = Maximum Packet Size: 512
bInterval: 32
INTERFACE DESCRIPTOR (2.0): class Vendor Specific
bLength: 9
bDescriptorType: INTERFACE (4)
bInterfaceNumber: 2
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: Vendor Specific (0xff)
bInterfaceSubClass: 0x02
bInterfaceProtocol: 0x16
iInterface: 0
UNKNOWN DESCRIPTOR
bLength: 5
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 6
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 13
bDescriptorType: Unknown (36)
UNKNOWN DESCRIPTOR
bLength: 5
bDescriptorType: Unknown (36)
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x84 IN Endpoint:4
1... .... = Direction: IN Endpoint
.... 0100 = Endpoint Number: 0x04
bmAttributes: 0x03
.... ..11 = Transfertype: Interrupt-Transfer (0x03)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 64
...0 0... .... .... = Transactions per microframe: 1 (0)
.... ..00 0100 0000 = Maximum Packet Size: 64
bInterval: 5
INTERFACE DESCRIPTOR (2.1): class Vendor Specific
bLength: 9
bDescriptorType: INTERFACE (4)
bInterfaceNumber: 2
bAlternateSetting: 1
bNumEndpoints: 3
bInterfaceClass: Vendor Specific (0xff)
bInterfaceSubClass: 0x02
bInterfaceProtocol: 0x16
iInterface: 0
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x84 IN Endpoint:4
1... .... = Direction: IN Endpoint
.... 0100 = Endpoint Number: 0x04
bmAttributes: 0x03
.... ..11 = Transfertype: Interrupt-Transfer (0x03)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 64
...0 0... .... .... = Transactions per microframe: 1 (0)
.... ..00 0100 0000 = Maximum Packet Size: 64
bInterval: 5
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x85 IN Endpoint:5
1... .... = Direction: IN Endpoint
.... 0101 = Endpoint Number: 0x05
bmAttributes: 0x02
.... ..10 = Transfertype: Bulk-Transfer (0x02)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 512
.... ..10 0000 0000 = Maximum Packet Size: 512
bInterval: 32
ENDPOINT DESCRIPTOR
bLength: 7
bDescriptorType: ENDPOINT (5)
bEndpointAddress: 0x03 OUT Endpoint:3
0... .... = Direction: OUT Endpoint
.... 0011 = Endpoint Number: 0x03
bmAttributes: 0x02
.... ..10 = Transfertype: Bulk-Transfer (0x02)
.... 00.. = Synchronisationtype: No Sync (0x00)
..00 .... = Behaviourtype: Data-Endpoint (0x00)
wMaxPacketSize: 512
.... ..10 0000 0000 = Maximum Packet Size: 512
bInterval: 32
On Sat, Oct 4, 2014 at 12:02 AM, Oliver Neukum <[email protected]> wrote:
> On Fri, 2014-10-03 at 10:01 +0200, Erik Alapää wrote:
>> Workaround: Bring up the device with
>> AT^NDISDUP=1,1,"internet.telenor.se" instead. Also worth noting is
>> that AT+CGACT=1,1 does not freeze the control connection if using
>> /dev/ttyUSB0.
>>
>> If more info is needed, let me know and I will provide it.
>
> I suggest you take an usbmon trace to look for the CDC notification.
>
> Regards
> Oliver
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html