Fix RF-001A common-clock verification
This commit is contained in:
@@ -7,45 +7,76 @@ stop and report the conflict.
|
||||
# Current RX task
|
||||
|
||||
TASK =
|
||||
PREPARE RF-001A COMMON-CLOCK RX
|
||||
VERIFY RF-001A SLAVE CLKIN
|
||||
|
||||
1. In the project path from RX_NODE_STATE.md, record branch, HEAD and `git status --short --untracked-files=no`. Require clean tracked state and `video-development`. Run `git pull origin video-development`; then require local HEAD = `origin/video-development`. Do not commit or push.
|
||||
2. Read `configs/rf/rf001a_common_clock.json` and `docs/rf/RF_001A_PREPARATION.md`. Run `python -B -X utf8 tools/rf001a_prepare.py --verify-dir <TX artifact directory>` only if the TX artifact has been transferred locally; otherwise run `python -B -X utf8 -c "from tools.rf001a_prepare import load_spec; print(load_spec())"` to check the shared spec against the existing PHY. Do not substitute a video fixture or alter the expected hashes.
|
||||
3. Run fixture-independent RF TARGETED PYTEST, Ruff, Pyright and `git diff --check`:
|
||||
```powershell
|
||||
python -B -m pytest tests/test_packet.py tests/test_video003_modem.py tests/test_video005_iq.py tests/test_rf001_preparation.py tests/test_rf001a_prepare.py tests/test_clock001.py tests/test_hackrf_process_check.py -q
|
||||
python -B -m ruff check tools/rf001a_prepare.py tests/test_rf001a_prepare.py tools/qpsk_rf_common.py tools/qpsk_rf_tx.py tools/qpsk_rf_rx.py
|
||||
python -B -m pyright --project pyrightconfig.json
|
||||
git diff --check
|
||||
```
|
||||
These checks do not use the VIDEO-001 file or historical Lab064 metadata. Repeat the existing offline RF-001 100/100 packet check in new local paths. Missing prerequisites remain failures; do not label blocked video tests PASS.
|
||||
4. Run `hackrf_info`, save full output, and confirm this is the RX device. Check shared-spec center frequency 1400000000 Hz, sample rate 8000000/s, RX LNA 24 dB, RX VGA 24 dB, RF amp OFF, antenna bias OFF and digital carrier +125000 Hz. Confirm `hackrf_transfer -h` maps `-l` to RX LNA, `-g` to RX VGA, `-a 0` to amp OFF and `-p 0` to bias OFF. Record actual RX serial.
|
||||
5. Prepare a new unique raw IQ output directory outside Git, preserving existing captures. Check at least 320000000 bytes plus comfortable free-space margin on the destination volume. The 20 s finite capture is 160000000 complex samples in signed interleaved I/Q cs8, exactly 320000000 bytes (about 320 MB / 305.2 MiB). Prepare this command with the actual RX serial and a new path; **do not run it in this preparation task**:
|
||||
```powershell
|
||||
& '<verified hackrf_transfer.exe path>' -d <RX_SERIAL> -r <NEW_RAW_IQ_PATH.cs8> -f 1400000000 -s 8000000 -n 160000000 -l 24 -g 24 -a 0 -p 0 -B
|
||||
```
|
||||
6. Manual checkpoint for a future coordinated session: both antennas and USB connections, 10 MHz reference → MASTER → MASTER CLKOUT → SLAVE CLKIN, roles, polarization and safe distance. Freshly verify MASTER/SLAVE reg29 and SLAVE CLKIN. Old 0x26/DETECTED readings are historical only. Record `COMMON CLOCK VERIFIED = YES / NO`; until YES, RF TX is prohibited. RX capture also waits for the later coordinated task.
|
||||
7. Future session sequence: start finite RX capture, confirm it is active, then a separately authorized one-shot TX, finish capture, preserve full raw IQ plus stdout/stderr and every available intermediate/final overrun or underrun observation, then decode the same raw IQ offline with existing `qpsk_rf_rx.py --iq-format cs8`. Record size, sample count, duration and SHA256. Missing or incomplete counters are NOT_REPORTED, never zero.
|
||||
8. Report readiness and STOP. No RX capture now, RF TX, continuous RX, firmware/CPLD updates, hackrf_spiflash, Zadig, USB driver changes, commit or push. Keep large IQ/video out of Git.
|
||||
The main PC has already completed the official source-side command for MASTER serial `000000000000000097c063dc323b97d3`:
|
||||
|
||||
```powershell
|
||||
hackrf_clock.exe -d 000000000000000097c063dc323b97d3 -o 1
|
||||
```
|
||||
|
||||
The command returned exit code 0. Treat this as `MASTER CLKOUT COMMAND = PASS`. Do not use `hackrf_clock -r 3` or Si5351 register 29 as a blocking test of physical CLKOUT. The common clock is still unverified until this RX task confirms the signal at SLAVE CLKIN before and after a short RX-start. RF TX remains 0.
|
||||
|
||||
1. In the project path from RX_NODE_STATE.md, record `git status --short --untracked-files=no`, branch and HEAD. Require a clean tracked checkout and branch `video-development`. Run `git pull origin video-development`; then require local HEAD = `origin/video-development`. Do not commit or push.
|
||||
|
||||
2. Run `hackrf_info` with the verified local host tools and preserve its complete stdout. Require exactly this RX serial:
|
||||
|
||||
```text
|
||||
000000000000000097c063dc2e5327d3
|
||||
```
|
||||
|
||||
Stop if the device is absent or the serial differs. Do not change firmware, CPLD, USB drivers or Zadig.
|
||||
|
||||
3. With the physical cable connected from MASTER CLKOUT to SLAVE CLKIN, run the official partner-side check with the explicit RX serial and preserve complete stdout:
|
||||
|
||||
```powershell
|
||||
& '<verified hackrf_clock.exe path>' -d 000000000000000097c063dc2e5327d3 -i
|
||||
```
|
||||
|
||||
Accept only the exact line `CLKIN status: clock signal detected` as `SLAVE CLKIN BEFORE RX = DETECTED`. If the signal is not detected, set `COMMON CLOCK RX VERIFIED = NO` and stop. Do not alter clock configuration automatically.
|
||||
|
||||
4. If CLKIN was detected, perform one short, finite RX-start on SLAVE. This opens receive mode only; it does not transmit and does not create the 20-second capture:
|
||||
|
||||
```powershell
|
||||
& '<verified hackrf_transfer.exe path>' -d 000000000000000097c063dc2e5327d3 -r NUL -f 1400000000 -s 8000000 -n 65536 -l 0 -g 0 -a 0 -p 0 -B
|
||||
```
|
||||
|
||||
Require exit code 0 and a complete transfer of 65536 complex samples. Record all reported overruns and errors. Any nonzero overrun, USB error, incomplete transfer or nonzero exit code means `SHORT RX START = FAIL` and stops the task.
|
||||
|
||||
5. Immediately after the short RX-start, repeat the same explicit `hackrf_clock.exe ... -i` command and preserve complete stdout. Require the exact line `CLKIN status: clock signal detected`. Set `COMMON CLOCK RX VERIFIED = YES` only when CLKIN was detected before RX, the short RX-start passed, and CLKIN remained detected after RX.
|
||||
|
||||
6. Register 29 may be read only as optional diagnostic information with the already verified read-only command. It is not a PASS/FAIL criterion. Do not use `hackrf_debug` to write registers. Do not use `hackrf_clock -r 3` as a blocking criterion.
|
||||
|
||||
7. Set `RX READY TO CAPTURE = YES` only if the branch/HEAD checks, RX serial check and all three clock checks in step 5 pass. This readiness does not authorize a capture or transmission. Do not start the 20-second RF-001A capture, RF TX, continuous RX, RF-001B, firmware/CPLD updates, `hackrf_spiflash`, Zadig or USB driver changes.
|
||||
|
||||
8. Finish with this exact report and STOP:
|
||||
|
||||
```text
|
||||
TASK =
|
||||
PREPARE RF-001A COMMON-CLOCK RX
|
||||
VERIFY RF-001A SLAVE CLKIN
|
||||
|
||||
BRANCH =
|
||||
HEAD =
|
||||
SHARED TEST SPEC =
|
||||
RF TARGETED PYTEST =
|
||||
RUFF =
|
||||
PYRIGHT =
|
||||
GIT DIFF CHECK =
|
||||
OFFLINE RF-001 =
|
||||
HACKRF INFO =
|
||||
|
||||
RX SERIAL =
|
||||
RX CAPTURE COMMAND PREPARED =
|
||||
RX CAPTURE FREE SPACE =
|
||||
COMMON CLOCK VERIFIED =
|
||||
PHYSICAL CHECKPOINT =
|
||||
|
||||
SLAVE CLKIN BEFORE RX =
|
||||
DETECTED / NOT_DETECTED
|
||||
|
||||
SHORT RX START =
|
||||
PASS / FAIL
|
||||
|
||||
SLAVE CLKIN AFTER RX =
|
||||
DETECTED / NOT_DETECTED
|
||||
|
||||
COMMON CLOCK RX VERIFIED =
|
||||
YES / NO
|
||||
|
||||
RX READY TO CAPTURE =
|
||||
YES / NO
|
||||
|
||||
RF TX =
|
||||
0
|
||||
|
||||
STOP.
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user