The Jaia bots and hubs communicate using several types of wireless radio:
These comms links can be visualized as:
Not all fleets will have all communications links. The minimum for a functioning system is currently:
Depending on the fleet hardware configuration and deployment needs, one or more of these links can be enabled to be used simultaneously for operational communications (BotStatus, Command, etc.). For data offload, only the WIFI link is used.
Bot to Hub communications (and vice-versa) is based on the intervehicle layer of the Goby3 middleware. This is a publish/subscribe model, with explicit messages sent to initiate actual communications over the radio link (subscription forwarding).
Each physical radio is interfaced with using a driver implemented from goby::acomms::ModemDriverBase
:
jaiabot
repository in the src/lib/comms/xbee
directoryjaiabot
repository in the src/lib/comms/wifi
directory.Data offload is not sent via Goby3 but rather uses rsync
over SSH.
The XBee radios (Digi XBee-PRO 900HP S3B Radio) have two operating modes. They can act as wireless serial ports in their default "transparent" mode, or they can act as packet-based radios in their "API" mode. The Jaia XBee driver uses the radios in the "API" mode which uses a combination of AT commands (Hayes radio) and Digi API (binary) commands over serial.
See this document for documentation on the XBee radio and its software interface:
The XBee driver is comprised of two main components:
jaiabot::comms::XBeeDriver
which implements goby::acomms::ModemDriverBase
jaiabot::comms::XBeeDevice
which talks directly to the serial device and XBee radio. Each XBeeDriver
contains an XBeeDevice
.The XBee driver takes the following configuration (within gobyd
's configuration) as an extension to the goby.acomms.protobuf.DriverConfig
Protobuf message (see jaiabot/src/lib/messages/xbee_extensions.proto
):
The encryption
settings must match for the fleet.
An example configuration for hub 1 in a two bot/two hub fleet is:
and for bot 0 in the same fleet:
The XBeeDriver converts the required parts of goby::acomms::protobuf::ModemTransmission
(with a single data frame, max_frame_size = 1) into the xbee::protobuf::XBeePacket
Protobuf/DCCL message and encodes it using DCCL (but removes the 2 ID bytes as these are unnecessary as the XBeePacket is the only message sent on the XBee link). This resulting encoded DCCL message (minus the first 2 bytes) is sent as the payload of the XBee API Transmit Request (0x10) message.
ACKS are implemented by sending an XBeePacket with type = ACK
set and the appropriate acked_frame
for the frame being acked.
XBeePacket
is defined in jaiabot/src/lib/comms/xbee/xbee.proto
. The XBee radios have a packet payload size of 256 bytes. With the required header items from ModemTransmission
, the XBeeDriver can currently support DCCL message payloads up to 250 bytes (max_frame_size = 250).
Jaia fleets can support multiple hubs within a fleet (either physical Hubs or a CloudHub). For physical hubs, this is managed using the same physical XBee serial ID for all hubs, and the same Goby modem_id.
The single modem id 1
is used for all hubs. Thus, within a given subfleet, modem id 1
is always the hub, and modem ids 2
to N+2
are used for all the bots 0 to N.
The following sequence diagram illustrates this process by using the example of hub0 and hub1 being used together in the same fleet. hub1 is turned on (or the bots come into range of hub1) at some later time.
The bots will re-subscribe regularly (currently every 60 seconds on XBee), which ensures that a Hub that is present later (or reboots) will always get the subscriptions after no more time has passed than the re-subscription interval.
The HUB2HUB link provides UDP messaging between hubs using the CloudHub VPN. This uses the same Goby intervehicle comms as the Bot/Hub communication, and uses the same driver as the WIFI link.
At this time, a single message (jaiabot::protobuf::Hub2HubData
) is used on this communications link. Each hub subscribes to all the other hubs defined in the /etc/jaiabot/inventory.yml
, and resubscribes regularly in the event of a hub reboot or later power-on of a hub.
Iridium satellite communications provides global coverage using the Short Burst Data (SBD) message protocol. While this provides the convenience of fully remote and over-the-horizon operations, it introduces some additional complexity for setup.
Iridium SBD is inherently asymmetric: The bots are equipped with a modem (Iridium 9603) that is referred to by Iridium as an "ISU" (Iridium Subscriber Unit). This device uses a Hayes-type protocol (AT messages) over serial and is managed by the Goby3 DRIVER_IRIDIUM driver.
The hub is virtualized (CloudHub: see Cloud Computing) and runs effectively a TCP client/server pair for inbound/outbound communications using Iridium's "DirectIP" protocol from to and from their servers. This is a binary protocol unrelated to the Hayes protocol on the bot side and is managed by the Goby3 DRIVER_IRIDIUM_SHORE driver.
Some more terminology:
For security (by not directly exposing ports on Cloudhub) and as Iridium charges for each IP address provisioned to send MT messages, we have chosen to multiplex our SBD messages through a separate AWS server (iridium.jaia.tech / 44.233.97.88).
The figure below diagrams the flow for messages between the bots and hubs using this intermediate server, as well as Iridium's servers.
Communication between the Cloudhub and iridium.jaia.tech happens within the Cloudhub (Wireguard) VPN, where iridium.jaia.tech is assigned the address of hub25 (and Cloudhub is hub30 as usual).