Fireman Protocol Hardware Integration Review
Source
Reviewed the uploaded Fireman-EMS-Responder_Protocol-main.zip repository.
Repository Role
The repository is a deterministic Rust no_std egress-routing library. It provides hazard-aware route planning and emits a cardinal haptic command contract, but deliberately leaves BLE transport and physical haptic dispatch to downstream firmware.
Existing Command Contract
The draft command format is:
- Header:
0x50
- Command byte: ASCII
N, E, S, W, or 0
0 means stop/no valid movement command.
No GATT UUIDs, packet version, sequence number, checksum, acknowledgement, timeout, telemetry, or retry behavior are defined.
Routing and Safety Semantics
- Clear edges use normal cost.
- Caution edges remain usable with a cost penalty.
- Blocked edges are excluded.
- A valid safe route emits a cardinal direction.
- No valid route, or arrival at the destination, emits STOP (
0).
- Routing uses fixed-capacity arrays, integer math, saturating addition, no heap, and no floating point.
Required Kinethic Band Adapter
Phase 1 firmware must add a hardware-facing adapter that maps route commands to the four ERM channels:
- H1: fixed palmar / connection side.
- H3: fixed dorsal side.
- H2 and H4: lateral channels whose left/right meaning swaps according to the wrist selection stored by the Android app.
- STOP: all motor channels off immediately.
The exact mapping between protocol N/E/S/W and H1–H4 must be configured in the app/firmware coordinate transform rather than assumed by the routing library.
Missing Protocol Definitions
The Phase 1 implementation still needs:
- BLE service and characteristic UUIDs.
- Versioned packet structure.
- Sequence number and duplicate handling.
- Command expiry/watchdog timeout.
- Explicit emergency STOP behavior.
- Pulse duration, cadence, and basic intensity fields.
- Left/right wrist configuration and persistence.
- Battery, charging, BLE state, and three-temperature telemetry.
- Thermal and low-battery safety thresholds.
- RGB LED priority and blink-state definitions.
- Motor self-test and stuck-on protection behavior.
Recommended Phase 1 Packet Extension
Preserve compatibility with the existing 0x50 + direction draft while adding a versioned characteristic payload containing:
- Header/version
- Sequence number
- Direction command
- Intensity
- Pulse-on duration
- Pulse-off duration/cadence
- Repeat count or command duration
- Flags, including immediate STOP
- Integrity check if the transport/runtime requires it
Hardware Implications
The current four independent MOSFET-driven ERM channels are appropriate because the repository only requires discrete location, cadence, duration, and basic intensity. The BLE MCU firmware—not the routing crate—must implement PWM, watchdog shutdown, wrist mapping, telemetry, charging-state reporting, temperature safety, and LED status.
Integration Decision
Treat the repository as the upstream deterministic route engine and minimal direction-command draft, not as the complete wearable firmware specification. The Kinethic Band schematic should retain four independently controlled motor channels and sufficient MCU interfaces for battery measurement, skin/ambient/battery temperature sensing, RGB indication, charging status, and BLE communication.