BastilleResearch / gr-lora

GNU Radio OOT module implementing the LoRa PHY, based on https://github.com/matt-knight/research/tree/master/2016_05_20_jailbreak
GNU General Public License v3.0
470 stars 92 forks source link

Improve the whitening sequence #2

Closed matt-knight closed 7 years ago

matt-knight commented 7 years ago

The whitening sequence implemented in gr-lora was experimentally derived by @matt-knight during the course of his initial blind signal analysis. While it has been adjusted over time, it is still riddled with errors. Additionally, the portion of the whitening sequence that applies to the PHY header (first 8 octets of the sequence, or 8 symbols at 4/8) is not correct due to limitations of the Microchip RN2903 being used to deduce the sequence. Thus, the whitening sequence should be:

matt-knight commented 7 years ago

Complete for implicit header modes. Explicit header implementation will be tracked by https://github.com/BastilleResearch/gr-lora/issues/3.

For anyone interested, I added /tools/whitening_consensus_tool.py to help improve whitening sequence accuracy. One feeds it an arbitrary number of whitening sequences (dumped from the decoder) and it does bitwise comparisons among all of said sequences to find the best fit. Have a look at the #if branch in lib/decoder_impl.cc to see which decoding stages should be bypassed in this operation.