Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bluetooth 使用buildroot raspberry pi 3 hciattach进行bcm43xx_初始化时超时_Bluetooth_Raspberry Pi3_Bluez_Buildroot - Fatal编程技术网

Bluetooth 使用buildroot raspberry pi 3 hciattach进行bcm43xx_初始化时超时

Bluetooth 使用buildroot raspberry pi 3 hciattach进行bcm43xx_初始化时超时,bluetooth,raspberry-pi3,bluez,buildroot,Bluetooth,Raspberry Pi3,Bluez,Buildroot,我正在尝试让蓝牙在树莓皮3工作 我将buildroot用于: BlueZ 5.45更改了软件包以获取最新版本 不使用systemd,但我运行Bluetooth,因为 bluez脚本是针对systemd的。 在buildroot中,我启用了bt固件。 我可以看到hci_uart.ko文件和蓝牙固件hcd文件 我从cmdline.txt中删除了console=TTYAM0115200 我为busybox添加了rfkill,但我只看到wifi接口,没有蓝牙接口。 运行: hciattach /dev/

我正在尝试让蓝牙在树莓皮3工作

我将buildroot用于:

BlueZ 5.45更改了软件包以获取最新版本 不使用systemd,但我运行Bluetooth,因为 bluez脚本是针对systemd的。 在buildroot中,我启用了bt固件。 我可以看到hci_uart.ko文件和蓝牙固件hcd文件 我从cmdline.txt中删除了console=TTYAM0115200 我为busybox添加了rfkill,但我只看到wifi接口,没有蓝牙接口。 运行:

hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
产出显示:

bcm43xx_init
Initialization timed out
试了115200次,还是一样

注:

当使用Bluez3时,我得到的id无效 我读到它在某种程度上与BlueZ版本有关,所以我确实采用了最新版本 所有这些都是经过深入搜索后拍摄的

那么我在这里错过了什么

如何让蓝牙在我的Raspberry Pi 3中开始运行 使用buildroot作为图像创建者


谢谢大家!

如添加固件的提交中所述,不幸的是,您需要修补bluez5_utils以使固件正常工作:


主要问题是buildroot添加了pi3 miniuart bt覆盖 在config.txt中

要删除它,我们需要将if作为上述脚本的参数从post-image.sh脚本中删除

在raspberry pi 3中,ttyAMA0被分配给蓝牙,pi3 miniuart bt将其恢复为串行com端口,从而再次断开蓝牙连接

总结buildroot中的步骤

添加蓝牙固件。 添加bluez5-utils。 将包从bluez 5.44更改为5.45 加上上面的睡眠。删除bluez中的.stamp_build以重新构建它 从cmdline.txt中删除/dev/ttyam0 构建后,检查目标pi3

BCM4343 hcd固件 hci_uart.ko应该在那里 hci_uart仅在systemd中的busybox init情况下不运行 因此,只需使用modprobe hci_uart即可。运行lsmod以查看它是否正在运行

要启动服务并加载固件,请使用hciattach:

hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
启动Bluetooth守护程序:

/usr/libexec/bluetooth/bluetoothd &
使用bluetoothctl Power on和agent on为蓝牙硬件通电。 现在您应该可以使用hcitooldev看到它

同样,如果您不删除覆盖,您将获得超时

就是这样。现在应该可以看到hci设备。 您可以通过以下方式查看它:

rfkill list从busybox menuconfig安装它 hciconfig-a
上述步骤无法使控制台在Pi 3上正常工作,但这是另一回事。

我正在使用buildroot 05.2017,因此此修补程序已经存在。我遵循代码并确保没有创建指向/etc/固件的链接,因此我在raspi中手动创建了它。但我仍然有时间,我使用的是busybox init而不是systemd,这可能是问题所在吗?因为bluez脚本使用systemd。即使您使用的是Buildroot 2017.05,bluez5_utils仍然没有使用上面提交中提到的补丁进行修补。查看丑陋的补丁。我添加了它没有帮助的补丁。所以我添加了一些printf来查看:它发生在对bcm43xx_reset的第一次调用中,在read_hci_事件中是返回timeout的事件。我没有/dev/hci0