Answers:
以下是可用于与设备进行交互的几种处理蓝牙的工具的列表。
hciconfig
hcitool dev还应该提供一些此类信息hcitool inq 和 hcitool scan
hcitool info <BTAddr>
l2ping <BTAddr>
sdptool browse <BTAddr> or sdptool records <BTAddr>
obexftp –nopath –noconn –uuid none –bluetooth <BTAddr> –channel <OPUSHChann
elNo> –put <FileToPut>
obexftp -b <BTAddr> -v -p <FileToPut>
passkey-agent –default <Pin>
obexpushd
您可以按照此站点上的指示通过命令行将设备与Linux盒配对。标题为:如何在Linux上从命令行配对蓝牙设备。
查找您的蓝牙设备的MAC地址
$ hcitool scan
Scanning ...
    11:22:33:44:55:66   device 1
    12:34:56:78:90:12   device 2
设置蓝牙代理以传递预期的配对代码
$ bluetooth-agent 0000 &
编辑rfcomm配置文件/etc/bluetooth/rfcomm.conf,然后从上方放入MAC地址。
rfcomm0 {
  # Automatically bind the device at startup
  bind no;
  # Bluetooth address of the device
  device 11:22:33:44:55:66;
  # RFCOMM channel for the connection
  channel 3;
  # Description of the connection
  comment "This is Device 1's serial port.";
}
注意:一个重要的警告,如果您将设备配置为在启动时不绑定(绑定编号;),则必须在使用串行端口之前使用此命令手动启动rfcomm(这也需要root权限)。
$ sudo rfcomm connect rfcomm0