本帖最后由 ciasdmxhxjjpd@c 于 2023-2-18 17:39 编辑
RT,
前置条件
n1 ,跑的是 openwrt,https://github.com/0neday/Phicomm-N1-pure-openwrt,ha 是docker 部署的。
根据此贴,https://bbs.hassbian.com/thread-11966-1-1.html,添加BCM4345C0.hcd蓝牙驱动。
opewrt 安装必要的 bluez-utils
log 日志如下
root@OpenWRT:~# hciconfig
hci0: Type: Primary Bus: UART
BD Address: 43:45:C0:00:1F:AC ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:4462 acl:0 sco:0 events:428 errors:0
TX bytes:65117 acl:0 sco:0 commands:416 errors:0
scan ble
root@OpenWRT:~# hciconfig hci0 up
root@OpenWRT:~# hcitool lescan
LE Scan ...
A4:C1:38:63
说明,能正常扫描到。
HA 蓝牙接入
ha 里添加 xiaomi ble 提示如下错误
根据 ha 给的 蓝牙建议
https://www.home-assistant.io/integrations/bluetooth/
加了 dbus 映射
/var/run/dbus:/run/dbus:ro
重启后,成功了
添加后,xiaomi ble 就自动发现了
重启
写入 /etc/rc.local
sleep 30
hciconfig hci0 up
|