Author Message

<  Setup Discussion  ~  ZTE ZM8620

PostPosted: Mon Jan 30, 2017 1:39 am Reply with quote
Posts: 3Joined: Fri Jan 27, 2017 9:15 pm
Hi All,

I'm new to the forum. I'll appreciate any help. I’m connecting a ZTE ZM8620 (4g/LTE) modem to a TV-Box. The driver is installed and usb_modeswitch recognizes the device but i don't see a serial device path to send the AT commands. I am not sure what is missing.


Code:
#./usb_modeswitch -v 19d2 -p 0396 -W         
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.2.0 (C) Josua Dietze 2014
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x19d2
DefaultProduct= 0x0396
NeedResponse=0

Look for default devices ...
  found USB ID 19d2:0396
   vendor ID matched
   product ID matched
  found USB ID 093a:2510
  found USB ID 1d6b:0002
  found USB ID 1d6b:0002
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 002 on bus 001
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
     Product: ZTE WCDMA Technologies MSM
  Serial No.: 0123456789ABCDEF
-------------------------
Warning: no switching method given. See documentation
-> Run lsusb to note any changes. Bye!


Code:
# cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
rfcomm               /dev/rfcomm   216 0-255 serial
g_serial             /dev/ttyGS    250 0-3 serial
usbserial            /dev/ttyUSB   188 0-253 serial
uart                 /dev/ttyS     252 0-3 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console


No ttyUSB*
Code:
# ls -l /dev/tty                                       
tty    tty14  tty20  tty27  tty33  tty4   tty46  tty52  tty59  tty8   ttyS0
tty0   tty15  tty21  tty28  tty34  tty40  tty47  tty53  tty6   tty9   ttyS1
tty1   tty16  tty22  tty29  tty35  tty41  tty48  tty54  tty60  ttyGS0
tty10  tty17  tty23  tty3   tty36  tty42  tty49  tty55  tty61  ttyGS1
tty11  tty18  tty24  tty30  tty37  tty43  tty5   tty56  tty62  ttyGS2
tty12  tty19  tty25  tty31  tty38  tty44  tty50  tty57  tty63  ttyGS3
tty13  tty2   tty26  tty32  tty39  tty45  tty51  tty58  tty7   ttyS


Thank you for your help
Attachments:
File comment: captured by USB-device-info
zte-MZ8620-dev.jpg
zte-MZ8620-dev.jpg [ 16.61 KiB | Viewed 1425 times ]

File comment: captured by USB-device-info
zte-MZ8620-sys.jpg
zte-MZ8620-sys.jpg [ 16.21 KiB | Viewed 1425 times ]

Offline Profile
PostPosted: Mon Jan 30, 2017 2:35 am Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
Paste the text output from lsusb -vd 19d2:0396 (no screenshots please).


Offline Profile
PostPosted: Mon Jan 30, 2017 8:38 pm Reply with quote
Posts: 3Joined: Fri Jan 27, 2017 9:15 pm
LOM wrote:
Paste the text output from lsusb -vd 19d2:0396 (no screenshots please).


Thank you for your response. Here is the command output:

Code:
# lsusb -vd 19d2:0396                                 

Bus 001 Device 002: ID 19d2:0396 ZTE WCDMA Technologies MSM
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x19d2 ZTE WCDMA Technologies MSM
  idProduct          0x0396
  bcdDevice           f0.16
  iManufacturer           1 ZTE,Incorporated
  iProduct                2 ZTE WCDMA Technologies MSM
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          183
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     66
      bInterfaceProtocol      1
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


Offline Profile
PostPosted: Mon Jan 30, 2017 10:54 pm Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
Since this is minipcie module then there isn't any install mode and consequently nothing for usb_modeswitch to handle, the card is always in usable mode.
ZTE has not reported it for inclusion in linux drivers so no drivers will bind by default, you'll have to take care of that manually by using the drivers new_id function.

The interface layout (and possible linux drivers):

MI_00 ZTE Mobile Broadband Diagnostics Port (serial driver, maybe qcserial, not needed)
MI_01 ZTE Mobile Broadband AT Port (option serial driver)
MI_02 ZTE Mobile Broadband Modem (option serial driver)
MI_03 ZTE Mobile Broadband NDIS Port (most likely qmi_wwan)
MI_04 ZTE Mobile Broadband ADB Port (Android debug driver, not needed)


Offline Profile
PostPosted: Tue Jan 31, 2017 8:34 am Reply with quote
Posts: 3Joined: Fri Jan 27, 2017 9:15 pm
@LOM

Thank you for the pointer. I managed to bind the modem to a serial bus with new_id. I can now send AT commands. This is great, thank you!


Offline Profile
PostPosted: Sun Feb 19, 2017 7:15 pm Reply with quote
Posts: 2Joined: Sun Feb 19, 2017 6:46 pm
Hopefully, extending this post instead of starting a new one isn't taboo.

I have precisely the same hardware, and my usb_modeswitch and lsusb outputs look nearly identical:

