Troubleshooting
Common Issues
Serial Port Not Found
Symptom:
[SERIAL] Error: /dev/ttyUSB0 not found
Solutions:
Check USB connection:
ls /dev/tty*Verify ESP32 is powered (LED on DevKit)
Try alternative ports:
/dev/ttyACM0,/dev/ttyAMA0Check Docker device mount:
/dev:/devin docker-composeAdd user to dialout group:
sudo usermod -a -G dialout pi
No Sensor Data
Symptom: /api/latest returns empty or zero values
Solutions:
Check serial monitor for ESP32 boot messages
Verify sensor wiring (I2C pull-ups, UART TX/RX not swapped)
Restart ESP32: unplug/replug USB
Check CRC errors:
/api/status→crc_errorsshould be 0Reflash ESP32 firmware
Kogger Not Detected
Symptom: ka.alive == false or kb.alive == false
Solutions:
Check Kogger power (12V supply, LED indicator)
Verify UART baud rate (921600 on both sides)
Check GPIO pins (16/17 for A, 25/26 for B)
Test Kogger with desktop KoggerApp (USB-UART adapter)
Check BB55 frame parsing: enable debug logs
IMU No Data
Symptom: imu.alive == false, roll/pitch/yaw = 0
Solutions:
Verify SoftwareSerial pins (GPIO 13 RX, 15 TX)
Check HWT905 power (3.3V or 5V, check datasheet)
Test IMU standalone with Serial Monitor @ 9600 baud
Verify binary protocol (0x55 packets)
Check for SoftwareSerial conflicts (max 3 active instances)
GPS No Fix
Symptom: gps.alive == true but lat == 0, lon == 0
Solutions:
GPS needs outdoor clear sky view (no fix indoors)
Allow 30-60s cold start acquisition time
Check NMEA sentences with Serial Monitor
Verify SoftwareSerial RX (GPIO 27) → GPS TX
Check antenna connection (active antenna needs power)
I2C Sensors Fail
Symptom: MS5837 or TSYS01 not detected
Solutions:
Check pull-up resistors (4.7kΩ on SDA+SCL to 3.3V)
Verify I2C addresses (
0x76MS5837,0x77TSYS01)Shorten I2C wires (<10cm for reliability)
Test with
i2cdetect -y 1on Raspberry PiCheck for address conflicts (no other devices on 0x76/0x77)
WebSocket Connection Failed
Symptom: Dashboard can’t connect to WS
Solutions:
Check service is running:
docker psVerify port mapping:
netstat -tuln | grep 8766Check firewall:
sudo ufw statusTest with
websocat ws://192.168.0.174:8766Check browser console for CORS/network errors
High CRC Errors
Symptom: /api/status → crc_errors > 100
Solutions:
Check USB cable quality (use shielded cable)
Verify baud rate match (115200 both sides)
Reduce USB cable length (<3m)
Check for EMI sources (motors, servos)
Try lower baud rate (57600)
MAVLink Not Working
Symptom: ArduPilot doesn’t receive MAVLink messages
Solutions:
Verify
MAVLINK_ENABLED=1in docker-composeCheck target IP/port:
MAVLINK_TARGET=192.168.2.2:14401Test with MAVProxy:
mavproxy.py --master=udp:192.168.0.174:14401Check firewall on ArduPilot side
Verify SysID/CompID in QGroundControl settings
Docker Container Crashes
Symptom: Container exits immediately
Solutions:
Check logs:
docker compose logs slam-hubVerify Python dependencies: rebuild image
Check serial device permissions
Run container manually:
docker run -it --rm bluerov-slam-hub:latestCheck for port conflicts (8099/8766 already in use)
Waterfall Display Not Rendering
Symptom: Kogger viewer loads but no waterfall data
Solutions:
Check UDP packets arriving:
tcpdump -i any port 14555Verify kogger-viewer logs:
docker compose logs kogger-viewerCheck BB55 parsing stats:
/api/status→a_bb55,b_bb55Test with desktop KoggerApp (should also receive UDP)
Check for BB55 frame corruption
Performance Issues
High Latency (>500ms)
Causes:
Network congestion
CPU overload on Raspberry Pi
Large WebSocket message queue
Solutions:
Reduce sensor polling rate (ESP32: increase delay)
Limit WebSocket clients (close unused connections)
Check Pi CPU usage:
htopOptimize Docker resource limits
Use Ethernet instead of WiFi
Dropped Frames
Causes:
Serial buffer overflow
USB bandwidth limits
Slow disk I/O (JSONL logging)
Solutions:
Increase serial buffer size (ESP32 code)
Reduce Kogger data rate (lower ping frequency)
Disable JSONL logging if not needed
Use faster SD card (UHS-I or better)
Mount logs to tmpfs (RAM disk)
Debugging Tools
Serial Monitor
Real-time ESP32 debug output:
pio device monitor --baud 115200
Docker Logs
Service debug output:
docker compose logs -f --tail=100 slam-hub
docker compose logs -f --tail=100 kogger-viewer
HTTP Debug
API endpoint testing:
curl -v http://192.168.0.174:8099/health
curl http://192.168.0.174:8099/api/status | jq
WebSocket Debug
Real-time message inspection:
websocat ws://192.168.0.174:8766
websocat ws://192.168.0.174:8101
Network Debug
UDP packet capture:
# Capture Kogger UDP
tcpdump -i any -n port 14555 -w kogger_a.pcap
# Capture MAVLink
tcpdump -i any -n port 14401 -w mavlink.pcap
I2C Debug
Scan I2C bus:
# On Raspberry Pi (if sensors connected directly)
i2cdetect -y 1
GPIO Debug
Check ESP32 pin state:
// Add to ESP32 code
Serial.printf("GPIO16 (Kogger A RX): %d\\n", digitalRead(16));
Serial.printf("GPIO21 (I2C SDA): %d\\n", digitalRead(21));
Known Limitations
SoftwareSerial: Max 3 active instances (ESP32 interrupt limit)
I2C bus length: <10cm for reliable 100kHz operation
USB serial baud: 115200 max (Pi USB-UART chip limitation)
Kogger compression: 4:1 decimation — some detail loss
MAVLink: No acknowledgments (fire-and-forget UDP)
Getting Help
Check this troubleshooting guide
Review logs (
docker compose logs)Test with minimal configuration (disable non-essential sensors)
Open GitHub issue: https://github.com/flagabat/bluerov-slam/issues
Contact: baptiste.moulin@gmail.com