Bluetooth Debian:无法创建rfcomm0

Bluetooth Debian:无法创建rfcomm0,bluetooth,arduino,Bluetooth,Arduino,关于Debian Jessie 8.2: 我正在尝试创建以下设备:/dev/rfcomm0,以便通过蓝牙模块HC-05连接我的arduino,但未成功。 以下是我将遵循的步骤: 1) 我想我的HC-05名为FOO,已经被识别并正确配置,因为 hcitool scan 报告 98:D3:31:xx:xx:xx FOO Service Name: Dev B Service RecHandle: 0x10000 Service Class ID List: "Serial Port" (0x

关于Debian Jessie 8.2: 我正在尝试创建以下设备:/dev/rfcomm0,以便通过蓝牙模块HC-05连接我的arduino,但未成功。 以下是我将遵循的步骤:

1) 我想我的HC-05名为FOO,已经被识别并正确配置,因为

hcitool scan
报告

98:D3:31:xx:xx:xx   FOO
Service Name: Dev B
Service RecHandle: 0x10000
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding:    0x6a
base_offset: 0x100
xx只是我在这里为了隐私而使用的一个面具

2) 我添加了文件/etc/bluetooth/rfcomm.conf

rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device 98:D3:31:xx:xx:xx;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment "FOO";
}
3) 我重新启动了蓝牙服务

sudo /etc/init.d/bluetooth restart
答复是:

[ ok ] Restarting bluetooth (via systemctl): bluetooth.service.
但是,未创建设备rfcomm0。 我遵循这里的说明:

几个月前,我在另一个Linux系统(ubuntu)上做了这个操作,我还记得 一切进展顺利:港口建成了。也许我错过了一些重要的步骤
谢谢, 瓦莱里奥

更新:

此命令

sdptool records 98:D3:31:xx:xx:xx
报告

98:D3:31:xx:xx:xx   FOO
Service Name: Dev B
Service RecHandle: 0x10000
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding:    0x6a
base_offset: 0x100

我想这证实了rfcomm.conf中的通道是1

Ok,多亏了Kaylum,这一问题才得以解决

手动绑定创建设备rfcomm0

sudo rfcomm bind 0 98:D3:31:xx:xx:xx 1
然后,为了在创建的端口上进行处理写/读,
我需要以sudoer的身份运行处理,否则处理会说端口存在,但很忙。作为sudoer,我可以确认端口正确地在Arduino和Processing之间来回发送数据

手动绑定有效吗?也就是说,从命令行:
sudo rfcomm bind 0 98:D3:31:xx:xx:xx 1
Ye如果有效,将创建rfcomm0。尽管如此,港口还是很繁忙。我正在用一个处理草图测试它,该草图列出了可用的端口,然后尝试打开选定的端口。在这个测试中,我可以看到处理尝试打开端口“/dev/rfcomm0”,但失败了,响应是“打开串行端口/dev/rfcomm0:port busy时出错”更新:可能解决了!如果我以sudoer的身份运行处理,则端口结果正常!我现在要做一些通信测试,以检查通信是否正常!