Skip to content

Align CG022 NRF24 timing with LT8910 PHY capture#16

Draft
Copilot wants to merge 36 commits intomaster_mrc-updatesfrom
copilot/add-cg022-quad-proof-of-possibility-test
Draft

Align CG022 NRF24 timing with LT8910 PHY capture#16
Copilot wants to merge 36 commits intomaster_mrc-updatesfrom
copilot/add-cg022-quad-proof-of-possibility-test

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 30, 2026

Recent LT8910 PHY captures (with timestamps) show CG022’s hop phase and bind timing differ from the NRF24 proof‑of‑possibility implementation. This updates the NRF24 transmit timeline to follow the LT8910 capture sequence.

  • Hop phase alignment
    • Reorder hop table to the LT8910 phase and start index so the first bind hop matches the capture.
  • Bind timeline alignment
    • Add a pre‑bind startup delay to match the LT8910 prelude window.
  • Inter‑packet timing
    • Adjust CG022 packet period to the measured hop interval.
#define CG022_HOP_START_INDEX 1
static const uint8_t PROGMEM CG022_hop[] = { 0x00, 0x28, 0x0A, 0x32, 0x14, 0x3C, 0x1E, 0x46 };

⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

MRC3742 and others added 21 commits March 30, 2026 02:19
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
* Initial plan

* Add ARES protocol with 6HPA subprotocol for CC2500

New protocol implementation based on SPI capture analysis of the
Ares 6HPA transmitter. Key protocol characteristics decoded from
captures:
- CC2500 at 2410 MHz with 60-channel FHSS
- 6.67ms packet period (150 Hz update rate)
- 17-byte packets with interleaved 12-bit encoding for 6 channels
- Sync word 0x5A60, variable length packets with CRC
- Each data frame sent 3 times on 3 different channels

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Remove build artifacts and add gitignore entries

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Fix code review feedback: remove dead code and revert unintended config changes

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Fix ARES protocol binding: correct counter encoding, BIND_DONE, PATABLE, hopping table

Critical fixes from re-analysis of SPI captures:
1. Add BIND_DONE in init (autobind protocol - without this, TX power was -30dBm!)
2. Fix bytes 13-15: must be three DIFFERENT running counter values (was all same)
3. Fix byte 16: counter step size, not TX ID XOR
4. Fix FORCE_ID hopping table: was off-by-one (started with init channel 0x00)
5. Add SRES strobe at init start
6. Write PATABLE to max power (0xFF x8) as in capture

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Fix code review: remove unnecessary bitmask on step variable

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Fix ARES binding: use fixed hopping table, add model match via RX_num, add protocol docs

- Replace Fisher-Yates shuffle with fixed captured hopping sequence
  (the receiver expects a specific hopping pattern that doesn't match
  any random shuffle algorithm)
- RX_num (receiver number) now provides model match via MProtocol_id
  changing the TX ID bytes in packets
- Add ARES protocol documentation to Protocols_Details.md
- Add build/ to .gitignore

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Remove duplicate build/ entry from .gitignore

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Fix ARES: use captured TX ID with RX_num (0-63) for model match

Always use the captured TX ID (0xDC, 0xCC) as base instead of random
MProtocol_id values which the receiver rejects. RX_num (0-63) is placed
in byte 3 of the TX ID to provide 64 distinct IDs for model match.
RX_num=0 reproduces the exact captured ID. Counter step and start
values also use the known-working captured values.

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* ARES: use module-unique random TX ID with RX_num model match

Use rx_tx_addr[1] and [2] from MProtocol_id (module-unique random ID
set by framework) instead of hardcoded captured bytes. rx_tx_addr[3]
uses RX_num (0-63) for model match. Counter step/start remain at
captured values (23/35) required for protocol operation. ARES_FORCE_ID
restores full captured ID for debugging.

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Revise ARES protocol info in documentation

Updated ARES protocol details and autobind instructions.

* ARES: version bump to 56, MULTI_SURFACE exclusion, ATmega328p flash fix

- Increment VERSION_PATCH_LEVEL from 55 to 56
- Add #undef ARES_CC2500_INO under #ifdef MULTI_SURFACE in Validate.h
  since ARES is an air-only protocol (fixes 3 STM32 SURFACE build failures)
- Add ARES_CC2500_INO to ATmega328p optiboot CC2500 disable list
  to prevent flash overflow (fixes ATmega328p build failure)

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* BLUEFLY undef in MULTI_AIR, include ARES in ATmega328p CC2500 build

- Add #undef BLUEFLY_CCNRF_INO to MULTI_AIR section in Validate.h
- In ATmega328p optiboot CC2500 build: replace ARES_CC2500_INO with
  IKEAANSLUTA_CC2500_INO in the disable list, so ARES is included
  and IKEAANSLUTA (a "for-fun" protocol) is disabled to save space

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Replace BLUEFLY with RLINK undef, fix OMP_CC2500 references, include ARES in ATmega328p

- Validate.h MULTI_AIR: replace #undef BLUEFLY_CCNRF_INO with
  #undef RLINK_CC2500_INO (RLINK actually saves flash space)
- build_release_avr_optiboot: replace non-existent OMP_CC2500_INO
  and IKEAANSLUTA_CC2500_INO with RLINK_CC2500_INO; ARES now included
- build_release_avr_noboot: replace non-existent OMP_CC2500_INO
  with RLINK_CC2500_INO (OMP is now OMP_CCNRF_INO)

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

* Remove RLINK_CC2500_INO definition for STM32F103C8

* Add missing FORCE_ARES_TUNING handling in Multiprotocol.ino

The FORCE_ARES_TUNING define was added to _Config.h and Validate.h
but was never referenced in Multiprotocol.ino, making it a dead config
option. Add the if-else chain entries in both PPM (line ~633) and serial
(line ~1380) protocol init paths, matching the pattern of all other
CC2500 forced tuning options.

Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Co-authored-by: MRC3742 <26642502+MRC3742@users.noreply.github.com>
Copilot AI changed the title [WIP] Add proof-of-possibility test for CG022 RX with NRF24 Add CG022 NRF24 proof‑of‑possibility transmitter Mar 30, 2026
Copilot AI requested a review from MRC3742 March 30, 2026 02:32
Copilot AI changed the title Document CG022 LT8910 vs NRF24 payload + hop traceability Add CG022 PHY traceability checklist for LT8910↔NRF24 comparison Mar 31, 2026
Copilot AI changed the title Add CG022 PHY traceability checklist for LT8910↔NRF24 comparison Add CG022 PHY traceability checklist and non‑SDR guidance Mar 31, 2026
Copilot AI changed the title Add CG022 PHY traceability checklist and non‑SDR guidance Clarify LT8910 0xFF readback meaning and recovery steps Apr 1, 2026
Copilot AI changed the title Clarify LT8910 0xFF readback meaning and recovery steps Clarify LT8910 readback scope for NRF24 emulation Apr 1, 2026
Copilot AI changed the title Clarify LT8910 readback scope for NRF24 emulation Add LT8910 PHY config table and bind-flow chart from TX/RX captures Apr 1, 2026
Copilot AI changed the title Add LT8910 PHY config table and bind-flow chart from TX/RX captures Move CG022 LT8910 bind analysis into capture summary with exact timings Apr 1, 2026
Copilot AI changed the title Move CG022 LT8910 bind analysis into capture summary with exact timings Align CG022 NRF24 timing with LT8910 bind capture Apr 1, 2026
Copilot AI changed the title Align CG022 NRF24 timing with LT8910 bind capture Align CG022 NRF24 timing with LT8910 PHY capture Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants