手机:sony ericsson K750C 开通了GPRS
系统:redflag linux desktop 5.0
所用的工具:
pppd(用来拨号的)
rfcomm(用来连接手机拨号服务)
需要的配置文件有2个:
1:/etc/ppp/gprs
内容如下:
/dev/rfcomm0
230400
defaultroute
usepeerdns
user ''
password bobo
nodetach
crtscts
lock
noauth
local
debug
connect "/usr/sbin/chat -v -f /etc/ppp/chat-gprs"
2:/etc/ppp/chat-gprs
TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
"" 'ATZ'
OK 'AT+CGDCONT=3,"IP","internet3.voicestream.com" '
ABORT 'NO CARRIER'
SAY 'Dialing....\n'
OK 'ATD*99***1#'
CONNECT ''
建立好上述2个文件,执行下面的命令:
1:hcitool scan
取得蓝牙手机地址 00:16:20:31:6C:A8
2:sdptool browser 00:16:20:31:6C:A8
输出如下:
ervice Name: Dial-up Networking
Service RecHandle: 0x10001
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
3:rfcomm bind 0 00:16:20:31:6C:A8 1
4 pppd call gprs
输出如下:
Serial connection established.
using channel 25
Using interface ppp0
Connect: ppp0 <--> /dev/rfcomm0
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
rcvd [LCP ConfReq id=0x2 ]
sent [LCP ConfAck id=0x2 ]
rcvd [LCP ConfAck id=0x1 ]
sent [PAP AuthReq id=0x1 user="localhost" password=]
rcvd [PAP AuthAck id=0x1 "Congratulations!"]
Remote message: Congratulations!
sent [IPCP ConfReq id=0x1 ]
sent [CCP ConfReq id=0x1 ]
rcvd [LCP ProtRej id=0x1 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfNak id=0x1 ]
rcvd [IPCP ConfNak id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [IPCP ConfReq id=0x2]
sent [IPCP ConfAck id=0x2]
rcvd [IPCP ConfAck id=0x2 ]
Could not determine remote IP address: defaulting to 10.64.64.64
not replacing existing default route to eth0 [172.16.80.1]
local IP address 10.12.93.62
remote IP address 10.64.64.64
primary DNS address 221.130.33.52
secondary DNS address 221.130.33.60
Script /etc/ppp/ip-up started (pid 29502)
Script /etc/ppp/ip-up finished (pid 29502), status = 0x0
最后修改/etc/resolv.conf
nameserver 221.130.33.52
search localhost
启动网络浏览器即可通过蓝牙手机上网了
http://jsxsongwei.blog.163.com/blog/static/146179782006618105190/
阅读(1530) | 评论(0) | 转发(0) |