在archlinux下使用bluetooth管理手机GPRS

Created Sunday 13 March 2011

安装吧

安装 bluez

# pacman -S bluez
# /etc/rc.d/dbus restart
# /etc/rc.d/bluetooth start

别忘了吧 bluetooth 放在 /etc/rc.conf 的DAEMONS 里,要放在dbus的后方(可以最后加载@),如果你的dbus前有@的话,建议去掉


现在hciconfig hcitool 已经可以用了,不过貌似不可以,因为bluetooth需要dbus的支持,可以试试
然后安装前端 blueman

# pacman -S blueman
$ blueman-applet &
现在打开 blueman-applet ;恩?灰色的图标,也就是说蓝牙没启动。

我的是外置USB蓝牙的话,出现一点点的小问题,
hciconfig -a hci0 返回的BD address是 00:00....
那么 使用 sudo hciconfig hci0 up
然后 hciconfig -a hci0 是不是找到了

$ hciconfig -a hci0
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
	DOWN 
	RX bytes:0 acl:0 sco:0 events:0 errors:0
	TX bytes:3 acl:0 sco:0 commands:1 errors:0
$ sudo hciconfig hci0 up 
$ hciconfig -a hci0
hci0:	Type: BR/EDR  Bus: USB
	BD Address: 00:12:67:00:00:00  ACL MTU: 1021:4  SCO MTU: 48:10
	UP RUNNING PSCAN 
	RX bytes:661 acl:0 sco:0 events:21 errors:0
	TX bytes:346 acl:0 sco:0 commands:23 errors:0

现在用blueman-applet查找管理手机吧

使用wvidal链接蓝牙上网gprs

如果没有wvdial自己下载一个吧
#pacman -S wvdial

修改 /etc/wvdial.conf

$ sudo vim /etc/wvdial.conf

[Dialer Defaults]
Init1 = at+cgdcont=1,”ip”,”cmnet”
Modem Type = BlueTooth Modem
ISDN = 0
Phone = *99***1#
Modem = /dev/rfcomm0
Username = “172″
Carrier Check = no
Password = “172″
Baud = 460800
Auto DNS = on

---我自己的蓝牙手机

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 >C1 >D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","CMNET","",0,0
Stupid Mode = yes
;装载类型
;Modem Type = USB Modem
Modem Type = BlueTooth Modem
Phone = *99#
ISDN = 0
New PPPD = yes
; the username and password any いいです
Username = guest
Password = guest
;tty是usb连接使用 rfc是蓝牙使用
;Modem = /dev/ttyACM0
Modem = /dev/rfcomm0
Baud = 460800
Auto DNS = 1
Idle Seconds = 3000

转载于:https://my.oschina.net/erasinoo/blog/14103

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值