Expand description
§ados-hal-probe
Probe-first hardware capability detection for Linux single-board computers: CPU, SoC, USB, serial, V4L2 encoders and board profiles, read from the real silicon by the ADOS Drone Agent.
A board description can be wrong, ffmpeg -encoders lists wrapper codecs with no device behind them, and a vendor tool can advertise a feature it cannot deliver. This crate derives capabilities by probing the hardware itself: it reads sysfs and the device tree, issues V4L2 ioctls, or runs a bounded trial initialisation, and records the evidence behind each answer. Use it when software must decide what a board can really do before it relies on it.
use ados_hal_probe::board_sidecar::{detect_tier, load_profiles, match_profile};
// The bundled board profiles parse without any hardware attached.
let profiles = load_profiles();
assert!(!profiles.is_empty());
// Match a device-tree model string to its profile.
let board = match_profile(&profiles, "Raspberry Pi 5 Model B Rev 1.0").unwrap();
assert_eq!(board.soc, "BCM2712");
assert_eq!(board.stem, "rpi5");
// RAM decides the performance tier.
assert_eq!(detect_tier(8192), 4);§Highlights
- Capabilities come from probes, each paired with the evidence that produced it, not from declarations.
- Risky trial initialisations run in their own process group, which is killed as a whole on timeout, so a device stuck in an uninterruptible ioctl cannot hang the caller.
- Destructive probes run only in phases that allow them; read-only probes run in any phase.
- Board profiles are bundled in the crate and parsed at runtime, so detection needs nothing but the binary.
§How it works
The result types live in ados_protocol::hwcaps and are re-exported here; this crate owns the I/O.
probe: read-only probes for CPU core clusters (probe_cores), the SoC compatible string, USB ids, serial ports and the H.264 encoder (probe_h264_encoder).runner: runs a trial in a separate process group and sendsSIGKILLto the whole group on timeout.board_sidecar: the bundled board profiles, profile matching (override, device-tree compatible, model string,/proc/cpuinfo, in that order), RAM tiers and the resulting board fingerprint document.camera_probeandsensor_hub: camera and USB sensor hub presence.
Probe phases: stateful probes such as encoder trial initialisation run only when the ProbePhase permits it (Setup or BootPreArm, never Runtime while armed).
// Real probing reads the running host.
let cores = ados_hal_probe::probe_cores();
println!("{cores:?}");§Part of ADOS
Used in production by the ADOS Drone Agent, the onboard software of the ADOS software-defined drone platform. All ADOS crates · Docs · Discord
§Other ADOS crates
Platform (versioned with the ADOS Drone Agent)
| Crate | What it does | Docs |
|---|---|---|
ados-protocol | Wire contracts of the ADOS Drone Agent: IPC framing, plugin RPC envelope, capability tokens and the vision frame bus. | docs.rs |
ados-sdk | Write Rust plugins for the ADOS Drone Agent: IPC client, plugin context, driver traits and lifecycle runner. | docs.rs |
ados-vision | Single-object visual tracker: Kalman motion model, appearance re-identification and YOLOv8 head decoding. | docs.rs |
ados-gpio | Drive status buzzers and LEDs on Linux GPIO lines, with bounded software-PWM beep patterns. | docs.rs |
Standalone
| Crate | What it does | Docs |
|---|---|---|
ados-sensorhub | Sensor hub wire protocol: COBS framing, CRC-16 and fixed-layout IMU, baro, mag and GNSS packets. no_std. | docs.rs |
ados-offload | Choose where perception runs (onboard, offloaded or hybrid) and hold the vehicle when results go stale. | docs.rs |
ados-macpin | Stable MAC addresses for Linux network adapters that randomize theirs every boot. | docs.rs |
ados-lora | LoRa transmit governor with cited regional band plans, duty cycle, dwell time and airtime accounting. | docs.rs |
ados-crsf-codec | no_std CRSF / ExpressLRS codec for RC channels, telemetry and parameter frames. | docs.rs |
ados-positioning | Split mixed UBX, NMEA and RTCM3 GNSS streams, configure u-blox receivers and run an RTK base survey-in. | docs.rs |
ados-rtcm | RTCM3 framing, CRC-24Q and MAVLink GPS_RTCM_DATA fragmentation for RTK corrections. | docs.rs |
ados-clock | Map remote clocks onto the host clock: least-squares and envelope fits, TIMESYNC and a chrony sink. | docs.rs |
ados-swarm | Swarm control laws: separation, flocking, formations, CBBA task allocation and a point-mass simulator. | docs.rs |
ados-mavlink-tunnel | Send large messages over MAVLink TUNNEL frames with chunking and bounded reassembly. | docs.rs |
ados-display-driver | Small-display output on Linux: SSD1306/SH1106 OLED over I2C, pixel packers and a framebuffer writer. | docs.rs |
ados-hmi | Front-panel input: touchscreen calibration and gestures, button presses and rotary encoders. | docs.rs |
§ADOS repositories
| Repo | Runs on | What it does | Link |
|---|---|---|---|
| ADOS Mission Control | Browser, desktop (Electron) | Ground control station: FC setup, mission planning, flight, 3D simulation, fleet | ADOSMissionControl |
| ADOS Drone Agent | Companion computer on the drone, or a ground node | Onboard agent: MAVLink routing, HD video, long-range radio link, plugins, remote control | ADOSDroneAgent |
| ADOS Android GCS | Android phones and tablets | Native ground control app for agents on the LAN, direct flight controllers and the cloud | ADOSAndroidGCS |
| ADOS Extensions | Drone Agent and Mission Control | First-party signed plugins, each with an agent half and a GCS half | ADOSExtensions |
| ADOS MCP | Your machine | Model Context Protocol server that lets AI clients operate ADOS drones under scopes and a safety gate | ADOS-MCP |
| Documentation | docs.altnautica.com | Public docs for every ADOS product | Documentation |
§License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Re-exports§
pub use probe::cpu::probe_cores;pub use probe::serial::probe_serial_ports;pub use probe::soc::probe_soc;pub use probe::usb::probe_usb_ids;pub use probe::video::probe_h264_encoder;pub use runner::run_probe_sandboxed;pub use runner::ProbeOutcome;
Modules§
- bindings
- Optional sensor bindings a board profile may declare: the IMU source, the GNSS source, a USB sensor hub and a host-I2C battery gauge.
- board_
sidecar - The board fingerprint sidecar (
/run/ados/board.json), written from Rust. - camera_
probe - Boot-time camera presence probe with apply-verify-auto-revert.
- daemon
ados-camera-probe— boot-time apply-verify-auto-revert oneshot for the CSI camera overlay.- host_
facts - The host facts board detection keys on, read from procfs/sysfs, and the pure parsers of those files.
- probe
- Per-capability probes. Each submodule owns one probe and is filled in independently; the public signatures here are the contract those fills must match.
- runner
- Sandboxed probe runner.
- sensor_
hub - Sensor-hub USB presence: which
/dev/ttyACM*node, if any, is the sensor hub, thesensor_hubobject ofboard.json, and the/run/ados/sensor-hub-presentmarker the hub service and the capability surface key on.
Structs§
- Core
Cluster - One homogeneous cluster of CPU cores (a big.LITTLE rig has more than one).
- Encoder
Device - A confirmed hardware H.264 encoder device: a real node that enumerates an
H.264 output FourCC (
H264) and accepted a bounded trial init. - Hardware
Capabilities - A full probed hardware-capability snapshot.
- Midr
- A CPU main-ID-register value (
MIDR_EL1-style), as read from/proc/cpuinfo’sCPU implementer/CPU partfields. - Serial
Port - A serial port the agent may attach a flight controller (or other UART peripheral) to.
- SocCompatible
- The SoC’s
/proc/device-tree/compatiblestrings (most-specific first). - UsbId
- A USB
(idVendor, idProduct)pair. - V4l2
Node - A V4L2 node found under
/dev, with the formats it enumerates on its output (the format a memory-to-memory encoder produces).
Enums§
- Absence
Reason - Why a capability was concluded
Probed::Absent. - Evidence
- What concretely proved a
Probed::Presentanswer. - Probe
Phase - When a probe runs.
- Probed
- The outcome of one capability probe.
Functions§
- probe_
all - Run every probe and assemble a full
HardwareCapabilitiessnapshot.