Code:
root@mirabox-debian:~# usb_modeswitch -v 19d2 -p 0396 -W
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.2.0 (C) Josua Dietze 2014
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x19d2
DefaultProduct= 0x0396
NeedResponse=0

Look for default devices ...
  found USB ID 1d6b:0003
  found USB ID 19d2:0396
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 0bda:b720
  found USB ID 1a40:0101
  found USB ID 1d6b:0002
  found USB ID 05e3:0723
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 002 on bus 003
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
     Product: ZTE WCDMA Technologies MSM
  Serial No.: 0123456789ABCDEF
-------------------------
Warning: no switching method given. See documentation
-> Run lsusb to note any changes. Bye!


Code:
root@mirabox-debian:~# cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
usbserial            /dev/ttyUSB   188 0-511 serial
acm                  /dev/ttyACM   166 0-255 serial
serial               /dev/ttyS       4 64-67 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
pty_slave            /dev/ttyp       3 0-255 pty:slave
pty_master           /dev/pty        2 0-255 pty:master
unknown              /dev/tty        4 1-63 console


Code:
root@mirabox-debian:~# lsusb -vd 19d2:0396

Bus 003 Device 002: ID 19d2:0396 ZTE WCDMA Technologies MSM
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x19d2 ZTE WCDMA Technologies MSM
  idProduct          0x0396
  bcdDevice           f0.16
  iManufacturer           1 ZTE,Incorporated
  iProduct                2 ZTE WCDMA Technologies MSM
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          183
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     66
      bInterfaceProtocol      1
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


my usb device tree looks just like you'd expect:
Code:
root@mirabox-debian:~# tree /sys/bus/usb/devices/
/sys/bus/usb/devices/
├── 1-0:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-0:1.0
├── 1-1 -> ../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-1
├── 1-1:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-1/1-1:1.0
├── 2-0:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-0:1.0
├── 2-1 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1
├── 2-1:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1:1.0
├── 2-1.2 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2
├── 2-1.2:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2/2-1.2:1.0
├── 2-1.2:1.1 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2/2-1.2:1.1
├── 2-1.2:1.2 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2/2-1.2:1.2
├── 3-0:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-0:1.0
├── 3-1 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1
├── 3-1:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.0
├── 3-1:1.1 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.1
├── 3-1:1.2 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.2
├── 3-1:1.3 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.3
├── 3-1:1.4 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.4
├── 4-0:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb4/4-0:1.0
├── usb1 -> ../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1
├── usb2 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2
├── usb3 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3
└── usb4 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb4


It looks like my ZTE Modem is device 3 (it is a PCIe card in a USB->PCIe adapter board), and I would like to get access to the AT command prompt (for starters), so according to LOM's post above:
Quote:
The interface layout (and possible linux drivers):

MI_00 ZTE Mobile Broadband Diagnostics Port (serial driver, maybe qcserial, not needed)
MI_01 ZTE Mobile Broadband AT Port (option serial driver)
MI_02 ZTE Mobile Broadband Modem (option serial driver)
MI_03 ZTE Mobile Broadband NDIS Port (most likely qmi_wwan)
MI_04 ZTE Mobile Broadband ADB Port (Android debug driver, not needed)


I should be binding device 3-1:1.1 to a usbserial device. I have a plethora to choose from:
Code:
root@mirabox-debian:~# tree /sys/bus/usb/drivers
/sys/bus/usb/drivers
├── cdc_acm
│   ├── bind
│   ├── new_id
│   ├── remove_id
│   ├── uevent
│   └── unbind
├── cdc_wdm
│   ├── bind
│   ├── new_id
│   ├── remove_id
│   ├── uevent
│   └── unbind
├── hub
│   ├── 1-0:1.0 -> ../../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-0:1.0
│   ├── 2-0:1.0 -> ../../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-0:1.0
│   ├── 2-1:1.0 -> ../../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1:1.0
│   ├── 3-0:1.0 -> ../../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-0:1.0
│   ├── 4-0:1.0 -> ../../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb4/4-0:1.0
│   ├── bind
│   ├── module -> ../../../../module/usbcore
│   ├── new_id
│   ├── remove_id
│   ├── uevent
│   └── unbind
├── rtl8723bu
│   ├── 2-1.2:1.2 -> ../../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2/2-1.2:1.2
│   ├── bind
│   ├── module -> ../../../../module/8723bu
│   ├── new_id
│   ├── remove_id
│   ├── uevent
│   └── unbind
├── usb
│   ├── 1-1 -> ../../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-1
│   ├── 2-1 -> ../../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1
│   ├── 2-1.2 -> ../../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2
│   ├── 3-1 -> ../../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1
│   ├── bind
│   ├── uevent
│   ├── unbind
│   ├── usb1 -> ../../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1
│   ├── usb2 -> ../../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2
│   ├── usb3 -> ../../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3
│   └── usb4 -> ../../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb4
├── usbfs
│   ├── bind
│   ├── module -> ../../../../module/usbcore
│   ├── new_id
│   ├── remove_id
│   ├── uevent
│   └── unbind
├── usbhid
│   ├── bind
│   ├── module -> ../../../../module/usbhid
│   ├── new_id
│   ├── remove_id
│   ├── uevent
│   └── unbind
├── usbserial
│   ├── bind
│   ├── uevent
│   └── unbind
├── usbserial_generic
│   ├── bind
│   ├── uevent
│   └── unbind
├── usb_serial_simple
│   ├── bind
│   ├── uevent
│   └── unbind
└── usb-storage
    ├── 1-1:1.0 -> ../../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-1/1-1:1.0
    ├── bind
    ├── module -> ../../../../module/usb_storage
    ├── new_id
    ├── remove_id
    ├── uevent
    └── unbind


