Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
yavg
Posts: 3
Joined: 20 May 2010, 16:15
Location: Fuqing,Fujian,China
Contact:

ZTE MU350

Post by yavg » 20 May 2010, 16:27

It's TD-SCDMA,It's Very popular in China.
do version1.1.2 support this device?
http://www.linuxsir.org/bbs/thread352518.html

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 20 May 2010, 19:29

It's not hard to add support.

Does the device change its IDs after switching?

cstn
Posts: 6
Joined: 25 May 2010, 17:41

Post by cstn » 25 May 2010, 18:17

i have a ZTE-MU351,work with TD-SCDMA,and almost like MU350,the two device have the same ID
idProduct:0003
idVendor:19d2
and they don't change IDs after switching

but failed to use my deice with linux
seem like something wrong here

my situation:

# vi /etc/udev/rules.d/50-zte-mu351.rules

Code: Select all

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTR{idVendor}=="19d2", ATTR{idProduct}=="0003",  RUN+="/usr/sbin/usb_modeswitch -v %s{idVendor} -p %s{idProduct} -M 5553424312345678000000000000061b000000020000000000000000000000 -R 1"

SUBSYSTEM=="usb", SYSFS{idProduct}=="0003", SYSFS{idVendor}=="19d2", RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0003"
then plug my MU351 ,it switch automatically
check tty device:

Code: Select all

$ dmesg |grep tty
[    0.000000] console [tty0] enabled
[   78.390496] usb 4-2: generic converter now attached to ttyUSB0
[   78.390781] usb 4-2: generic converter now attached to ttyUSB1
[   78.391070] usb 4-2: generic converter now attached to ttyUSB2
[   78.391360] usb 4-2: generic converter now attached to ttyUSB3
[   78.420708] generic ttyUSB0: generic converter now disconnected from ttyUSB0
[   79.423952] generic ttyUSB1: generic converter now disconnected from ttyUSB1
[   79.424745] generic ttyUSB2: generic converter now disconnected from ttyUSB2
[   79.424924] generic ttyUSB3: generic converter now disconnected from ttyUSB3
[   79.682701] usb 4-2: generic converter now attached to ttyUSB0
[   79.682904] usb 4-2: generic converter now attached to ttyUSB1
[   79.683117] usb 4-2: generic converter now attached to ttyUSB2
[   79.720147] usb 4-2: GSM modem (1-port) converter now attached to ttyUSB3
and dial with pppd,error:

Code: Select all

# pppd call 3gcmwap
timeout set to 15 seconds
abort on (DELAYED)
abort on (BUSY)
abort on (ERROR)
timeout set to 15 seconds
abort on (DELAYED)
abort on (BUSY)
abort on (ERROR)
abort on (NO DIALTONE)
abort on (NO CARRIER)
timeout set to 40 seconds
send (^MAT^M)
expect (OK)
^M
ERROR
 -- failed
Failed (ERROR)
Script /usr/sbin/chat -s -v -f /etc/ppp/connect-chat finished (pid 1879), status = 0x6
Connect script failed
infact,if it can work ,the LED on MU351 will turn green(EDGE) or blue(TD),but when i plug MU351 in USB-port,wait,and the LED didn't change,always red~

hope somebody can give me some advice,or tell me how to handle my device~T_T

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 26 May 2010, 00:08

This goes to everyone here: don't just fumble around with setups posted somewhere else !!

If these advices don't work out at once, turn to the USB_ModeSwitch documentation page and try to understand what is going on.
Any external hint may be completely outdated, costing you nerves and time. Probably more than you would need to pick up the latest information here.

Sorry, that had to be said.

Now:
1. You need to avoid the repeated run. Your rule will match after switching too (same ID !), so usb_modeswitch should prevent doing anything in that case. The -C parameter checks for the (interface 0) class of the device: 0x08 before switching, 0xff afterwards.
Also you added a -R option which will definitely send a RESET command to the switched (and the unswitched) device, confusing it completely. It's wrong. Don't use it.
Add the -n parameter to wrap up the command transfer according to the standards. This will probably help with switching.

2. Use the "option" driver, not "usb-serial". It will probably know your switched modem already; after switching, wait a while then run dmesg and see if "GSM modem" pops up (as in your dmesg posting).
Remove your rule for the driver loading - at least for now. It is trying to work on the unswitched device as well as on the switched.

