我在YOCTO上运行,我只使用hci_get_route()做了一个简单的sw,以便了解它是如何工作的。在运行应用程序之前,我已经激活了蓝牙:
systemctl enable bluetooth.service
systemctl start bluetooth.service
并检查状态与
systemctl status bluetooth.service
响应是“运行”,所以我运行应用程序,但是
hci_get_route
返回一个错误的id和errno是“没有这样的设备”。我忘了什么?
谢谢
发布于 2022-04-19 11:25:30
下面是通过命令行激活BT接口的命令:
brcm_patchram_plus --patchram /etc/firmware/BCM43430A1.1DX.hcd --enable_hci --no2bytes --tosleep 50000 --baudrate 1000000 --use_baudrate_for_download /dev/ttyUSB0 & hciconfig -a
hciattach /dev/ttyUSB0 any
hciconfig hci0 up
在这三个步骤之后,hcitool dev
显示bt接口,hci_get_route
的调用工作。在重新启动hw之后,步骤1是不必要的,您只需要执行步骤2和3。
https://stackoverflow.com/questions/71920958
复制相似问题