Diagnostics & Troubleshooting

Verifying Host Bluetooth Daemon

Before launching the backend container, ensure the BlueZ service is running on the Linux host:

sudo systemctl status bluetooth
# If inactive:
sudo systemctl start bluetooth

Scan for the advertising device to confirm signal presence:

bluetoothctl scan on

Inspecting Container Logs

# Stream backend logs
docker compose logs -f backend

# Stream InfluxDB ingestion logs
docker compose logs -f influxdb

Common Issues & Mitigations

IssueRoot CauseSolution
Backend fails on D-Bus connectionBlueZ stopped or socket unmountedCheck systemctl status bluetooth and ensure /var/run/dbus is mounted.
GATT characteristic read failsBLE peripheral disconnected or low batteryCheck ESP32 power rail and verify advertising packets via bluetoothctl.
WebSocket disconnects immediatelyPort 8000 blocked or frontend misconfiguredCheck docker ps to verify backend container is healthy on host network.