LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: danielliu

3G TD-SCDMA上网的问题

[复制链接]
 楼主| 发表于 2009-8-10 22:10:11 | 显示全部楼层
我可以确认 http://www.linuxsir.cn/bbs/thread352518.html
这个方法是可以解决的。
请将MU350连接到电脑上后将你的以下信息贴出来我看一下:
1. eix usb_modeswitch
2. cat /etc/udev/rules.d/50-zte-mu350.rules
3.  /etc/wvdial.conf
4. ls /dev/tty*
5. sudo lsusb
6. ls /etc/udev/rules.d/
回复 支持 反对

使用道具 举报

发表于 2009-8-10 23:39:36 | 显示全部楼层
Post by danielliu;2014785
我可以确认 http://www.linuxsir.cn/bbs/thread352518.html
这个方法是可以解决的。
请将MU350连接到电脑上后将你的以下信息贴出来我看一下:
1. eix usb_modeswitch
2. cat /etc/udev/rules.d/50-zte-mu350.rules
3.  /etc/wvdial.conf
4. ls /dev/tty*
5. sudo lsusb
6. ls /etc/udev/rules.d/


先解释一下:我以前用的是Gentoo,不过现在是Ubuntu 9.04
1. usb_modeswitch 的版本是 1.0.2,我安装的是官方的二进制版
2. /etc/udev/rules.d/50-zte-mu350.rules

  1. ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTR{idVendor}=="19d2", ATTR{idProduct}=="0003", \
  2. RUN+="/usr/sbin/usb_modeswitch -v %s{idVendor} -p %s{idProduct} -M 5553424312345678000000000000061b000000020000000000000000000000 -R 1"
  3. SUBSYSTEM=="usb", SYSFS{idProduct}=="0003", SYSFS{idVendor}=="19d2", RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0003"
复制代码

3. /etc/wvdial.conf

  1. [Dialer Defaults]
  2. Modem = /dev/ttyUSB0
  3. Init1 = ATZ
  4. Init2 = ATE0V1
  5. Init3 = ATS0=0
  6. Init4 = AT+CFUN=1
  7. Modem Type = USB Modem
  8. Baud = 460800
  9. New PPPD = yes
  10. ISDN = 0
  11. Phone = *99***1#
  12. Password = any
  13. Username = any
  14. Stupid Mode = 1
复制代码


4. ls /dev/tty*
/dev/ttyS0,/dev/ttyS1,/dev/ttyS2,/dev/ttyS3
和USB相关的只有一个/dev/ttyUSB0,也就是说插上MU350后,只多出了一个ttyUSB0

5.lsusb

  1. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  2. Bus 005 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
  3. Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  4. Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  5. Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  6. Bus 002 Device 048: ID 19d2:0003  
  7. Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
复制代码


6. ls /etc/udev/rules.d


  1. -rw-r--r-- 1 root root   208 2009-08-06 16:45 10-vboxdrv.rules
  2. -rw-r--r-- 1 root root   857 2009-08-10 13:58 50-zte-mu350.rules
  3. -rw-r--r-- 1 root root  1479 2009-08-07 16:02 70-persistent-cd.rules
  4. -rw-r--r-- 1 root root   893 2009-04-30 23:42 70-persistent-net.rules
  5. -rw-r--r-- 1 root root 25245 2009-06-24 17:26 usb_modeswitch.rules

复制代码


其中50-zte-mu350.rules是我添加的,usb_modeswitch.rules是usb_modeswitch安装后自动添加的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-8-11 18:37:46 | 显示全部楼层
我的/etc/udev/rules.d/91-usb_modeswitch.rules
~ cat /etc/udev/rules.d/91-usb_modeswitch.rules
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="1000", RUN+="/usr/sbin/usb_modeswitch"
ls /usr/sbin/usb_modeswitch -l
-rwxr-xr-x 1 root root 30548 2009-08-08 22:01 /usr/sbin/usb_modeswitch
你看一下你的usb_modeswitch的文件大小 是不是30548
再看一下你的usb_modeswitch --help内有没有 -v, -p(小写的)
sudo usb_modeswitch --help
* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 1.0.2 (C) Josua Dietze 2009
* Works with libusb 0.1.12 and probably other versions

Usage: usb_modeswitch [-hvpVPmMrdHn] [-c filename]

-h, --help                    this help
[color="Red"] -v, --default-vendor [nr]     vendor ID to look for (mandatory)
-p, --default-product [nr]    product ID to look for (mandatory)
-V, --target-vendor [nr]      target vendor (optional, for success check)
-P, --target-product [nr]     target model (optional, for success check)
-C, --target-class [nr]       target device class
-m, --message-endpoint [nr]   where to direct the message (optional)
-M, --message-content [str]   command to send (hex number as string)
-n, --need-response           read a response to the message transfer
-r, --response-endpoint [nr]  where from read the response (optional)
-d, --detach-only             just detach the storage driver
-H, --huawei-mode             apply a special procedure
-S, --sierra-mode             apply a special procedure
-O, --sony-mode               apply a special procedure
-R, --reset-usb               reset the device in the end
-c, --config [filename]       load different config file
-Q, --quiet                   don't show progress or error messages
-W, --verbose                 print all settings before running
-s, --success [nr]            check switching result after [nr] secs
-I, --no-inquire              do not get device details (default on)

-i, --interface               select initial USB interface (default 0)
-u, --configuration           select USB configuration
-a, --altsetting              select alternative USB interface setting

如果上面都没有问题,你将MU350连接到电脑上后,手动执行以下命令试试
1.
/usr/sbin/usb_modeswitch -v 19d2 -p 0003 -M 5553424312345678000000000000061b000000020000000000000000000000 -R 1
2. 看一下 ls /dev/tty*
3. 再执行
/sbin/modprobe usbserial vendor=0x19d2 product=0x0003
4. 再看一下ls /dev/tty*
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表