# gr-lora
This is an open-source implementation of the LoRa CSS PHY, based on the blind signal analysis conducted by @matt-knight. The original research that guided this implementation may be found at https://github.com/matt-knight/research
## LoRa
LoRa is a wireless LPWAN PHY that is developed and maintained by Semtech. It is designed to provide long range, low data rate connectivity to IoT-focused devices. A reasonable analogy is that LoRa is like cellular data service, but optimized for embedded devices.
## Implementation for Gnuradio
Since LoRa is closed-source technology, all open source implementations may differ from each other. Currently, there exist two versions of lora implementation for gnuradio simulation and experiments on SDR devices, e.g. USRP. We call them version [rpp0](https://github.com/rpp0/gr-lora.git) and version [Bastille](https://github.com/BastilleResearch/gr-lora.git).
- **Version rpp0** is implemented on gnuradio 3.8. It only provides receiver module including demodulation and decode part. The receiver can demodulate and decode messages emitted by RN2483 nodes with a USRP source. This implementation is relatively more robust than the other one. (This is my own feeling.)
- **Version Bastille** is implemented on gnuradio 3.7. It provides both transmitter and receiver, i.e. encoder, modulator, demodulator can decoder. The repository is not updated for several years. Still there are some problems in the orginal version:
1) The encoder only implements situations for SF = 8.
2) Gnuradio 3.7 is based on python 2.7, which is out of date.
3) The transmitting-receiving process only works for low data rate mode.
4) The performance is highly affected by ```fft_size_factor```, which is confusing. A larger fft_size_factor leads to worse performance.
5) Continous check is not robust for ```preamble detect``` and ```SFD found```. Note that 0 and 2^SF-1 is neighbors.
6) Both transmitter and receiver keep a sampling rate of bandwidth without oversampling. This can be not stable.
## Lora modulation-demodulation
In our repo, we mainly focus on modulation-demodulation. Lora is modulated by linear chirps and demoluated by fft. Consider
parameters:
- ```SF```: spreading factor
- ```BW```: bandwidth
- ```Fs```: sampling rate
Then a symbol is within interval [0, 2^SF - 1]. Assume that value of some symbol is ```n```. We use ```N``` to refer to 2 ^ SF, i.e. ![](http://latex.codecogs.com/svg.latex?N=2^{SF).
Each symbol occupies a time interval ![](http://latex.codecogs.com/svg.latex?T=\frac{N}{BW}). Then a standard upchirp is
![](http://latex.codecogs.com/svg.latex?s(t)=exp(2{\pi}jt(-\frac{1}{2}BW+\frac{BW}{2T}t+\frac{n}{T}))), where ```0 <= t < T```
The downchirp can be derivated in the same way.
Suppose ![](http://latex.codecogs.com/svg.latex?K=\frac{Fs}{BW}), ```K``` is usually an integer. Then we have the discrete signal after samling:
![](http://latex.codecogs.com/svg.latex?s'(i)=s(\frac{i}{KBW})=exp(2{\pi}ji(-\frac{1}{2K}+\frac{i}{2K^2N}+\frac{n}{KN}))), ```0 <= i < KN```
## Improvement
Therefore, we have refined implementation based on version Bastille. We have addressed problems ```iv, v, vi``` mentioned above.
## Configuration
- Spreading Factor: Number of bits per symbol, typically [6:12].
- Code Rate / # Parity Bits: Order of the Hamming FEC used. The number of data bits per codeword is always 4, but the number of parity bits can range from [1:4].
- Header: Whether frames produced/consumed by the frame will contain the 8-symbol header.
- FFT Window Beta: Controls the shape of the Kaiser windowing curve that is applied to the FFT input IQ.
- FFT Size Factor: Multiplier applied to the width/number of bins of the FFT. A multiplier of 1 yields 2\*\*spreading_factor bins, the minimum number required by the modulation. Received symbols are divided down to map within the valid range of [0:(2\*\*sf)-1]. Initial experimentation reveals 2 yields good performance.
## Installation
```
git clone git://github.com/BastilleResearch/gr-lora.git
cd gr-lora
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
```
## Usage
Example flowgraphs are provided in the examples/ directory. Socket PDUs are used as the primary input interface. Socket PDUs configured as UDP Servers may be connected to via:
```$ nc -u localhost 52001```
## Limitations and TODOs
- there are a lot of todos. This repo is still updating for research.
## Acknowledgements
- Balint Seeber and the Bastille Threat Research Team
- IQ Donors Thomas Telkamp and Chuck Swiger
没有合适的资源?快使用搜索试试~ 我知道了~
gr-lora.zip
共276个文件
cmake:75个
make:54个
py:22个
需积分: 1 1 下载量 31 浏览量
2023-08-26
18:59:26
上传
评论
收藏 780KB ZIP 举报
温馨提示
gr-lora.zip
资源推荐
资源详情
资源评论
收起资源包目录
gr-lora.zip (276个子文件)
CMakeDetermineCompilerABI_CXX.bin 8KB
CMakeDetermineCompilerABI_C.bin 8KB
CMakeCCompilerId.c 23KB
gr-lora.cbp 40KB
demod_impl.cc 30KB
decode_impl.cc 21KB
encode_impl.cc 18KB
mod_impl.cc 7KB
utils.cc 5KB
test_lora.cc 1KB
qa_lora.cc 1KB
cmake.check_cache 85B
GrMiscUtils.cmake 19KB
CMakeDoxygenDefaults.cmake 19KB
Makefile.cmake 13KB
UseSWIG.cmake 11KB
GrSwig.cmake 10KB
GrPython.cmake 9KB
CMakeParseArgumentsCopy.cmake 6KB
GrTest.cmake 6KB
CMakeCXXCompiler.cmake 5KB
cmake_install.cmake 3KB
cmake_install.cmake 3KB
CMakeCCompiler.cmake 2KB
cmake_install.cmake 2KB
GrPlatform.cmake 2KB
cmake_install.cmake 2KB
cmake_install.cmake 2KB
CTestTestfile.cmake 2KB
cmake_install.cmake 2KB
cmake_install.cmake 2KB
DependInfo.cmake 1KB
cmake_uninstall.cmake 1KB
cmake_install.cmake 1KB
cmake_install.cmake 1KB
DependInfo.cmake 1KB
FindGnuradioRuntime.cmake 1KB
FindCppUnit.cmake 1KB
DependInfo.cmake 1KB
DependInfo.cmake 956B
DependInfo.cmake 953B
DependInfo.cmake 950B
loraConfig.cmake 731B
CMakeDirectoryInformation.cmake 652B
CMakeDirectoryInformation.cmake 652B
CMakeDirectoryInformation.cmake 652B
CMakeDirectoryInformation.cmake 652B
CMakeDirectoryInformation.cmake 652B
CMakeDirectoryInformation.cmake 652B
CMakeDirectoryInformation.cmake 652B
CMakeDirectoryInformation.cmake 652B
CMakeDirectoryInformation.cmake 652B
DependInfo.cmake 649B
CTestTestfile.cmake 647B
cmake_clean.cmake 471B
DependInfo.cmake 423B
DependInfo.cmake 423B
DependInfo.cmake 423B
DependInfo.cmake 423B
DependInfo.cmake 423B
DependInfo.cmake 423B
DependInfo.cmake 423B
DependInfo.cmake 423B
DependInfo.cmake 423B
CTestTestfile.cmake 409B
cmake_clean.cmake 403B
CMakeSystem.cmake 398B
cmake_clean.cmake 365B
cmake_clean.cmake 351B
cmake_clean.cmake 346B
cmake_clean.cmake 326B
CTestTestfile.cmake 318B
CTestTestfile.cmake 315B
CTestTestfile.cmake 315B
cmake_clean.cmake 313B
cmake_clean.cmake 313B
cmake_clean.cmake 313B
CTestTestfile.cmake 299B
CTestTestfile.cmake 299B
CTestTestfile.cmake 297B
cmake_clean.cmake 296B
cmake_clean.cmake 252B
cmake_clean.cmake 252B
cmake_clean.cmake 252B
cmake_clean.cmake 227B
cmake_clean.cmake 200B
cmake_clean.cmake 160B
COPYING 34KB
CMakeCXXCompilerId.cpp 22KB
_lora_swig_swig_tag.cpp 26B
_lora_swig_doc_tag.cpp 26B
main_page.dox 269B
group_defs.dox 205B
Doxyfile 80KB
Doxyfile 79KB
.gitignore 176B
.gitignore 176B
.gitignore 7B
txrx_usrp.grc 59KB
rx_usrp.grc 42KB
共 276 条
- 1
- 2
- 3
资源评论
wzxue1984
- 粉丝: 18
- 资源: 913
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功