raspberry pi 蓝牙,pcduino蓝牙

虽然这里是以pcduino为例的,但是同rpi是一样的。

安装Raspberry Pi蓝牙驱动

sudo apt-get install bluetooth bluez-utils blueman

Raspberry PI 列出usb设备

$lsusb

下面就是返回结果

Bus 001 Device 002: ID 0bda:8179 Realtek Semiconductor Corp.
Bus 004 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

显然

    Bus 004 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

这个便是我们要的返回结果

Raspberry PI 蓝牙状态

 /etc/init.d/bluetooth status

下面的结果显示蓝牙正在运行

Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service bluetooth status

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status bluetooth

bluetooth start/running, process 1648

Raspberry PI扫描蓝牙

$hcitool scan

这里一个是Lumia 920的,一个是电脑的。

Scanning ...
B0:35:8D:06:99:AD   Windows Phone
28:CF:E9:1C:42:2A   phodal

Raspberry PI蓝牙连接情况

可以ping一下

  sudo l2ping B0:35:8D:06:99:AD

返回的结果表明可以的

Ping: B0:35:8D:06:99:AD from 00:1B:10:00:2A:EC (data size 44) ...
0 bytes from B0:35:8D:06:99:AD id 0 time 46.79ms
0 bytes from B0:35:8D:06:99:AD id 1 time 18.76ms
0 bytes from B0:35:8D:06:99:AD id 2 time 9.83ms
0 bytes from B0:35:8D:06:99:AD id 3 time 65.86ms
0 bytes from B0:35:8D:06:99:AD id 4 time 50.81ms

或许您还需要下面的文章:

关于我

Github: @phodal     微博:@phodal     知乎:@phodal    

微信公众号(Phodal)

围观我的Github Idea墙, 也许,你会遇到心仪的项目

QQ技术交流群: 321689806