Add bidirectional RF handoff coordination
This commit is contained in:
47
docs/handoff/TX_AGENT_USAGE.md
Normal file
47
docs/handoff/TX_AGENT_USAGE.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# MAIN TX watcher usage
|
||||
|
||||
## Purpose
|
||||
|
||||
tools/tx_agent_watcher.py is an ordinary local Python process. It polls the small RX result on origin/rx-node. It does not call an LLM and does not open HackRF hardware.
|
||||
|
||||
## Start
|
||||
|
||||
From the repository root, double-click:
|
||||
|
||||
tools\start_tx_watcher.cmd
|
||||
|
||||
The visible console polls every 5 seconds. A missing rx-node branch or invalid result is reported. No model runs while polling.
|
||||
|
||||
## READY and RED approval
|
||||
|
||||
For a fresh valid RF001A_OTA_CAPTURE_002 READY result, the watcher prints the task ID, capture start and expected end. It then asks for:
|
||||
|
||||
AUTHORIZE RF TX
|
||||
|
||||
Any other input blocks authorization.
|
||||
|
||||
After the exact phrase, the watcher fetches rx-node again. It requires the same result digest, a fresh publication, an active 120-second capture window and at least 10 seconds remaining.
|
||||
|
||||
On success it writes:
|
||||
|
||||
.local\tx_authorizations\RF001A_OTA_TX_002_authorized.json
|
||||
|
||||
This record opens the gate for the separately controlled TX executor. The watcher itself does not run hackrf_transfer. The record explicitly says rf_tx_started = false and rf_tx = 0.
|
||||
|
||||
The TX executor must re-fetch rx-node and compare the result commit and digest immediately before hardware access.
|
||||
|
||||
## Stop
|
||||
|
||||
Double-click:
|
||||
|
||||
tools\stop_tx_watcher.cmd
|
||||
|
||||
The stop command writes a local stop request and waits for the watcher PID to clear.
|
||||
|
||||
## Fake mode
|
||||
|
||||
Automated tests use a local bare Git repository. For a single local JSON fixture, the CLI dry-run form is:
|
||||
|
||||
python -B tools/tx_agent_watcher.py --dry-run --once --result-file <ready-json> --approval authorize
|
||||
|
||||
The --approval option is rejected outside --dry-run. Fake mode writes a local fake authorization and never fetches the production remote or accesses SDR hardware.
|
||||
Reference in New Issue
Block a user