9f2de2a0b1
Docs:
- Baseline was stated as 0.3.1 across the canonical set while the branch,
Cat 0/1 crates and every Cat 2 fork are 0.3.2. AGENTS.md also cited a
sources/redbear-0.3.1/ archive that does not exist; the only archive
present is sources/redbear-0.1.0/. Versioning examples now match the
forks as they actually stand (redoxfs/syscall 0.9.1, libredox 0.1.19).
- Repaired 18 instances of 'immutable archived' across 8 documents, where
a global find/replace had turned sync/synced/archived into that phrase
and produced ungrammatical text ('never auto-immutable archived',
'### Source immutable archived').
- Settled the apply-patches.sh contradiction empirically. Both sides were
wrong: the GROSS WARNING blocks (x5) described it as routine
patch-linking, and SCRIPT-BEHAVIOR-MATRIX.md said build-redbear.sh
'never invokes' it. It is invoked at build-redbear.sh:487, but only to
auto-repair a failed verify-overlay-integrity.sh check.
- Dropped the dangling reference to a local/AGENTS.md section
'NO OVERLAY-STYLE PATCHES — SCOPED POLICY' that does not exist.
Build system:
- mk/prefix.mk hardcoded 13.2.0 in the limits.h removal, which silently
no-ops after a toolchain upgrade and leaves the conflicting header.
Version-globbed.
- Parameterized GCC_RECIPE so the from-source toolchain path is not
pinned to gcc13.
- The three cstdlib strtold seds were not idempotent -- the shipped GCC
13 toolchain carried that comment block 17 times from repeated
'make prefix' runs. Each is now guarded.
2.9 KiB
2.9 KiB
redbear-btusb — Operator Runbook
Daemon: redbear-btusb
Init service: /usr/lib/init.d/20_btusb.service
Status check: redbear-btusb --status
Restart: init-svc restart btusb
Logs
- Destination:
stderr(visible viajournalctl -u btusb) - Debug:
RUST_LOG=debug redbear-btusb --daemon - Trace:
RUST_LOG=trace redbear-btusb --daemon
Modes
redbear-btusb --probe— One-shot USB bus scan for Bluetooth adapters. Printsadapters=,transport=usb,mode=ble-first, adapter endpoint detail lines.redbear-btusb --status— Reads/var/run/redbear-btusb/status(90 s freshness window). Printsruntime_visibility,daemon_status,controller_state,bd_address,hci_version.redbear-btusb --daemon(default, no args) — Long-running daemon. Scans/scheme/usb/for Bluetooth adapters (USB class 0xE0, subclass 0x01; known-vendor fallback for Intel 0x8087, Realtek 0x0BDA, Broadcom 0x0A5C, CSR 0x0A12). Runs HCI init sequence (Reset → Read BD Addr → Read Local Version) on first adapter. Registersscheme:btusbviaredox_scheme::Socket.
Runtime State Query
- Adapter enumeration:
cat /scheme/btusb/adapters(or read from probe output) - Controller info:
cat /var/run/redbear-btusb/statuscontroller_state=closed | initializing | active | errorbd_address,hci_version,hci_revision,manufacturerinit_error(present when state iserror)
- USB probe raw:
redbear-btusb --probe(parses/scheme/usbtree)
Signals / SIGTERM Behavior
- No SIGTERM handler. The init system kills the process directly. The status file at
/var/run/redbear-btusb/statusis cleaned up on normal exit viaDrop.
Common Issues
- No adapters found — Verify USB controller is up (
ls /scheme/usb). Check USB descriptors exist at/scheme/usb/<bus>/<port>/descriptors. The daemon probes only USB class 0xE0 subclass 0x01 devices, plus known-vendor fallback (vendor IDs 0x8087, 0x0BDA, 0x0A5C, 0x0A12). Non-Bluetooth-class devices from unknown vendors are invisible. controller_state=errorwithinit_error— HCI init sequence failed. Common causes: USB transport is closed, HCI Reset timed out (no event endpoint interrupt), malformed endpoint descriptors (missing interrupt IN, bulk IN, or bulk OUT).- Intel CNVi (0x8087) init failure — Intel firmware setup (
btintel::intel_setup_firmware) is non-fatal. Thelog::warn!message means standard HCI init will still be attempted. Check/var/run/redbear-btusb/statusfor the resulting controller state. - Stale status file — Status files older than 90 seconds (
STATUS_FRESHNESS_SECS) are treated as invalid;--statuswill returnruntime_visibility=installed-onlyanddaemon_status=inactive. ENOENTon scheme paths — The daemon must be running (redbear-btusb --daemon) forscheme:btusbto exist. Aftersetrens(0, 0), the scheme is isolated in a null namespace.