archlinux TD-SCDMA 3G(ZTE-MU350)上網筆記
1 安裝 usb_modeswitch , wvdial
sudo pacman -S usb_modeswitch wvdial
2 編輯配製文件:
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"
3 編寫撥號腳本, 神州行,cmwap 上網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"
5 編寫 mu350的 usb_modeswitch.conf
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]
看到上面的日誌,恭喜你上網成功!!