Protocols · the seams
The fleet bus
The three parts of Zodiac share no code. They agree through three cross-codebase wire formats on
the fleet bus — NMEA, ZTHREAT (with its ZCOVER coverage companion) and
$ZVER — plus $ZNAV, over which the tablets share one piece of state
among themselves. This section is the byte-level
reference — it is the most valuable document in the repository, because it is the only place
the codebases actually meet.
The channels
| Group | Port | Sender | Receivers | |
|---|---|---|---|---|
| Telemetry (NMEA) | 239.7.7.10 | 10110 | :beacon | Every :app tablet; zvision's $ZAUD listener |
| Threats (ZTHREAT) + coverage (ZCOVER, 1 Hz + on change) | 239.7.7.20 | 10120 | zvision | Every :app tablet |
Shared nav target ($ZNAV) | 239.7.7.30 | 10130 | A nav-authority :app tablet | Every :app tablet |
Build version ($ZVER) | 239.7.7.40 | 10140 | Every node: :beacon, every :app tablet, zvision | Every :app tablet (log viewer FLEET tab) |
Multicast TTL is 1 — nothing leaves the vehicle's subnet.
239.0.0.0/8 is administratively scoped.
$ZNAV is the newest channel and the only app-to-app one: the fleet's
drive-to destination, so every tablet's DRIVER HUD points the same way. It is single-language
(:app only), so unlike NMEA and ZTHREAT it carries no cross-language drift
risk. $ZVER (239.7.7.40:10140) carries each node's build version every
10 s; the tablets show the roster in the log viewer's FLEET tab, and a golden corpus pins its
three implementations together. See
shared destination and the
bus-channel status table below.
TELEMETRY_GROUP = 239.7.7.10 TELEMETRY_PORT = 10110 TTL = 1
THREAT_GROUP = 239.7.7.20 THREAT_PORT = 10120
NAV_GROUP = 239.7.7.30 NAV_PORT = 10130 ($ZNAV, :app <-> :app)
VERSION_GROUP = 239.7.7.40 VERSION_PORT = 10140 ($ZVER, every node)
Every sender transmits twice
Each datagram goes out once to the multicast group and once to a subnet-directed broadcast. Some
access points silently drop multicast, and a fleet that goes blind because of an AP setting is not
acceptable. The beacon derives the broadcast address from the DHCP netmask (falling back to /24,
then to 255.255.255.255); the :app senders and zvision assume
/24.
Every receiver binds the wildcard address on the port and joins the
group, so it gets whichever copy arrives. The consequence is duplicate delivery — which is
why the tablet de-duplicates byte-identical $ZSHK lines within
200 ms.
The WiFi driver filters broadcast and multicast frames from apps to save power unless the app
holds a WifiManager.MulticastLock (with CHANGE_WIFI_MULTICAST_STATE).
Both NetworkLocationSource and NetworkThreatSource hold one.
Where the constants live
Declared in three mirrored places. There is no shared header; keeping them in step is a discipline, not a mechanism.
| Part | File |
|---|---|
:app | app/src/main/java/org/pureagave/zodiac/control/core/net/FleetBus.kt |
:beacon | beacon/src/main/java/org/pureagave/zodiac/beacon/TelemetryBroadcaster.kt |
zvision | jetson/zvision/fleet_bus.py |
FleetBus.TTL is now used on the app side too, by NavShareSender —
$ZNAV is the app's first device-to-device transmit path, where every prior
:app role was a receiver. Receivers never set TTL; it is purely a sender concern.
Every bus channel, built and planned
| Channel | Source | Consumers | Payload | Status |
|---|---|---|---|---|
| Vehicle telemetry | :beacon | All tablets | Raw GNSS NMEA verbatim + $GPHDT + $ZTLM | Built |
| Sensor channels | :beacon | All tablets | $ZAUD $ZENV $ZSHK $ZBCN $ZODO | Built |
| Thermal threats | zvision | All tablets, DMX light | ZTHREAT frames | Both ends built; cameras now streaming, ring & detector pending |
Shared nav target ($ZNAV) | Nav-authority tablet (S9+, A54) | All tablets | Active drive-to target, 239.7.7.30:10130 | Built & verified device-to-device |
Camera coverage (ZCOVER) | zvision | All tablets | Arcs a live camera can see, 239.7.7.20:10120 | Built |
Build-version report ($ZVER) | Every node (beacon, tablets, zvision) | All tablets | Fleet build identity, 239.7.7.40:10140 | Built |
| Vehicle commands | — | Vehicle | Heading / speed | Planned — transports are fake |
| Raw thermal video | zvision | Opt-in viewers | MJPEG / RTSP | Planned |
mDNS / DNS-SD (NsdManager) for richer service discovery and health remains
planned.
The cross-codebase formats
-
:beacon → :app
NMEA telemetry
Standard NMEA 0183 framing. Raw GNSS forwarded verbatim, plus seven synthesized sentence types carrying heading, IMU, mic level, lux, shock, beacon health and the odometer.
-
zvision → :app
ZTHREAT frames
One UDP datagram is one frame of contacts. Not NMEA: no leading
$, no checksum, an explicitly pinned numeric grammar, and a measured golden corpus that both test suites read. -
every node → :app
$ZVERbuild versionAn NMEA-style sentence every node sends every 10 s: who it is and which build it runs. Three hand-written implementations, pinned by their own golden corpus.
Converted fromdocs/PROTOCOLS.md §1, §5, §6 · ARCHITECTURE.md §3 · README.md