ECLIPTIC Protocols — the seams The fleet bus

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

GroupPortSenderReceivers
Telemetry (NMEA)239.7.7.1010110:beaconEvery :app tablet; zvision's $ZAUD listener
Threats (ZTHREAT) + coverage (ZCOVER, 1 Hz + on change)239.7.7.2010120zvisionEvery :app tablet
Shared nav target ($ZNAV)239.7.7.3010130A nav-authority :app tabletEvery :app tablet
Build version ($ZVER)239.7.7.4010140Every node: :beacon, every :app tablet, zvisionEvery :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.

Android multicast gotcha, handled

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.

PartFile
:appapp/src/main/java/org/pureagave/zodiac/control/core/net/FleetBus.kt
:beaconbeacon/src/main/java/org/pureagave/zodiac/beacon/TelemetryBroadcaster.kt
zvisionjetson/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

ChannelSourceConsumersPayloadStatus
Vehicle telemetry:beaconAll tabletsRaw GNSS NMEA verbatim + $GPHDT + $ZTLMBuilt
Sensor channels:beaconAll tablets$ZAUD $ZENV $ZSHK $ZBCN $ZODOBuilt
Thermal threatszvisionAll tablets, DMX lightZTHREAT framesBoth ends built; cameras now streaming, ring & detector pending
Shared nav target ($ZNAV)Nav-authority tablet (S9+, A54)All tabletsActive drive-to target, 239.7.7.30:10130Built & verified device-to-device
Camera coverage (ZCOVER)zvisionAll tabletsArcs a live camera can see, 239.7.7.20:10120Built
Build-version report ($ZVER)Every node (beacon, tablets, zvision)All tabletsFleet build identity, 239.7.7.40:10140Built
Vehicle commands—VehicleHeading / speedPlanned — transports are fake
Raw thermal videozvisionOpt-in viewersMJPEG / RTSPPlanned

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

    $ZVER build version

    An 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 from
docs/PROTOCOLS.md §1, §5, §6 · ARCHITECTURE.md §3 · README.md