Skip to content

Commit

Permalink
Update README.md and remove SYNC messages from debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
rpp0 committed Aug 29, 2017
1 parent 2091f31 commit 983e586
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
54 changes: 26 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
gr-lora [![Build status](https://api.travis-ci.org/rpp0/gr-lora.svg)](https://travis-ci.org/rpp0/gr-lora)
=======

The gr-lora project aims to provide a collection of GNURadio blocks for receiving LoRa modulated radio messages using Software Defined Radio (SDR). More information about LoRa itself can be found on [the website of the LoRa Alliance](https://www.lora-alliance.org/).
The gr-lora project aims to provide a collection of GNU Radio blocks for receiving LoRa modulated radio messages using Software Defined Radio (SDR). More information about LoRa itself can be found on [the website of the LoRa Alliance](https://www.lora-alliance.org/).

![alt text](https://github.com/rpp0/gr-lora/blob/master/examples/screenshot.png "gr-lora example")


Features
--------
Update of 29th August, 2017
---------------------------

I'm happy to announce that as of ```gr-lora``` version 0.6, a new clock recovery algorithm has been implemented which fixes previous issues with long LoRa messages. Other components, such as whitening, detection and decoding have been improved as well (see the Git log for more details). Given a clear signal, the decoding accuracy is now close to 100% for all SFs, and I therefore consider LoRa fully reverse engineered. Future updates will focus on improving the performance and minor details of the specification.


Usage
-----

See the LICENSE file and top of the source files for the license of this project. If you are working on a research topic or project that involves the usage of ```gr-lora``` or its algorithms, we would appreciate it if you could acknowledge us. We are currently working on a full writeup of the decoder, but in the meantime, you can cite this repository as follows:

Though there is no official reference implementation of LoRa, the protocol is described in various patents and blog posts (for a good resource, see [this RevSpace page](https://revspace.nl/DecodingLora)). The following features are fully supported by gr-lora:
Pieter Robyns, Peter Quax, Wim Lamotte, William Thenaers. (2017). gr-lora: An efficient LoRa decoder for GNU Radio. Github. https://github.com/rpp0/gr-lora

- Synchronizing to LoRa frames transmitted with any spreading factor
- Deinterleaving
- Dewhitening
- Decoding + Hamming error correction of the LoRa PHDR length field
- Decoding + Hamming error correction of frame payloads (all coding rates)

Not supported yet:
Features
--------

All features of the LoRa physical-layer modulation scheme are described in various patents and blog posts (for a good resource, see [this RevSpace page](https://revspace.nl/DecodingLora)). ```gr-lora``` supports most of these features, except for:

- CRC checks of the payload and header
- Decoding multiple channels simultaneously
- Clock drift correction for very long frames

This feature set is enough for basic, experimental usage with SDRs.
This library was primarily tested with a USRP B201 as receiver and Microchip RN2483 as transmitter. If you encounter an issue with your particular setup, feel free to let me know in the Issues section of this repository.


Installation
Expand Down Expand Up @@ -64,9 +69,7 @@ Using Volk machine: avx2_64_mmx_orc
...
```

Alternatively, if you have a LoRa transmitter, you can configure/modify ```/examples/_examplify.py``` to generate example files and add them to ```/examples/qa_BasicTest_Data.xml``` to run them automatically with ```python/qa_BasicTest_XML.py``` (```xmltodict``` module needed).
Note that this script should be run with its shell script in ```build/python```.
This is to ensure compatibility with ```make test```.
Alternatively, if you have a LoRa transmitter, you can configure/modify ```/examples/_examplify.py``` to generate example files and add them to ```/examples/qa_BasicTest_Data.xml``` to run them automatically with ```python/qa_BasicTest_XML.py``` (```xmltodict``` module needed). Note that this script should be run with its shell script in ```build/python```. This is to ensure compatibility with ```make test```.


Contributing
Expand All @@ -78,24 +81,19 @@ Contributions to the project are very much appreciated! If you have an idea for
Hardware
--------

Primarily, gr-lora was developed using a USRP and RN2483 LoRa chip. The following LoRa modules and SDRs were also tested and work with gr-lora:
The following LoRa modules and SDRs were also tested and work with gr-lora:

Transmitters: Pycom LoPy, Dragino LoRa Raspberry Pi HAT, Adafruit Feather 32u4, Microchip RN 2483 (custom board)
Receivers: HackRF One, USRP B201, RTL-SDR


Usage
-----

See the LICENSE file for the license of this project. If you are working on a project that involves the usage of gr-lora, we would appreciate it if you can acknowledge gr-lora by linking to this page.


Changelog
---------

- Version 0.5 : Major overhaul of preamble detection and upchirp syncing
- Version 0.4 : Support for all spreading factors, though SFs 11 and 12 are still slow / experimental
- Version 0.3 : Support for all coding rates
- Version 0.21: Fixed some issues reported by reletreby
- Version 0.2 : C++ realtime decoder, manual finetuning for correcting frequency offsets of the transmitter.
- Version 0.1 : Python prototype file based decoder, SF7, CR4/8
- Version 0.6 : Significantly increased decoding accuracy and clock drift correction.
- Version 0.5 : Major overhaul of preamble detection and upchirp syncing
- Version 0.4 : Support for all spreading factors, though SFs 11 and 12 are still slow / experimental
- Version 0.3 : Support for all coding rates
- Version 0.2.1: Fixed some issues reported by reletreby
- Version 0.2 : C++ realtime decoder, manual finetuning for correcting frequency offsets of the transmitter.
- Version 0.1 : Python prototype file based decoder, SF7, CR4/8
5 changes: 3 additions & 2 deletions examples/qa_BasicTest_usrp.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-------- Test Results on 2017-08-29 13:31:30 ---------
-------- Test Results on 2017-08-29 14:10:48 ---------
Test serie 0: [u'01 23 45 67 89 ab cd ef'] * 10
Test 1 :: cr4-5 bw125 sf7 crc1 pwr1 :: passed 10 out of 10 (100.00%)
Test 2 :: cr4-5 bw125 sf8 crc1 pwr1 :: passed 10 out of 10 (100.00%)
Expand Down Expand Up @@ -55,7 +55,7 @@ Test serie 5: [u'ff ff ff ff'] * 10
Test 38 :: cr4-5 bw125 sf12 crc1 pwr1 :: passed 9 out of 10 ( 90.00%)
Test 39 :: cr4-7 bw125 sf6 crc1 pwr1 :: passed 9 out of 10 ( 90.00%)
Test 40 :: cr4-7 bw125 sf7 crc1 pwr1 :: passed 10 out of 10 (100.00%)
Test 41 :: cr4-6 bw125 sf6 crc1 pwr1 :: passed 9 out of 10 ( 90.00%)
Test 41 :: cr4-6 bw125 sf6 crc1 pwr1 :: passed 10 out of 10 (100.00%)
Test 42 :: cr4-6 bw125 sf7 crc1 pwr1 :: passed 10 out of 10 (100.00%)
=> Total passed: 55 out of 70 (78.57%)

Expand Down Expand Up @@ -111,3 +111,4 @@ Test serie 10: [u'88 88 88 88'] * 10


====== Total passed: 344 out of 413 (83.29%) ======

2 changes: 1 addition & 1 deletion lib/decoder_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ namespace gr {
}

#ifndef NDEBUG
d_debug << "FINE: " << -lag << std::endl;
//d_debug << "FINE: " << -lag << std::endl;
#endif

d_fine_sync = -lag;
Expand Down

0 comments on commit 983e586

Please sign in to comment.