bug: decoder offset on first packet, preamble miss on second — add sync byte #28

Closed
opened 2026-08-01 22:44:09 +00:00 by time · 1 comment
Contributor

The rtl_433 flex decoder sees the first packet as 121 bits (offset by the 2ms t_wake ON prefix) and the second as 120 bits but missing the preamble (offset by the 1ms OFF inter-packet gap). The decoder's sync=4000 field is set but there's no sync byte in the actual packet structure. Fix: prepend a sync byte (0x00 → encoded 0xAAAA, all rising edges) before the preamble in each packet. This gives rtl_433 a 4000µs continuous pulse to use as a sync marker. Requires changes in three places: firmware (prepend sync byte before preamble), tx_emulator burst generation (prepend sync byte), and the rtl_433 cryogencc_pickle_01 decoder (skip the sync byte when parsing).

The rtl_433 flex decoder sees the first packet as 121 bits (offset by the 2ms t_wake ON prefix) and the second as 120 bits but missing the preamble (offset by the 1ms OFF inter-packet gap). The decoder's `sync=4000` field is set but there's no sync byte in the actual packet structure. Fix: prepend a sync byte (0x00 → encoded 0xAAAA, all rising edges) before the preamble in each packet. This gives rtl_433 a 4000µs continuous pulse to use as a sync marker. Requires changes in three places: firmware (prepend sync byte before preamble), tx_emulator burst generation (prepend sync byte), and the rtl_433 cryogencc_pickle_01 decoder (skip the sync byte when parsing).
Author
Contributor

Fixed in PR #39: tx/rx verified working with rtl_433 flex decoder. First packet offset and second packet preamble miss are resolved by the t_wake timing fixes and proper Manchester encoding.

Fixed in PR #39: tx/rx verified working with rtl_433 flex decoder. First packet offset and second packet preamble miss are resolved by the t_wake timing fixes and proper Manchester encoding.
time closed this issue 2026-08-03 04:06:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
daru/PICsense#28
No description provided.