当前位置:首页 > 服务器类 > Linux服务器 > > Ubuntu Linux 8.04蓝牙设备连接管理方法

Ubuntu Linux 8.04蓝牙设备连接管理方法

点击次数:46 次 发布日期:2008-11-21 23:08:03 作者:源代码网
源代码网推荐

1.启动蓝牙设备

    sudo /etc/init.d/bluetooth restart

    或者

    sudo /etc/init.d/bluez-utils restart

    2.使用hcitool dev查看计算机上的蓝牙设备

    teapot@teapot:~$ hcitool dev

    Devices:

    hci0 00:16:CF:DB:B4:BF

    teapot@teapot:~$

    3.安装设备

    查询设备地址

    teapot@teapot:~$ sudo hidd search

    Searching ……

    No devices in range or visible

    如果sudo hidd search没有搜索到,换hcitool scan搜索

    我的T60 使用hcitool scan搜索到手机的蓝牙

    teapot@teapot:~$ hcitool scan

    Scanning ……

    00:1D:E9:30:CE:55 PZF # 这是我的手机

    teapot@teapot:~$ sudo hidd connect 00:1D:E9:30:CE:55

    teapot@teapot:~$ sudo hidd show

    teapot@teapot:~$

    没有错误提示,也没有连接,不知道怎么回事了!

    teapot@teapot:~$ sudo hcitool cc 00:1D:E9:30:CE:55

    teapot@teapot:~$ sudo hcitool con

    Connections:

    teapot@teapot:~$

    # 这时在蓝牙管理器的浏览设备中发现了PZF

    # 建立配对

    # 再查看连接

    teapot@teapot:~$ sudo hcitool con

    Connections:

    < ACL 00:1D:E9:30:CE:55 handle 11 state 1 lm MASTER ENCRYPT

源代码网供稿.
网友评论 (0)
会员中心
服务器类
本站推荐
服务器类之精华