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

fs20: Improve bitstream decoding, add some FHT support #1783

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

StefanBruens
Copy link
Contributor

The bitstream decoding is improved significantly:

  • The encoding is corrected to OOK_PULSE_PWM
  • Preamble scan is added, as sometimes a random leading bit is added, or
    the initial bit is dropped, both due to noise.
  • MIC/sanity check is added, i.e. parity is checked for each individual
    data byte, and the 'sum' byte is checked for a sane value.

Also report the flags from the command byte, and the optional extension
byte.

The FHT protocol uses the same bitstream encoding as FS20, but can be
detected by a different range for the sum byte. Add decode tables for
cmd and flags.

src/devices/fs20.c Outdated Show resolved Hide resolved
@zuckschwerdt
Copy link
Collaborator

I guess you could add
"mic", "Integrity", DATA_STRING, "PARITY",
as there are now some (weak) checks.

Regarding .disabled=0, did you test on rtl_433_tests to see if there are false positives?

src/devices/fs20.c Outdated Show resolved Hide resolved
src/devices/fs20.c Outdated Show resolved Hide resolved
The bitstream decoding is improved significantly:
- The encoding is corrected to OOK_PULSE_PWM
- Preamble scan is added, as sometimes a random leading bit is added, or
  the initial bit is dropped, both due to noise.
- MIC/sanity check is added, i.e. parity is checked for each individual
  data byte, and the 'sum' byte is checked for a sane value.

Also report the flags from the command byte, and the optional extension
byte.

The FHT protocol uses the same bitstream encoding as FS20, but can be
detected by a different range for the sum byte. Add decode tables for
cmd and flags.
@merbanan
Copy link
Owner

@zuckschwerdt How about merging this but keeping it disabled ?

@zuckschwerdt
Copy link
Collaborator

I guess this dropped off waiting for feedback. I'll merge and correct the issues on top.

@zuckschwerdt zuckschwerdt merged commit 5ac7784 into merbanan:master Feb 10, 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