Files
orin-nano-env-setup/docs/impl/reports/MOSQUITTO.md
T

49 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
type: report
date: 2026-10-12
---
# Mosquitto: the bus on the car Orin
The message bus (project-yukart decision 4), installed on the car unit.
## Install
```bash
sudo apt-get install mosquitto mosquitto-clients # 2.0.11-1ubuntu1.2 on Ubuntu 22.04
```
`/etc/mosquitto/conf.d/yukart.conf`:
```
# Yukart bus. Local only: displays reach it through svc-gw, never directly.
listener 1883 127.0.0.1
allow_anonymous true
```
`systemctl enable --now mosquitto`. It listens on `127.0.0.1:1883` only, so
anonymous access is local access; nothing on the LAN, the tailnet or LTE can
reach it.
## Behaviour worth knowing
- **Retained messages survive a reboot.** Ubuntu's `mosquitto.conf` sets
`persistence true` (`/var/lib/mosquitto/`), so after a reboot the broker
hands out the last values from before it. svc-gw therefore treats a value
known only from a retained copy as stale until a live one arrives.
- Units that use the broker order themselves `After=mosquitto.service` and
nothing else, and reconnect by themselves when it restarts.
- Startup tier 1 (project-yukart `docs/ORIN-RUNTIME.md`).
## First use
`orin-status` (svc-core) publishes the Orin's health on `yukart/host/<signal>`
once a second; `svc-gw` subscribes and serves it to the tablet. Watching it:
```bash
mosquitto_sub -v -t 'yukart/#'
```
## Not checked yet
- Throughput at raw CAN rates (`yukart/can/raw`, ~1000–3000 frames/s).