-
Notifications
You must be signed in to change notification settings - Fork 119
Hello.
I have very often this type of errors.
Is it means that somebody else is connecting to my BMS?
INFO [basebms] CER2601-022-030-020|D768: failed to initialize BMS connection (BleakDeviceNotFoundError)
ERROR [sampling] <bmslib.models.BLE_BMS_wrap.BMS object at 0x7f127dd70980> device not found, retry in 7 seconds (could not connect to 24:19:72:18:D7:68: [Errno 16] Resource busy: 'l2cap connect to 24:19:72:18:D7:68')
INFO [basebms] CER2601-022-030-020|D768: failed to initialize BMS connection (BleakDeviceNotFoundError)
ERROR [sampling] <bmslib.models.BLE_BMS_wrap.BMS object at 0x7f127dd70980> device not found, retry in 11 seconds (could not connect to 24:19:72:18:D7:68: [Errno 16] Resource busy: 'l2cap connect to 24:19:72:18:D7:68')
...
ERROR [basebms] CER2601-022-030-020|D768: TX BLE request error (BleakError)
...
INFO [bt] bt_diagnostics 24:19:72:18:D7:68: NOT seen during 3.0s scan on adapter=default (adapters=[{'index': 0, 'name': 'hci0', 'mac': '8A:88:4B:61:CA:44', 'bus': 'USB'}]) (26 other devices in range)
...
ERROR [main] 1 exceptions occurred fetching BMSs
ERROR [sampling] Error (num 1, max 200) reading BMS: TimeoutError at aiobmsble/basebms.py:435 in _await_msg()
Regards.
All reactions
Replies: 1 comment 1 reply
No, most likely nobody over the air — it is something on your own Pi.
You are running ble_stack: bluek. That message is the kernel refusing the L2CAP connect with EBUSY, and there is only one place it can come from:
/* net/bluetooth/l2cap_core.c, l2cap_chan_connect() */ if (cid && __l2cap_get_chan_by_dcid(conn, cid)) { /* cid = 0x0004, the ATT channel */ hci_conn_drop(hcon); err = -EBUSY;
So the host already has a link to the BMS and something local already owns its ATT channel — normally bluetoothd, i.e. Home Assistant's own Bluetooth integration or another add-on that connected to the BMS. Unlike the BlueZ/D-Bus stack, which multiplexes one ATT channel between its clients, bluek needs CID 4 for itself, so it cannot share.
That also explains the other line: a peripheral stops advertising while it is connected, so the scan does not see it. One cause, two symptoms — not range, not a phone.
Check on the host:
bluetoothctl info 24:19:72:18:D7:68 # "Connected: yes" -> something local owns it
btmgmt con
Two fixes: keep HA's Bluetooth integration away from that MAC (ignore the discovered device), or set ble_stack: bleak so batmon and HA share bluetoothd's link.
I have also changed bluek: it now drops the offending link via mgmt before retrying, and reports BleakDeviceBusyError naming the real cause instead of "device not found". That will be in the next release.
All reactions
I'm running Home Assistant (HAOS) in Proxmox container.
I bought second battery and those errors are more often:
ERROR [basebms] CER2601-022-030-020|D768: TX BLE request error (BleakError)
ERROR [sampling] Error (num 1, max 200) reading BMS: TimeoutError at aiobmsble/basebms.py:435 in _await_msg()
Actually every 2-3 min.
When I run btmgmt con command I got Too small (0 bytes) get_connections rsp error
So I have no idea what to do.
I opened box and make photo of BMS.
IMG_20260904_163915
IMG_20260904_172928
BatMON recognizes it as BraunPWR.