So, to make your switching rule work, change the RUN value to:

Code: Select all

"/usr/sbin/usb_modeswitch -n -v %s{idVendor} -p %s{idProduct} -C 0xff -M 5553424312345678000000000000061b000000020000000000000000000000"
If the "option" driver doesn't load, post again.


cstn
Posts: 6
Joined: 25 May 2010, 17:41

Post by cstn » 26 May 2010, 05:36

thank Josh~
but my device still doesn't work

i use the RUN value that you give out to my rule
# vi /etc/udev/rules.d/50-zte-mu351.rules

Code: Select all

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTR{idVendor}=="19d2", ATTR{idProduct}=="0003",  RUN+="/usr/sbin/usb_modeswitch -n -v %s{idVendor} -p %s{idProduct} -C 0xff -M 5553424312345678000000000000061b000000020000000000000000000000"

SUBSYSTEM=="usb", SYSFS{idProduct}=="0003", SYSFS{idVendor}=="19d2", RUN+="/sbin/modprobe option vendor=0x19d2 product=0x0003"
check dmesg:
$ dmesg |grep tty

Code: Select all

[    0.000000] console [tty0] enabled
[ 1802.146269] usb 4-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 1802.146445] usb 4-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 1802.146616] usb 4-2: GSM modem (1-port) converter now attached to ttyUSB2
[ 1802.146786] usb 4-2: GSM modem (1-port) converter now attached to ttyUSB3
dial again with ttyUSB3 ,pops up the same error like before
the LED still red
i guess the option driver still can't make it work
or something wrong else"?

i use linux kernel 2.6.32-21(ubuntu10.04)

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 26 May 2010, 08:25

How do you know that ttyUSB3 is the correct port for connection?

After switching do a "lsusb -v -d 19d2:0003" and search the output for an interface with "TransferType Interrupt". If that is the interface with no. 0, use ttyUSB0 to connect. Interface 2 --> ttyUSB2 etc.

Usually, there is only one such interface.

As I thought, your second rule (for driver loading) is unnecessary. It does not even do anything good: try the RUN command on a terminal ...

"/sbin/modprobe option vendor=0x19d2 product=0x0003"


cstn
Posts: 6
Joined: 25 May 2010, 17:41

Post by cstn » 26 May 2010, 10:59

i edited my ".rule" file,delete the second code about "modprobe"

and pluged device

and use command on terminal "/sbin/modprobe option vendor=0x19d2 product=0x0003" (seem like no response after this step )

run command "lsusb -v -d 19d2:0003"

Code: Select all

# lsusb -v -d 19d2:0003

Bus 004 Device 003: ID 19d2:0003 ONDA Communication S.p.A. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x19d2 ONDA Communication S.p.A.
  idProduct          0x0003 
  bcdDevice            1.00
  iManufacturer           1 ZTE Corp
  iProduct                2 TD-SCDMA USB Modem
  iSerial                 4 000000000000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          124
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self 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              7 ZTE Modem
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              9 ZTE DIAG Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              8 ZTE AT Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface             10 ZTE Sound Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              6 ZTE USB Mass Storage Device
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0001
  Self Powered
no "TransferType Interrupt",all are "Bulk"

and i try to dial with ttyUSB0\ttyUSB1\ttyUSB2\ttyUSB3 one by one
ttyUSB3 wait for 40 seconds at "send (^MAT^M)",then failed
but the first three are even worse,failed quikly without waiting anything

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 26 May 2010, 19:35

I see. What a peculiar device!

Can you post your "/etc/ppp/connect-chat"?

Maybe there is a problem with it ...

Anyway, the "lsusb -v" listing shows the names of the interfaces. The first one says "ZTE Modem" which is a hint to use ttyUSB0.


cstn
Posts: 6
Joined: 25 May 2010, 17:41

Post by cstn » 27 May 2010, 02:06

$ gedit /etc/ppp/connect-chat

Code: Select all