Unfortunately, any time I try to bind 3-1:1.1 to any of the drivers, I'm thwarted:
Code:
root@mirabox-debian:~# echo -n "3-1:1.1" > /sys/bus/usb/drivers/usbserial/bind
-bash: echo: write error: No such device
root@mirabox-debian:~# echo -n "3-1:1.1" > /sys/bus/usb/drivers/cdc_acm/bind
-bash: echo: write error: No such device
root@mirabox-debian:~# echo -n "3-1:1.1" > /sys/bus/usb/drivers/usbserial_generic/bind
-bash: echo: write error: No such device
root@mirabox-debian:~# echo -n "3-1:1.1" > /sys/bus/usb/drivers/usb_serial_simple/bind
-bash: echo: write error: No such device


To be honest, I'm not sure what the difference is between the various usbserial drivers.
This is a custom compiled kernel on a Mirabox (Marvell Armada 370, Arm 7) with very few kernel modules (I compiled most stuff directly into the kernel, including the usb drivers listed above).

Please help me find the magic I'm missing to bind the AT command port on this modem to something that looks like /dev/ttyUSB0 or /dev/ttyACM0.

Thank you,
John


Offline Profile
PostPosted: Mon Feb 20, 2017 2:59 am Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
Your lsusb says device number is 2 and so does also the usb_modeswitch log but you are binding device 1.


Offline Profile
PostPosted: Mon Feb 20, 2017 4:37 am Reply with quote
Posts: 2Joined: Sun Feb 19, 2017 6:46 pm
LOM wrote:
Your lsusb says device number is 2 and so does also the usb_modeswitch log but you are binding device 1.


I fear I don't fully understand the numbering system in the bind command. According to
Code:
root@mirabox-debian:~# ls -l /sys/bus/usb/devices/
total 0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 1-0:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-0:1.0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 1-1 -> ../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-1
lrwxrwxrwx 1 root root 0 Feb 20 01:29 1-1:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1/1-1/1-1:1.0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 2-0:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-0:1.0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 2-1 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1
lrwxrwxrwx 1 root root 0 Feb 20 01:29 2-1:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1:1.0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 2-1.2 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2
lrwxrwxrwx 1 root root 0 Feb 20 01:29 2-1.2:1.0 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2/2-1.2:1.0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 2-1.2:1.1 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2/2-1.2:1.1
lrwxrwxrwx 1 root root 0 Feb 20 01:29 2-1.2:1.2 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2/2-1/2-1.2/2-1.2:1.2
lrwxrwxrwx 1 root root 0 Feb 20 01:29 3-0:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-0:1.0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 3-1 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1
lrwxrwxrwx 1 root root 0 Feb 20 01:29 3-1:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 3-1:1.1 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.1
lrwxrwxrwx 1 root root 0 Feb 20 01:29 3-1:1.2 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.2
lrwxrwxrwx 1 root root 0 Feb 20 01:29 3-1:1.3 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.3
lrwxrwxrwx 1 root root 0 Feb 20 01:29 3-1:1.4 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3/3-1/3-1:1.4
lrwxrwxrwx 1 root root 0 Feb 20 01:29 4-0:1.0 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb4/4-0:1.0
lrwxrwxrwx 1 root root 0 Feb 20 01:29 usb1 -> ../../../devices/platform/soc/soc:internal-regs/d0050000.usb/usb1
lrwxrwxrwx 1 root root 0 Feb 20 01:29 usb2 -> ../../../devices/platform/soc/soc:internal-regs/d0051000.usb/usb2
lrwxrwxrwx 1 root root 0 Feb 20 01:29 usb3 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb3
lrwxrwxrwx 1 root root 0 Feb 20 01:29 usb4 -> ../../../devices/platform/soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0/usb4


My guy is 3-1:1.1. But I see where in lsusb it's
Code:
Access device 002 on bus 003


So, I'm confused as to which set of numbers to use to echo in to the "bind" file. Can you provide any clarity on that?

Thanks!
John


Offline Profile
PostPosted: Mon Feb 20, 2017 10:27 am Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
jgorkos wrote:
My guy is 3-1:1.1. But I see where in lsusb it's
Code:
Access device 002 on bus 003


So, I'm confused as to which set of numbers to use to echo in to the "bind" file. Can you provide any clarity on that?


Yes you're right, device numbers are not used in the bind command.

What about:
echo 3-1:1.1 > /sys/bus/usb/drivers/usbserial/bind


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
9 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum