archlinux TD-SCDMA 3G(ZTE-MU350)上网笔记
1 安装 usb_modeswitch , wvdial
sudo pacman -S usb_modeswitch wvdial
sudo vim /etc/udev/rules.d/50-zte-mu350.rules
# /etc/udev/rules.d/50-zte-mu350.rules # 卸载自动加载成硬盘 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" #将MU350转换成串口modem SUBSYSTEM=="usb", SYSFS{idProduct}=="0003", SYSFS{idVendor}=="19d2", RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0003"
vim /etc/wvdial.conf
[Dialer Defaults] Modem = /dev/ttyUSB0 Init1 = ATZ Init3 = ATE0V1 Init5 = ATS0=0 Init6 = AT+CGDCONT=1,"IP","cmwap" Init7 = AT+CFUN=1 Modem Type = USB Modem Baud = 460800 New PPPD = yes ISDN = 0 Phone = *98*1# Password = any Username = any Stupid Mode = 1
4 编写 mu350的 usb_modeswitch切换脚本
sudo vim /etc/usb_modeswitch.d/19d2:0003
#/etc/usb_modeswitch.d/19d2:0003 # ZTE "0003, mu350" devices TargetVendor=0x19d2 TargetProductList="0003,fff1,fffe,ffff" MessageContent="5553424312345678c00000008000069f030000000000000000000000000000"
sudo vim /etc/usb_modeswitch.conf
# Configuration for the usb_modeswitch package, a mode switching tool for # USB devices providing multiple states or modes # # Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher # # To enable an option, set it to "1", "yes" or "true" (case doesn't matter) # Everything else counts as "disable" # Disable automatic mode switching globally (e.g. to access the original # install storage) DisableSwitching=0 # Enable logging (results in a extensive report file in /var/log, named # "usb_modeswitch_<interface-name>" and probably others EnableLogging=0 # ZTE "0003" devices 1 DisableSwitching=0 DefaultVendor= 0x19d2 DefaultProduct= 0x0003 TargetVendor= 0x19d2 TargetProduct= 0x0003 MessageContent="5553424312345678c00000008000069f030000000000000000000000000000" CheckSuccess=5 HuaweiMode=0 # Enable logging (results in a extensive report file in /var/log, named # "usb_modeswitch_<interface-name>" and probably others EnableLogging=1 # ZTE "0003" devices 1
配制完成。
以后每次上网时,只需在Termial拨号即可。
sudo wvdial
[hpc@ming-archhost sbin]$ sudo wvdial[sudo] password for hpc: --> WvDial: Internet dialer version 1.61--> Initializing modem.--> Sending: ATZOK--> Sending: ATE0V1OK--> Sending: ATS0=0OK--> Sending: AT+CGDCONT=1,"IP","cmwap"OK--> Sending: AT+CFUN=1OK--> Modem initialized.--> Sending: ATDT*98*1#--> Waiting for carrier.CONNECT 2800000--> Carrier detected. Starting PPP immediately.--> Starting pppd at Mon Oct 29 12:02:20 2012--> Pid of pppd: 1456--> Using interface ppp0--> pppd: _[7f]--> pppd: _[7f]--> pppd: _[7f]--> pppd: _[7f]--> pppd: _[7f]--> local IP address 10.202.252.143--> pppd: _[7f]--> remote IP address 192.168.0.1--> pppd: _[7f]--> primary DNS address 221.130.33.60--> pppd: _[7f]--> secondary DNS address 221.130.33.52--> pppd: _[7f]^CCaught signal 2: Attempting to exit gracefully...--> Terminating on signal 15--> pppd: _[7f]--> Connect time 3.6 minutes.--> pppd: _[7f]--> pppd: _[7f]--> pppd: _[7f]--> Disconnecting at Mon Oct 29 12:05:59 2012[hpc@ming-archhost sbin]$ sudo wvdial--> WvDial: Internet dialer version 1.61--> Initializing modem.--> Sending: ATZOK--> Sending: ATE0V1OK--> Sending: ATS0=0OK--> Sending: AT+CGDCONT=1,"IP","cmwap"OK--> Sending: AT+CFUN=1OK--> Modem initialized.--> Sending: ATDT*98*1#--> Waiting for carrier.CONNECT 2800000--> Carrier detected. Starting PPP immediately.--> Starting pppd at Mon Oct 29 12:07:08 2012--> Pid of pppd: 1935--> Using interface ppp0--> pppd: �[7f]--> pppd: �[7f]--> pppd: �[7f]--> pppd: �[7f]--> pppd: �[7f]--> local IP address 10.210.126.27--> pppd: �[7f]--> remote IP address 192.168.0.1--> pppd: �[7f]--> primary DNS address 221.130.33.52--> pppd: �[7f]--> secondary DNS address 221.130.33.60--> pppd: �[7f] 看到上面的日志,恭喜你上网成功!!