gr-lora_sdr
This is the fully-functional GNU Radio software-defined radio (SDR) implementation of a LoRa transceiver with all the necessary receiver components to operate correctly even at very low SNRs. This work has been conducted at the Telecommunication Circuits Laboratory, EPFL.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org, ieee.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.0%) to scientific vocabulary
Keywords
Repository
This is the fully-functional GNU Radio software-defined radio (SDR) implementation of a LoRa transceiver with all the necessary receiver components to operate correctly even at very low SNRs. This work has been conducted at the Telecommunication Circuits Laboratory, EPFL.
Basic Info
- Host: GitHub
- Owner: tapparelj
- License: gpl-3.0
- Language: C++
- Default Branch: master
- Homepage: https://www.epfl.ch/labs/tcl/
- Size: 1.05 MB
Statistics
- Stars: 762
- Watchers: 25
- Forks: 85
- Open Issues: 14
- Releases: 0
Topics
Metadata Files
README.md
Summary
This is the fully-functional GNU Radio software-defined radio (SDR) implementation of a LoRa transceiver with all the necessary receiver components to operate correctly even at very low SNRs. The transceiver is available as a module for GNU Radio 3.10. This work has been conducted at the Telecommunication Circuits Laboratory, EPFL.
In the GNU Radio implementation of the LoRa Tx and Rx chains the user can choose all the parameters of the transmission, such as the spreading factor, the coding rate, the bandwidth, the sync word, the presence of an explicit header and CRC.
- The module contains convenient hierarchical blocks for both Tx and Rx.

- In the Tx chain, the implementation contains all the main blocks of the LoRa transceiver: the header- and the CRC-insertion blocks, the whitening block, the Hamming encoder block, the interleaver block, the Gray demapping block, and the modulation block.

- On the receiver side there is the packet synchronization block, which performs all the necessary tasks needed for the synchronization, such as the necessary STO and CFO estimation and correction. The demodulation block follows, along with the Gray mapping block, the deinterleaving block, the Hamming decoder block and the dewhitening block, as well as a CRC verification block.

