collector: RSSI of connected sensors via kernel mgmt API

BlueZ fills Device1.RSSI only while scanning; sensors connect to us, so
the field stayed empty. MGMT_OP_GET_CONN_INFO (like btmgmt conn-info)
returns the link RSSI; polled per connected sensor and after each write.
Needs CAP_NET_ADMIN (AmbientCapabilities in the collector unit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 10:58:05 +00:00
co-authored by Claude Opus 5.5
parent 56d635f051
commit 392095d549
5 changed files with 172 additions and 8 deletions
+3
View File
@@ -16,6 +16,9 @@ TimeoutStartSec=90
User=buttontask
Group=buttontask
SupplementaryGroups=bluetooth
# Link RSSI of connected sensors via the kernel Bluetooth mgmt API
# (collector/mgmt.py): that command needs CAP_NET_ADMIN.
AmbientCapabilities=CAP_NET_ADMIN
WorkingDirectory=/opt/buttontask/current/collector
Environment=BUTTONTASK_ROOT=/opt/buttontask
Environment=PYTHONUNBUFFERED=1