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:
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:
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.
A single message type (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.
The Hub2HubData message carries one of the following payloads:
All Hub2HubData processing takes place in jaiabot_hub_manager. When it receives a Hub2HubData message from another hub via the HUB2HUB intervehicle link, it calls handle_hub2hub_data() which dispatches on the payload type:
This section written by Claude
The REST API treats a remote_command as another hub's operator taking control. It sets controlling_client_id to hubN, where N is the from_hub_id, so each JCC on this hub shows Take Control. It skips the commands a hub sends by itself (DATA_OFFLOAD_COMPLETE and DATA_OFFLOAD_FAILED), and commands from a hub whose own portal it is connected to, since those came from its own clients. Taking control without sending a command is not relayed between hubs.
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 / 182.30.43.121, in AWS GovCloud).
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).
This section written by Claude
When jaia_comms_mode includes iridium, the simulator launches stand-ins for the modem and for Iridium's servers from config/launch/simulation/iridium/, using virtual_iridium:
To simulate Iridium, add i to the comms argument of generate_all_launch.sh, for example ./generate_all_launch.sh 1 10 i for Iridium only or wi for WiFi and Iridium. The Docker simulator takes the same letters in JAIA_SIM_COMMS. Any jaia_iridium_sim_args (JAIA_SIM_IRIDIUM_ARGS in Docker) are passed to each Iridium9602.py; for example, --sbdix_failure_rate 0.2 fails a fifth of SBD sessions, and --csq 1 reports a signal below the driver's default sbd_min_signal_strength of 2.
This section written by Claude
Every hub runs a DNS server (dnsmasq, as the jaiabot_dns service) that resolves the names of all the bots and hubs in its fleet, so that neither operators nor tooling need to look up an address from the jaia ip scheme:
Each node answers to four names, for example bot 3 of fleet 2 (10.23.2.103):
| Name | Notes |
|---|---|
| bot3 | the short name, without the fleet |
| bot3.jaia | the same name in the fleet DNS domain |
| bot3-fleet2 | the machine's actual hostname |
| bot3-fleet2.jaia |
In addition, hub resolves to whichever hub answered the query, which is the name the Apache virtual host serving the JCC uses (so http://hub/ reaches the JCC of the hub you are using), and cloudhub is an alias for hub30.
Names are served for the whole of the addressing scheme - every bot and hub id it allows on the fleet WLAN (jaia admin bounds), plus the CloudHub on the CloudHub VPN - rather than for the nodes listed in /etc/jaiabot/inventory.yml. Adding a bot to a fleet therefore requires no change on the hub, and a name can never resolve to something other than what jaia ip reports. The reverse (10.23.2.103 to bot3.jaia) is served as well.
Anything that is not a fleet name is forwarded to the upstream nameservers the hub itself uses, so the hub's DNS can be the only one a client needs. A name in the .jaia domain that is not a fleet name is answered NXDOMAIN rather than forwarded.
jaia-update-dns.sh generates /etc/jaiabot/dnsmasq.conf and /etc/jaiabot/dns-hosts from the fleet id, and points the hub's own /etc/resolv.conf at 127.0.0.1 (keeping the upstream nameservers as fallbacks, so the hub still resolves public names if dnsmasq is stopped). It runs from the jaiabot-embedded postinst and again before dnsmasq starts, so a change of fleet id takes effect on the next reboot.
The DNS domain is jaia; set jaia_network_dns_domain in /etc/jaiabot/network.env to use a different one. .local is deliberately not used, as it is reserved for multicast DNS (RFC 6762).
Only a physical hub of a runtime fleet serves DNS. Bots do not run a DNS server, a fleet in simulation mode does not (several simulated hubs typically share one machine, and so one port 53), and neither does the CloudHub, which is reachable from the public internet where an open resolver is a liability.
The bots and any laptop on the fleet WiFi keep resolving through their own nameservers by default: a hub that is powered off should not be able to take name resolution with it. To use a hub's DNS from another machine, add it as that machine's first nameserver, for example on a bot:
The fleet WiFi firewall rules allow this; the rules for any other network do not (see jaia-update-ufw-rules.sh), so the DNS server is not reachable when a hub is connected to a network other than its fleet's.