Ubuntu 9.04 通过E71蓝牙共享GPRS上网


Ubuntu 9.04 通过E71蓝牙共享GPRS上网包括两种方法:字符界面和图形界面
sudu apt-get install gnome-bluetooth blue-utils

这里ubuntu可以通过桌面的图标进行匹配,匹配的时候用0000这个就可以。

绑定蓝牙设备
bcitool scan       #扫描蓝牙设备
yucheng@ubuntu:~$ hcitool scann
Scanning ...
00:24:7D:41:19:C0    YuCheng

sdptool search DUN      查看channel   一般是 2
yucheng@ubuntu:~$ sdptool search DUN
Inquiring ...
Searching for DUN on 00:24:7D:41:19:C0 ...
Service Name: Dial-Up Networking
Service RecHandle: 0x10052
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Language Base Attr List:
code_ISO639: 0x454e
encoding:    0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
##############################
yucheng@ubuntu:~$ rfcomm bind /dev/rfcomm0     00:24:7D:41:19:C0 2

编辑配置文件,上海移动的gprs不分cmnet和wap所以当然选择cmnet了,免除代理的麻烦;

yucheng@ubuntu:~$ sudo cat /etc/ppp/peers/bluetoothdialup
debug
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/bluetoothdialup"
usepeerdns
/dev/rfcomm0 115200
defaultroute
crtscts
lcp-echo-failure 0

yucheng@ubuntu:~$ sudo cat /etc/chatscripts/bluetoothdialup
TIMEOUT 35
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
OK 'AT+CGDCONT=1,"IP","cmnet"'
OK ATD*99***1#
CONNECT ""
yucheng@ubuntu:~$

拨号的时候一定要加sudu
sudo pon bluetoothdialup

断线
sudo poff bluetoothdialup

字符界面需要安装  gnome-ppp
sudo apt-get install gnome-ppp
可能这个软件有个权限bug,所以不要在菜单上执行,在终端下执行
sudo gnome-ppp

setup-->Device   /dev/rfcomm0    phone numbers: *99***1#   init strings
删除自动生成的内容 输入:
AT+CGDCONT=1,"ip","cmnet"
connect 注意通过log来查错,没有错误最好了。
我先后遇到过:电话号码输入错,用户名密码忘记添(随便填,就是别为空)

相关内容