# chat script for China Mobile
TIMEOUT         15
ABORT           "DELAYED"
ABORT           "BUSY"
ABORT           "ERROR"
TIMEOUT         15
ABORT           "DELAYED"
ABORT           "BUSY"
ABORT           "ERROR"
ABORT           "NO DIALTONE"
ABORT           "NO CARRIER"
TIMEOUT         40
''              \rAT
OK              ATS0=0
OK              ATE0V1
OK              AT+CGDCONT=1,"IP","CMWAP"
OK              AT+CFUN=1
OK              ATD*99***1#
CONNECT         ''
i often connect my Nokia N70 to laptop with bluetooth,and dial to EDGE network,i also use this script to achieve these
so i doubt the mu351 too~

by the way,when i plug the device to USB,the 64MB mass storage and the cdrom are all come out,but at the same time,ttyUSB still appeared in /dev folder

yavg
Posts: 3
Joined: 20 May 2010, 16:15
Location: Fuqing,Fujian,China
Contact:

Post by yavg » 28 May 2010, 00:21

搞累了,不想搞了,我那H618B路由器就让它先放在一旁,以后有精力的时候在来测试。
在XP下用什么软件可以查看idVendor和idProduct?
回cstn:我在网上有看见MU350+LINUX成功案例,估计成功与否根MU350的固件有关。

cstn
Posts: 6
Joined: 25 May 2010, 17:41

Post by cstn » 28 May 2010, 15:23

to yavg:
我以前用过usb sniffer在XP和VISTA下查看VID和PID
i used "usb sniffer" to check the VID and PID in XP and VISTA~

yavg
Posts: 3
Joined: 20 May 2010, 16:15
Location: Fuqing,Fujian,China
Contact:

Post by yavg » 28 May 2010, 17:47

to cstn:
谢谢,我已经下载了usb sniffer.很方便的一个工具。
Thank you, I have downloaded the usb sniffer. A very convenient tool.
to josh:
谢谢你的技术支持,没有你的努力就没有usb modeswitch的成功,全国人民感谢你。
Thank you for your support.There is no usb modeswitch’s success that without your efforts.Chinese people feel you.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 28 May 2010, 23:08

Thanks, yavg, for the kind words.

cstn, it may be interesting to test a slightly different chat script. I'll post mine below, adapted to your settings.

Also, try to install a terminal program like "minicom" or "cutecom". Then you could enter the AT commands interactively to see if they are working all right.

Code: Select all

ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
"" "AT&F"
OK "ATE1"
OK "AT+CGDCONT=1,\042IP\042,\042CMWAP\042"
TIMEOUT 60
OK "ATD*99#"
CONNECT \c
The lines
OK ATS0=0
and
OK AT+CFUN=1
may be needed for your modem, but first try without them. Also, if you need the "AT+CFUN=1" command, then it should probably be the first one. I googled for it and it seems that some modems change their configuration after this command.


cstn
Posts: 6
Joined: 25 May 2010, 17:41

Post by cstn » 14 Jun 2010, 13:34

leave for half a month,and had none linux computer with me,so i can't go on testing before. now i get back.

Josh,
i test your chat script
occured a same error like before

Code: Select all

root@knytlaptop:/home/knyt# pppd call 3gcmwap
abort on (BUSY)
abort on (NO CARRIER)
abort on (ERROR)
report (CONNECT)
timeout set to 10 seconds
send (AT&F^M)
expect (OK)
alarm
Failed
Script /usr/sbin/chat -s -v -f /etc/ppp/connect-chat finished (pid 4000), status = 0x3
Connect script failed
while,i installed cutecom,and launch it as root,sadly no ttyUSB found in the device list,only ttyS0,ttyS1,ttyS2,ttyS3,not to mention entering AT commands.i am not familar with it.

javg said maybe it concerned with the firmware version of MU351.my MU351 is customed by China Mobile.so if possible,i will flash it a new version for testing when i found a available firmware.

RichardWilliam
Posts: 1
Joined: 04 Apr 2024, 05:56

Re: ZTE MU350

Post by RichardWilliam » 04 Apr 2024, 05:59

yavg wrote: 20 May 2010, 16:27 It's TD-SCDMA,It's Very popular in China.
do version1.1.2 support this device?
http://www.linuxsir.org/bbs/thread352518.htmlOmegle Chat
Version 1.1.2, I don't know if it supports this device

Post Reply