简单办法搞定 Linux 上蓝牙和 USB 线 GPRS 拨号上网。
移动 TD-SCDMA 测试用的话费积攒到了 4000 多元了,女朋友消化得实在太慢,怎么办呢。
刚好趁着外出,把测试的 3G USIM 卡插上 Nokia E71(因为附送的熊猫山寨机太差了。。。-_-#),拿来给笔记本 GPRS 无线上网。
首先安装好 pppd 和 wvdial,把手机的 USB 连接模式改成 PC Suite,这样才能把手机当猫用,如果使用 Connect PC to Web 的话,屏幕上会出现 Nokia Connect to Internet 的盘符。
然后在 /etc/wvdial.conf 里写下如下代码,不用对 cmnet 接入点做特别设置,直接就会连接好了。
[Dialer nokia-usb]
Modem = /dev/ttyACM0
Baud = 3600000
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 =
Modem Type = USB Modem
Area Code =
Phone = *99#
Username = ppp
Password = ppp
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 0
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1
New PPPD = yes
[Dialer nokia-bluetooth]
Modem = /dev/rfcomm0
Baud = 3600000
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 =
Area Code =
Phone = *99#
Username = ppp
Password = ppp
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 0
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1
New PPPD = yes
Modem = /dev/ttyACM0
Baud = 3600000
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 =
Modem Type = USB Modem
Area Code =
Phone = *99#
Username = ppp
Password = ppp
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 0
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1
New PPPD = yes
[Dialer nokia-bluetooth]
Modem = /dev/rfcomm0
Baud = 3600000
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 =
Area Code =
Phone = *99#
Username = ppp
Password = ppp
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 0
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1
New PPPD = yes
写好后用 root 运行:
wvdial nokia-usb
应该就可以上网了。
如果要用蓝牙的话,需要先安装 bluez,建立 /dev/rfcomm0 设备,我是在 Fedora 10 上测试的,很奇怪改好 /etc/bluetooth/rfcomm.conf 后,重启蓝牙服务无效,所以还是手工绑定那个设备吧。
用下面命令绑定设别:
rfcomm 0 (Bluetooth MAC Address) (Internet Dialer Channel)
如果不知道蓝牙的 MAC 地址的话,可以用下面命令进行搜索。
hcitool scan
如果不知道 Internet Dialer Channel 的话,可以用下面命令查找:
sdptool search DUN
然后再执行上面的 rfcomm 命令,然后用下面命令拨号。
wvdial nokia-bluetooth
方法应该说比较简单了,Enjoy your wireless life 吧 :-)