GNU Radio M17 protocol implementation
 
 
 
 
 
Go to file
Jean-Michel Friedt 9e175e43e6 doxygen files 2023-03-20 17:15:15 +01:00
M17_Implementations@cad279a3eb update submodule version 2023-02-21 07:23:14 +01:00
apps initial commit GNU Radio 3.10 2023-02-20 18:27:58 +01:00
cmake initial commit GNU Radio 3.10 2023-02-20 18:27:58 +01:00
docs doxygen files 2023-03-20 17:15:15 +01:00
examples add decoder Threshold as a user-tunable parameter + loopback example 2023-03-07 12:11:02 +01:00
grc add decoder Threshold as a user-tunable parameter + loopback example 2023-03-07 12:11:02 +01:00
include/gnuradio/m17 add decoder Threshold as a user-tunable parameter + loopback example 2023-03-07 12:11:02 +01:00
lib add decoder Threshold as a user-tunable parameter + loopback example 2023-03-07 12:11:02 +01:00
python/m17 doxygen files 2023-03-20 17:15:15 +01:00
.gitmodules Initial commit of submodule 2023-02-20 17:32:52 +01:00
CMakeLists.txt initial commit GNU Radio 3.10 2023-02-20 18:27:58 +01:00
LICENSE Initial commit 2023-02-20 09:07:25 +01:00
MANIFEST.md MANIFEST file 2023-03-14 06:34:31 +01:00
README.md remove TODO list from the README 2023-03-06 07:15:01 +01:00

README.md

Compiling for GNU Radio

The default targetted version is GNU Radio 3.10 (main branch). For GNU Radio 3.8, insert git checkout 3.8 after the git clone ... command and check the 3.8 branch version of the README.md for LD_LIBRARY_PATH and PYTHONPATH tested on Debian/stable.

git clone --recursive https://github.com/M17-Project/gr-m17
cd gr-m17
mkdir build
cd build
cmake ../
make -j12
sudo make install

will finish with a statement such as

-- Set runtime path of "/usr/local/lib/python3.11/dist-packages/gnuradio/m17/m17_python.cpython-311-x86_64-linux-gnu.so" to ""

meaning that variables must be set (tested with Debian/sid) to help GNU Radio Companion find the Python libraries:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu/
export PYTHONPATH=/usr/local/lib/python3.11/dist-packages/

where the LD_LIBRARY_PATH setting results from

find /usr/local/ -name libgnuradio-m17.so.1.0.0 -print

When running the flowgraph found in examples with gnuradio-companion ../examples/m17_streamer.grc

the output should be

Generating: '.../M17_Implementations/SP5WWP/gr-m17/examples/m17_streamer.py'

Executing: /usr/bin/python3 -u .../M17_Implementations/SP5WWP/gr-m17/examples/m17_streamer.py

new meta: helloworld
new SRC ID: 1 2 3 4 5 6
new DST ID: 255 255 255 255 255 255
New sampling rate: 8800.000000
new type: 0 0
got_lsf=1
LSF
DST: #BCAST    SRC: FPR-4U3F  TYPE: 0000 META: 68656C6C6F776F726C6400000000 LSF_CRC_OK 
FN: 0000 PLD: 00000000000000000000000000000000
FN: 0001 PLD: 00000000000000000000000000000000
FN: 0002 PLD: 00000000000000000000000000000000
FN: 0003 PLD: 00000000000000000000000000000000
FN: 0004 PLD: 00000000000000000000000000000000
DST: #BCAST    SRC: FPR-4U3F  TYPE: 0000 META: 68656C6C6F776F726C6400000000 LSF_CRC_OK 
FN: 0005 PLD: 00000000000000000000000000000000
FN: 0006 PLD: 00000000000000000000000000000000
FN: 0007 PLD: 00000000000000000000000000000000
FN: 0008 PLD: 00000000000000000000000000000000
FN: 0009 PLD: 00000000000000000000000000000000
FN: 000A PLD: 00000000000000000000000000000000
DST: #BCAST    SRC: FPR-4U3F  TYPE: 0000 META: 68656C6C6F776F726C6400000000 LSF_CRC_OK 
FN: 000B PLD: 00000000000000000000000000000000
FN: 000C PLD: 00000000000000000000000000000000
FN: 000D PLD: 00000000000000000000000000000000
FN: 000E PLD: 00000000000000000000000000000000
FN: 000F PLD: 00000000000000000000000000000000

Warning: the default gr_modtool informs GNU Radio Companion to import m17 rather than from gnuradio import m17. This has to be changed in the YML files manually as the template is erroneous.

Developer note1

In case of error related to Python bindings for m17_coder.h are out of sync after changing header files in include/gnuradio/m17, make sure that

md5sum include/gnuradio/m17/m17_decoder.h

match the information in python/m17/bindings/*cc.

Rather than manually changing the md5sum, the proper way of handling bindings in the Python directory is to execute

gr_modtool bind m17_decoder
gr_modtool bind m17_coder

from the gr-m17 directory, assuming gr_modtool bind works, otherwise check https://github.com/gnuradio/gnuradio/issues/6477

Developer note2

The coder block is an interpolating block outputing 24 more times samples than input symbols. The (well named) noutput_items it the output buffer size which fills much faster than the input stream so we fill out until noutput_items are reached, then send this to the GNU Radio scheduler, and consume the few input samples needed to fill the output buffer. The ring buffer mechanism of GNU Radio makes sure the dataflow is consistent.