Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip netid2 check if requested #94

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

mskvortsov
Copy link
Contributor

It seems that a complete decoding of SX1272/62 sync words would require an additional reverse engineering effort of how exactly these chips generate the frame sync portion of a packet. According to this research, there are some opaque intricacies indeed, and there are rumors that no other values except 0x3444/0x1424 are recommended for use.

This change (partially) works around the issue by skipping the check of the second sync word if requested. To skip, set the second part of the Frame Sync block parameter to zero, e.g. [16, 0]. According to the link above, zero word is invalid anyway so it presumably can be used for this purpose.

A bit more of details are in #91 (comment).

@miweber67
Copy link

miweber67 commented May 6, 2024

Perhaps an option to skip all syncword checks, a 'promiscuous mode' if you will, would be useful as well. If either syncword is zero, don't enforce it.

This is an interesting read in case you haven't seen it yet:

https://blog.classycode.com/lora-sync-word-compatibility-between-sx127x-and-sx126x-460324d1787a

EDIT: I see now that that was the very article you liked behind 'this research.' :-\ sorry!

@tapparelj
Copy link
Owner

Hello,
the first network ID is used to identify a misalignment by one entire symbol at some stage of the synchronization.
So ignoring the second network Id and printing the value found is entirely fine for me. For ignoring the first network ID as well, we should also ignore the synchronization by one symbol which will not cause issue at high SNRs, but will sometime miss frames at low SNRs.
Let me know if you want to update to pull request to allow both values to be put to 0 before I merge it or leave it as it is now.

@mskvortsov
Copy link
Contributor Author

@tapparelj Hi! Added a bypass for netid1 too. And yes, I see some additional crc failures on a weak signal with this turned on, but it's just an optional feature, so let it be.

@tapparelj tapparelj merged commit 10c2943 into tapparelj:master May 17, 2024
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.

3 participants