mavsdk_drone_show

Deployment Quick Reference - Hardware Config Update

βœ… What’s Been Done

Updated Files: 14 total

CSV Structure:

OLD: hw_id,pos_id,x,y,ip,mavlink_port,debug_port,gcs_ip (8 columns)
NEW: hw_id,pos_id,x,y,ip,mavlink_port,debug_port,gcs_ip,serial_port,baudrate (10 columns)

πŸš€ Quick Deploy Guide

For This GCS/Development Machine

No action needed! Files already updated:

To verify:

python3 test_config_simple.py

For Remote Drones (After Git Sync)

The drones will automatically pull the updated config.csv via git sync.

If you have Raspberry Pi 5 drones, update their entries:

# Change from:
5,5,-2.5,-10.0,100.96.177.73,14555,13545,100.96.32.75,/dev/ttyS0,57600

# To:
5,5,-2.5,-10.0,100.96.177.73,14555,13545,100.96.32.75,/dev/ttyAMA0,57600
                                                          ^^^^^^^^^^^^

Then restart drone service:

ssh drone5
sudo systemctl restart coordinator

πŸ”§ Hardware Port Reference

Drone Type Serial Port Baudrate
Raspberry Pi 4 /dev/ttyS0 57600
Raspberry Pi 5 /dev/ttyAMA0 57600
Jetson /dev/ttyTHS1 921600
SITL N/A N/A

🎯 Common Tasks

Check Which Hardware a Drone Has

ssh drone_ip
cat /proc/cpuinfo | grep "Model"

Update Single Drone’s Serial Port

  1. Open Mission Config UI in dashboard
  2. Find the drone row
  3. Click Edit
  4. Select correct serial port from dropdown
  5. Save

Update All Drones to RP5

sed -i 's|/dev/ttyS0|/dev/ttyAMA0|g' config.csv

Verify CSV Structure

head -1 config.csv
# Should show: hw_id,pos_id,x,y,ip,mavlink_port,debug_port,gcs_ip,serial_port,baudrate

πŸ§ͺ Testing

Backend Test

python3 test_config_simple.py

Expected: All tests pass βœ“

Frontend Test

cd app/dashboard/drone-dashboard
npm start

Navigate to Mission Config β†’ verify new columns visible

Integration Test

  1. Update one drone’s serial_port in config.csv
  2. Git push (auto-commit should work)
  3. SSH to drone, verify config pulled
  4. Restart coordinator
  5. Check MAVLink connection

πŸ“‹ Rollback Procedure

If something goes wrong:

# Restore backups
cp config.csv.backup config.csv
cp config_sitl.csv.backup config_sitl.csv

# Revert code changes
git checkout HEAD~1 gcs-server/config.py
git checkout HEAD~1 functions/read_config.py
git checkout HEAD~1 src/drone_config.py
# ... (or just git reset --hard HEAD~1)

# Restart services
sudo systemctl restart gcs-server
sudo systemctl restart coordinator

πŸ“– Full Documentation


⚠️ Important Notes

  1. All RP4 drones work immediately (defaults to /dev/ttyS0)
  2. RP5 drones need manual update to /dev/ttyAMA0
  3. SITL mode unaffected (uses N/A values, ignored)
  4. Backward compatible - old CSVs auto-upgrade with defaults
  5. Git sync works - changes commit normally

πŸ› Troubleshooting

Issue: Drone not connecting after update

# Check serial port
ssh drone_ip
ls -la /dev/tty* | grep -E "ttyS0|ttyAMA0|ttyTHS1"

# Verify config loaded
cat config.csv | grep "^DRONE_HW_ID,"

Issue: CSV upload fails

Issue: Git auto-commit fails


βœ… Deployment Checklist

Before deploying to production:

After deploying:


πŸŽ‰ Success Criteria

βœ… All drones connect to Pixhawk βœ… MAVLink telemetry streaming βœ… Missions execute normally βœ… Git sync works βœ… Mixed hardware fleet operational (if applicable)


Quick Help: If stuck, check test_config_simple.py output for specific error details.