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

## 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
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.
### 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](https://github.com/rpp0/gr-lora/tree/master/docs/test-results), and I therefore consider LoRa fully reverse engineered. Future updates will focus on improving the performance and minor details of the specification.
## Attribution
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:
> Pieter Robyns, Peter Quax, Wim Lamotte, William Thenaers. (2017). gr-lora: An efficient LoRa decoder for GNU Radio. Zenodo. 10.5281/zenodo.853201
## Installation
Installing `gr-lora` is possible in two ways: either by downloading the Docker container, which contains all dependencies and `gr-lora` packaged in a single container, or by manual installation.
### Docker installation
To avoid installation errors and cluttering your system with the required dependencies, the best approach to install `gr-lora` is through a Docker container. Make sure the `docker` service is running, then perform the following steps:
```
git clone https://github.com/rpp0/gr-lora.git .
cd docker/
./docker_run_grlora.sh
```
The `docker_run_grlora.sh` script will download the Docker container and run it in 'privileged' mode (in order to access your SDR over USB). After that, you should get a shell inside the container:
```
[root@5773ed19d95d apps]#
```
See the 'Testing' section below for examples on how to use `gr-lora`.
### Manual installation
If you prefer a manual installation, the following dependencies are required: `python2-numpy`, `python2-scipy`, `swig`, `cppunit`, `fftw`, `gnuradio`, `libvolk`, `log4cpp`, `cmake`, `wx`, and [`liquid-dsp`](https://github.com/jgaeddert/liquid-dsp).
The installation procedure is the same as for any GNU Radio OOT module:
```
git clone https://github.com/rpp0/gr-lora.git .
mkdir build
cd build
cmake ../ # Note to Arch Linux users: add "-DCMAKE_INSTALL_PREFIX=/usr"
make && sudo make install
```
## Testing and usage
To test your installation, you can simply run the example app ```apps/lora_receive_file_nogui.py```. The script will download an example trace, and attempt to decode it using gr-lora. You should see the following output:
```
$ ./lora_receive_file_nogui.py
[?] Download test LoRa signal to decode? [y/N] y
[+] Downloading https://research.edm.uhasselt.be/probyns/lora/usrp-868.1-sf7-cr4-bw125-crc-0.sigmf-data -> ./example-trace.sigmf-data . . . . . . . . . . . . . . . . . .
[+] Downloading https://research.edm.uhasselt.be/probyns/lora/usrp-868.1-sf7-cr4-bw125-crc-0.sigmf-meta -> ./example-trace.sigmf-meta . .
[+] Configuration: 868.1 MHz, SF 7, CR 4/8, BW 125 kHz, prlen 8, crc on, implicit off
[+] Decoding. You should see a header, followed by 'deadbeef' and a CRC 5 times.
Bits (nominal) per symbol: 3.5
Bins per symbol: 128
Samples per symbol: 1024
Decimation: 8
04 90 40 de ad be ef 70 0d
04 90 40 de ad be ef 70 0d
04 90 40 de ad be ef 70 0d
04 90 40 de ad be ef 70 0d
04 90 40 de ad be ef 70 0d
[+] Done
```
Other example traces can be found [in the gr-lora-samples repository](https://github.com/rpp0/gr-lora-samples).
If you have a hardware LoRa transmitter, you use ```apps/lora_receive_realtime.py``` to decode signals in real time. With a Microchip RN2483, you can use [python-loranode](https://github.com/rpp0/python-loranode) to easily send messages via Python.
By default, decoded messages will be printed to the console output. However, you can use a `message_socket_sink` to forward messages to port 40868 over UDP. See the [tutorial](https://github.com/rpp0/gr-lora/wiki/Capturing-LoRa-signals-using-an-RTL-SDR-device) for more information.
## Contributing
Contributions to the project are very much appreciated! If you have an idea for improvement or noticed a bug, feel free to submit an issue. If you're up for the challenge and would like to introduce a feature yourself, we kindly invite you to submit a pull request.
## Hardware support
The following LoRa modules and SDRs were tested and work with gr-lora:
Transmitters: Pycom LoPy, Dragino LoRa Raspberry Pi HAT, Adafruit Feather 32u4, Microchip RN 2483 (custom board), SX1276(Custom Board with STM32 Support)
Receivers: HackRF One, USRP B201, RTL-SDR, LimeSDR(LMS7002M)-LimeSDR USB.
## Changelog
- Version 0.7 : Added support for downlink signals, reduced rate mode when using implicit header and arbitrary bandwidths (experimental).
- Version 0.6.2: Improved Message Socket Sink and higher sensitivity to low-power signals.
- Version 0.6.1: Minor bug fixes and improvements.
- 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
## License
See the LICENSE file and top of the source files for the license of this project.

Lau师傅
- 粉丝: 143
- 资源: 107
最新资源
- 西门子1200与V20变频器USS通讯优化及频率调整策略,西门子1200变频器与V20变频器USS通讯技术:实现V20频率的灵活调整与优化控制,西门子1200与V20变频器USS通讯改变V20频率
- 基于PLC S7-200的恒压变频供水系统设计与实现:闭环控制,智能调节水压稳定供应,基于PLC S7-200的恒压变频供水系统设计与实现:闭环控制保障稳定供水,基于PLC S7-200恒压变频供水系
- 西门子SMART200程序指南:一路串口通讯与自由口协议的应用实例,另一路BD串口MODBUS协议轮询通讯仪表详解,西门子SMART200 PLC串口通讯编程实践:一路自由口协议与一路MODBUS协议
- NI LAVIEW 2018:实现ASSCEE数据库实时操作,源代码文件,无密码访问,教程附赠,功能自主扩充,NI LAVIEW 2018实现ASSCEE数据库高效操作:实时表格查询与管理,源代码开放
- 从Excel读取信号:VMD分解与IMF筛选重构流程图,基于VMD分解与IMF分量筛选的信号处理流程图及结果展示,从excel中读取信号,首先计算信号的vmd分解,得到imf分量,然后根据imf分量与
- PROGPPCNEXUS读写烧录软件,全面支持飞思卡尔MPC系列无次数限制快速刷写,PROGPPCNEXUS读写烧录软件,针对飞思卡尔MPC系列处理器的高效刷写工具,无次数限制,PROGPPCNEXU
- 视觉通用框架软件:拖拽式编程,检测系统与集成技术,PLC通讯及主流相机SDK支持,视觉通用框架软件:拖拽式编程,智能检测与定位系统,支持PLC通讯与主流相机SDK集成,视觉通用框架软件 视觉通用软件
- 恒压供水全套图纸程序:西门子S7-200 Smart触摸屏下的四泵一辅变频控制系统,PID调节,界面友好,运行稳定,含电气图纸与详细注释 ,恒压供水全套图纸程序:西门子S7-200 Smart精准控制
- 基于皮尔逊算法的影视推荐系统-使用MATLAB的GUI界面设计与开发,基于皮尔逊算法的电影推荐系统:MATLAB GUI界面的开发与应用,基于的皮尔逊算法的电影推荐系统 使用MATLAB的gui界面
- 基于高阶滑模控制算法(FST-SMC)的永磁同步电机速度环控制模型研究:抗负载扰动与宽速范围内无超调性能探究及赠送资料,基于高阶滑模控制算法的永磁同步电机速度环控制模型研究-抗负载扰动能力强,宽速范
- LabVIEW实现与三菱PLC FX3U的MC协议TCP通讯:命令帧读写与通信配置全功能源码实现,LabVIEW实现TCP通讯与三菱PLC FX3U交互:MC协议报文安全读写,命令帧编写及网络配置,L
- 基于S7-200 PLC与组态王技术的自动扶梯控制系统:梯形图程序、接线图及IO分配详解与组态画面展示,基于S7-200 PLC与组态王的自动扶梯控制系统集成方案:梯形图程序解析、接线图与原理图图纸详
- 基于S7-200 PLC的自动智能粮仓系统:原理图、接线图及组态画面详解,基于S7-200 PLC的自动智能粮仓系统:带详解的接线图与组态画面原理图,S7-200 mcgs基于plc的自动智能粮仓系统
- 开源多商户客服系统:H5/公众号/PC端全渠道接入,高性能稳定,数据安全保护,私有部署灵活掌控,多商户在线客服系统源码:支持多端接入,性能稳定数据安全,可二次开发私有部署,演示测试一应俱全,多商户在线
- MATLAB Simulink电动汽车七自由度模型搭建:涵盖纵向、侧向及横摆运动,模糊控制算法与魔术公式轮胎模型详解,MATLAB Simulink电动汽车七自由度模型搭建:涵盖纵向、侧向及横摆运动
- 基于单片机的温度控制与恒温系统:实物仿真一致,功能详解及硬件组成图示,基于单片机的温度控制与恒温系统:实物仿真一致,显示温度与设定上下限,声光提示超出范围 ,基于单片机的温度控制系统,基于单片机的恒温
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