- The implementation can be used for fully end-to-end experimental performance results of a LoRa SDR receiver at low SNRs.
- A simple simulation framework is available in the apps/simulation folder.
Functionalities
Sending and receiving LoRa packets between USRP-USRP and USRP-commercial LoRa transceiver (tested with RFM95, SX1276, SX1262).
Parameters available:
- Spreading factors: 5-12*
- Coding rates: 0-4
- Implicit and explicit header mode
- Payload length: 1-255 bytes
- Sync word selection (network ID)
- Verification of payload CRC
- Verification of explicit header checksum
- Low datarate optimisation mode
- Utilisation of soft-decision decoding for improved performances
* Spreading factors 5 and 6 are not compatible with SX126x.
Reference
Original publication
J. Tapparel, O. Afisiadis, P. Mayoraz, A. Balatsoukas-Stimming and A. Burg, "An Open-Source LoRa Physical Layer Prototype on GNU Radio," 2020 IEEE 21st International Workshop on Signal Processing Advances in Wireless Communications (SPAWC), Atlanta, GA, USA, 2020, pp. 1-5. IEEE Xplore link, arXiv link
Updated publication
J, Tapparel and A. Burg, "Design and Implementation of LoRa Physical Layer in GNU Radio". Proceedings of the GNU Radio Conference, Knoxville, TN, USA, 2024. GNU Radio Proceedings
If you find this implementation useful for your project, please consider citing the aforementioned paper.
Prerequisites
- Gnuradio 3.10
- python 3
- cmake
- libvolk
- boost
- UHD
- gcc > 9.3.0
- gxx
- pybind11
Installation
The out of tree module gr-lora_sdr can be installed from source or directly as a conda package.
From source
- Clone this repository
sh git clone https://github.com/tapparelj/gr-lora_sdr.git - Go to the cloned repository
sh cd gr-lora_sdr/ - You can optionally install the required dependencies using the provided conda environment, or directly install the dependencies independently and bypass the use of conda.
You can follow this tutorial or simply following:
- First download the latest release of conda, for example:
sh wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh - Now run the downloaded file which is the Anaconda Installer script
sh bash Miniconda3-latest-Linux-x86_64.sh - And reload the Shell
sh source ~/.bashrc - Now copy our environment to install all the dependencies of the module automatically
sh conda env create -f environment.yml - Start the conda environment GNU Radio 3.10 you just created
sh conda activate gr310
- First download the latest release of conda, for example:
- To build the code, create an appropriate folder and go in it:
sh mkdir build cd build - Run the main CMakeLists.txt
sh cmake .. -DCMAKE_INSTALL_PREFIX=<your prefix> # default to usr/local, CONDA_PREFIX or PYBOMB_PREFIX if no install prefix selected here - Finally compile the custom GNU Radio blocks composing the LoRa transceiver.
sh (sudo) make install -j$(nproc) - If you installed as sudo run
sh sudo ldconfig - Now you should be able to run some codes. For example, open the GNU Radio Companion user interface and check if the blocks of gr-lorasdr are available on the blocks list (e.g. under LoRaTX).
sh gnuradio-companion & - A final verification of the transceiver functioning can be made by executing the following script, transmitting a frame every two seconds:
sh python3 examples/tx_rx_functionality_check.py
Usage
- An example of a LoRa transmitter and receiver can be found in gr-lora_sdr/examples/ (both python and grc).
- The .grc files can be opened with gnuradio-companion to set the different transmission parameters.
- The python file generated by grc can be executed with
python3 ./{file_name}.py
From conda
Thanks to Ryan Volz this OOT module can also directly be installed as a Conda package. Note that gnuradio will also be installed in the conda environment.
- Create or activate the conda environment you want to install this module in. Refer to the conda getting start guide if you are not familiar with it already.
- Install the module from the anaconda channel tapparelj with:
sh conda install -c tapparelj -c conda-forge gnuradio-lora_sdr - Depending on your needs you might want to install complementary packages for gnuradio with:
sh conda install -c conda-forge gnuradio - The gnuradio metapackage installs all of the following subpackages:
gnuradio-grcgnuradio-iiognuradio-qtguignuradio-soapygnuradio-uhdgnuradio-video-sdlgnuradio-zeromq
- If you don't want all of those and their dependencies, you can install the ones you'd like individually with:
sh conda install -c conda-forge gnuradio-uhd#### Usage - Example gnuradio-companinon flowgraphs are installed with the package and can be found in:
- (Linux/macOS)
$CONDA_PREFIX/share/gr-lora_sdr/examples - (Windows)
%CONDA_PREFIX%\Library\share\gr-lora_sdr\examples
- (Linux/macOS)
Frequent issues:
- Fail to
makeafter pulling a new version from git- If the parameters of a block have changed in the new version, you need to first clean the old installation before building the module again.
- from within the build folder, run
(sudo) make uninstall make clean make -j4 (sudo) make install
- "ImportError: No module named lora_sdr":
- This issue comes probably from missing PYTHONPATH and LDLIBRARYPATH
- Refer to https://wiki.gnuradio.org/index.php/ModuleNotFoundError to modify those variables. If you set a prefix during the "cmake" call, skip directly to point C.(Verifying that the paths exist in your folders might help.)
- This issue comes probably from missing PYTHONPATH and LDLIBRARYPATH
- The OOT blocks doesn't appear in gnuradio-companion:
- The new blocks can be loaded in gnuradio-companion by adding the following lines in home/{username}/.gnuradio/config.conf (If this file doesn't exist you need to create it): ``` [grc] localblockspath=pathtothedownloadedfolder/gr-lora_sdr/grc ## Changelog
- Add option to ignore sync words checks and print the received values
- Add optional print of received payload as hex values
- Added tagged stream input support (for frame definition of frame length)
- Fixed LLR stream format between fft_demod and deinterleaver
- added tags to crc verification output stream indication frame start, length and CRC result.
- added separator option for file input
- added preamble length option
- added parameter for frame zero-padding
- add low data-rate optimization support
add support of spreading factors smaller than 7
Credit
This work was inspired from https://github.com/rpp0/gr-lora by Pieter Robyns, Peter Quax, Wim Lamotte and William Thenaers. Which architecture and functionalities have been improved to better emulate the physical layer of LoRa.
Licence
Distributed under the GPL-3.0 License License. See LICENSE for more information.
Owner
- Login: tapparelj
- Kind: user
- Repositories: 2
- Profile: https://github.com/tapparelj
Citation (CITATION.cff)
cff-version: 1.2.0
title: >-
A fully-functional GNU Radio software-defined radio
implementation of a LoRa transceiver
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Joachim
family-names: Tapparel
orcid: 'https://orcid.org/0000-0002-0154-9738'
affiliation: École Polytechnique Fédérale de Lausanne
repository-code: 'https://github.com/tapparelj/gr-lora_sdr'
abstract: >-
This is the fully-functional GNU Radio software-defined
radio (SDR) implementation of a LoRa transceiver with all
the necessary receiver components to operate correctly
even at very low SNRs. This work has been conducted at the
Telecommunication Circuits Laboratory, EPFL.
license: GPL-3.0+
preferred-citation:
type: conference-paper
authors:
- family-names: "Joachim"
given-names: "Tapparel"
orcid: "https://orcid.org/0000-0002-0154-9738"
- family-names: "Afisiadis"
given-names: "Orion"
orcid: "https://orcid.org/0000-0002-5287-9681"
- family-names: "Mayoraz"
given-names: "Paul"
- family-names: "Balatsoukas-Stimming"
given-names: "Alexios"
orcid: "https://orcid.org/0000-0002-6721-4666"
- family-names: "Burg"
given-names: "Andreas"
orcid: "https://orcid.org/0000-0002-7270-5558"
doi: "10.1109/SPAWC48557.2020.9154273"
journal: "2020 IEEE 21st International Workshop on Signal Processing Advances in Wireless Communications (SPAWC)"
month: 5
start: 1
end: 5
title: "An Open-Source LoRa Physical Layer Prototype on GNU Radio"
year: 2020
GitHub Events
Total
- Issues event: 34
- Watch event: 149
- Delete event: 3
- Issue comment event: 84
- Push event: 14
- Pull request event: 19
- Fork event: 23
- Create event: 3
Last Year
- Issues event: 34
- Watch event: 149
- Delete event: 3
- Issue comment event: 84
- Push event: 14
- Pull request event: 19
- Fork event: 23
- Create event: 3
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 14
- Total pull requests: 3
- Average time to close issues: 23 days
- Average time to close pull requests: about 11 hours
- Total issue authors: 13
- Total pull request authors: 3
- Average comments per issue: 1.79
- Average comments per pull request: 0.33
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 14
- Pull requests: 3
- Average time to close issues: 23 days
- Average time to close pull requests: about 11 hours
- Issue authors: 13
- Pull request authors: 3
- Average comments per issue: 1.79
- Average comments per pull request: 0.33
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jds0987 (3)
- KrystofVydra (2)
- smsajjadi (2)
- Piyushchauhan1999 (2)
- radio-satellites (2)
- sourya1712 (2)
- miweber67 (1)
- HaoHan9717 (1)
- gorsheep (1)
- MVPGLOCK (1)
- linhl1218 (1)
- LuxeZN (1)
- Abdull (1)
- sytang-unc (1)
- mskvortsov (1)
Pull Request Authors
- tinyboxvk (8)
- mskvortsov (2)
- AlonSpinner (2)
- tapparelj (1)
- alphapats (1)
- ttg128 (1)
- YuJieWU99 (1)
- ryanvolz (1)
- eabase (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- conda-incubator/setup-miniconda v2 composite
- castxml ==0.4.3
- pygccxml ==2.2.1