Telemetry Format
Each smart buoy transmits a telemetry packet at configurable intervals (default: every 15 minutes when idle, immediately on catch events).
Packet Layout
Section titled “Packet Layout”The telemetry payload (opcode 0x81) contains 24 bytes:
| Offset | Size | Field | Unit | Description |
|---|---|---|---|---|
| 0 | 4 | latitude | 1e-7 degrees | Signed 32-bit, WGS84 |
| 4 | 4 | longitude | 1e-7 degrees | Signed 32-bit, WGS84 |
| 8 | 2 | depth_cm | centimeters | Pressure-derived depth |
| 10 | 2 | water_temp | 0.1°C | Signed 16-bit |
| 12 | 2 | battery_mv | millivolts | Buoy battery voltage |
| 14 | 1 | solar_state | enum | 0=dark, 1=charging, 2=full |
| 15 | 1 | door_state | enum | 0=locked, 1=unlocked, 2=fault |
| 16 | 1 | keeper_count | count | Classified keepers since last reset |
| 17 | 1 | bycatch_count | count | Classified bycatch since last reset |
| 18 | 1 | release_count | count | Autonomous releases since last reset |
| 19 | 1 | classification_mode | enum | 0=auto, 1=manual, 2=log-only |
| 20 | 2 | uptime_hours | hours | Time since last reboot |
| 22 | 1 | rssi | dBm | Last received signal strength |
| 23 | 1 | flags | bitfield | See flag table below |
Flags Bitfield
Section titled “Flags Bitfield”| Bit | Name | Description |
|---|---|---|
| 0 | DRIFT_ALERT | Position has moved > 50m from deployment point |
| 1 | LOW_BATTERY | Battery below 3.3V |
| 2 | CAMERA_FAULT | ESP32-CAM not responding |
| 3 | SERVO_FAULT | Door servo not responding |
| 4 | GPS_FIX | 1 = valid fix, 0 = no fix |
| 5 | IMAGE_PENDING | Captured image waiting for download |
| 6–7 | Reserved |
Telemetry Schedule
Section titled “Telemetry Schedule”| Condition | Interval |
|---|---|
| Idle, no catch | Every 15 minutes |
| Catch event | Immediate (within 2 seconds) |
| Alert condition | Immediate + every 5 minutes until resolved |
| Sleep mode | Disabled (wake-on-command only) |
Decoding Example
Section titled “Decoding Example”typedef struct __attribute__((packed)) { int32_t latitude; // 1e-7 degrees int32_t longitude; // 1e-7 degrees uint16_t depth_cm; int16_t water_temp; // 0.1°C uint16_t battery_mv; uint8_t solar_state; uint8_t door_state; uint8_t keeper_count; uint8_t bycatch_count; uint8_t release_count; uint8_t classification_mode; uint16_t uptime_hours; int8_t rssi; uint8_t flags;} telemetry_t;