歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 9.04 通過E71藍牙共享GPRS上網

Ubuntu 9.04 通過E71藍牙共享GPRS上網

日期:2017/2/28 16:42:31   编辑:Linux教程

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來查錯,沒有錯誤最好了。
我先後遇到過:電話號碼輸入錯,用戶名密碼忘記添(隨便填,就是別為空)

Copyright © Linux教程網 All Rights Reserved