第一步:安裝需要的軟體 sudo apt-get install usb-modeswitch wvdial 第二步:記錄ET188的ID 把3G卡插上,然後執行: lsusb | grep Huawei Bus 002 Device 002: ID 12d1:1da1 Huawei Technologies Co., Ltd. 記錄下12d1:1da1,後邊會用到。(注:不同的機器該值會不同) 第三步:配置usb_modeswith sudo gedit /etc/usb_modeswitch.conf, 在開啟編輯的檔案的最後邊增加: ###################################### # Huawei ET128 # # Contributor: Dale Lane DefaultVendor= 0x12d1 DefaultProduct= 0x1da1 TargetVendor= 0x12d1 TargetProduct= 0x1da1 #注:其中的12d1和1da1就是上一步得到的結果。 # choose one of these: DetachStorageOnly=0 #我沒有加這條,我加了有問題。 HuaweiMode=1 ###################################### 第四步,配置wvdial上網配置檔案 sudo gedit /etc/wvdial.conf 編輯為如下內容: [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Modem Type = USB Modem Baud = 460800 New PPPD = yes Modem = /dev/ttyACM2 ISDN = 0 ; Phone = <Target Phone Number> ; Password = <Your Password> ; Username = <Your Login Name> Phone = *99***1# Password = any Username = any Stupid Mode = 1 第五步,上網執行如下兩個命令 1,切換網絡卡模式: sudo usb_modeswitch -c /etc/usb_modeswitch.conf -W 注: 這一步有時要把網絡卡重新插一下,然後再執行。 2,連線無線網路 sudo wvdial 終端顯示差不多如下就可以上網了 --> WvDial: Internet dialer version 1.60 --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK --> Modem initialized. --> Sending: ATDT*99***1# --> Waiting for carrier. ATDT*99***1# CONNECT 2800000 --> Carrier detected. Starting PPP immediately. --> Starting pppd at Mon Jun 22 11:11:50 2009 --> Pid of pppd: 4134 --> Using interface ppp0 --> local IP address 10.140.162.111 --> remote IP address 192.200.1.21 --> primary DNS address 221.130.33.60 --> secondary DNS address 221.130.33.52 要斷網,只需要終端裡按按ctrl + c即可 若第五步,想方便可以寫個指令碼放到桌面 (網上找的,沒試過) #!/bin/sh /usr/sbin/usb_modeswitch -W sleep 5 echo "nameserver 202.106.0.20" >/etc/resolv.con konsole -e /usr/bin/wvdial 每次插上隨身碟,然後雙擊該指令碼,斷線時按ctrl + c即
第一步:安裝需要的軟體 sudo apt-get install usb-modeswitch wvdial 第二步:記錄ET188的ID 把3G卡插上,然後執行: lsusb | grep Huawei Bus 002 Device 002: ID 12d1:1da1 Huawei Technologies Co., Ltd. 記錄下12d1:1da1,後邊會用到。(注:不同的機器該值會不同) 第三步:配置usb_modeswith sudo gedit /etc/usb_modeswitch.conf, 在開啟編輯的檔案的最後邊增加: ###################################### # Huawei ET128 # # Contributor: Dale Lane DefaultVendor= 0x12d1 DefaultProduct= 0x1da1 TargetVendor= 0x12d1 TargetProduct= 0x1da1 #注:其中的12d1和1da1就是上一步得到的結果。 # choose one of these: DetachStorageOnly=0 #我沒有加這條,我加了有問題。 HuaweiMode=1 ###################################### 第四步,配置wvdial上網配置檔案 sudo gedit /etc/wvdial.conf 編輯為如下內容: [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Modem Type = USB Modem Baud = 460800 New PPPD = yes Modem = /dev/ttyACM2 ISDN = 0 ; Phone = <Target Phone Number> ; Password = <Your Password> ; Username = <Your Login Name> Phone = *99***1# Password = any Username = any Stupid Mode = 1 第五步,上網執行如下兩個命令 1,切換網絡卡模式: sudo usb_modeswitch -c /etc/usb_modeswitch.conf -W 注: 這一步有時要把網絡卡重新插一下,然後再執行。 2,連線無線網路 sudo wvdial 終端顯示差不多如下就可以上網了 --> WvDial: Internet dialer version 1.60 --> Cannot get information for serial port. --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK --> Modem initialized. --> Sending: ATDT*99***1# --> Waiting for carrier. ATDT*99***1# CONNECT 2800000 --> Carrier detected. Starting PPP immediately. --> Starting pppd at Mon Jun 22 11:11:50 2009 --> Pid of pppd: 4134 --> Using interface ppp0 --> local IP address 10.140.162.111 --> remote IP address 192.200.1.21 --> primary DNS address 221.130.33.60 --> secondary DNS address 221.130.33.52 要斷網,只需要終端裡按按ctrl + c即可 若第五步,想方便可以寫個指令碼放到桌面 (網上找的,沒試過) #!/bin/sh /usr/sbin/usb_modeswitch -W sleep 5 echo "nameserver 202.106.0.20" >/etc/resolv.con konsole -e /usr/bin/wvdial 每次插上隨身碟,然後雙擊該指令碼,斷線時按ctrl + c即