Closed lwvmobile closed 4 months ago
I have tested the current M17 Encoder block with an MD-380 running OpenRTX. All DST/SRC/META fields are decoded properly.
The only thing that does not work yet is the packet mode. It can be selected with the drop-down menu, but that only affects one single bit of the TYPE field.
Dependencies have been added to the README.md
, although valid for Debian/Ubuntu only, other distributions will have to provide insight later.
Which version of GNU Radio are you using? In my 3.10 there are two throttle blocks (still not sure why, Marcus mentioned something about the reason at FOSDEM but I did not get it) and the legacy one (Throttle Block) is marked as obsolete (orange box), hence my use of the Throttle Block 2.
"and then passing the created file as input into M17-FME to test things out" <- is this not what examples/m17_tx.grc
is doing? My idea was to have two unit tests to check the compatibility between GNU Radio and the demonstration software in m17_tx.grc
and m17_rx.grc
and to have a GNU Radio only demonstration with m17_loopback.grc
independent of the external tools. Not sure if that makes sense.
Thanks for the comments.
The encoded bytes are gibberish when decoded by M17-FME, but I've found that just using the string input like it was before actually correctly encodes that as text, but you may want to put a correct payload in there, what is in there now doesn't quite come out right.
If you set the Encr. type
to None
and Encr. subtype
to Text
- you are supposed to pass a string of len<=14, as there are 14 bytes available in the META
field. If you set it to Extended callsign data
- you need to pass a byte array like this: '\x00\x00\x65\x41\xB0\x93\x02\x44\xE2\x47\x29\x77\x00\x00'
. This should give you "SP5WWP" and "GNURADIO".
Which version of GNU Radio are you using? In my 3.10 there are two throttle blocks
Currently using 3.10.5.1, which is the default on Debian 12. Just realized after googling that Debian Sid is not Debian 12, but Debian Unstable, and your README shows this was tested on GNU Radio 3.10.10.0, so perhaps that's why that block isn't available, lower version? Just illustrates something that I've come to expect from GNU Radio, they love to change/break things with each update.
The float File Sink was just a suggestion, as anything else, maybe its just best left to each individual user the things they want to add or subtract.
I have tested the current M17 Encoder block with an MD-380 running OpenRTX. All DST/SRC/META fields are decoded properly.
Yeah, as far as I can see, the Encoder Block works fine. I should have clarified, the defaults fed into the M17 Encoder Block on loopback.grc, the payload vector and META, specifically, those are the values I had suggested. In the tx.grc, the Meta is still the same 'Hello !' string, but in loopback, its now set to a 15 byte vector of '\x00\x00\x65\x41\xb0\x93\xff\x00\x00\x00\x00\x00\x00\x00\x00'
by default.
If you set the
Encr. type
toNone
andEncr. subtype
toText
- you are supposed to pass a string of len<=14, as there are 14 bytes available in theMETA
field. If you set it toExtended callsign data
- you need to pass a byte array like this:'\x00\x00\x65\x41\xB0\x93\x02\x44\xE2\x47\x29\x77\x00\x00'
. This should give you "SP5WWP" and "GNURADIO".
Literally just got this as I was replying, but the default is set to Geolocation by default in loopback.grc, so that's probably why I got gibberish out of that, I was under the assumption that it was meant to actually be the 'Hello !' encoded text string, and not encoded b40 extended callsign data. I went back and set it to extended callsign data with what you suggested into loopback and got your callsign correctly with the META you just mentioned.
M17 STR Frame Sync (05:35:40): LC: 6/6
LICH: 77 00 00 68 EE A0
DST: AB2CDE SRC: AB1CDE CAN: 0; Voice (3200bps) Stream FT: 0045; ET: 0; ES: 2;
Protocol: Meta Extended CSD; CF1: SP5WWP REF: GNURADIO
LSF: 00 00 1F 24 63 91 00 00 1F 24 5D 51 00 45 00
00 65 41 B0 93 02 44 E2 47 29 77 00 00 68 EE
(CRC CHK) E: 68EE; C: 68EE; FSN: 00124
What was pasted into there by default '\x00\x00\x65\x41\xB0\x93\x02\x44\xE2\x47\x29\x77\x00\x00'
from cloning gave this:
M17 STR Frame Sync (05:38:21): LC: 6/6
LICH: 00 00 00 F9 E0 A0
DST: AB2CDE SRC: AB1CDE CAN: 0; Voice (3200bps) Stream FT: 0045; ET: 0; ES: 2;
Protocol: Meta Extended CSD; CF1: SP5WWP REF: 59AZAK4B
LSF: 00 00 1F 24 63 91 00 00 1F 24 5D 51 00 45 00
00 65 41 B0 93 FF 00 00 00 00 00 00 00 F9 E0
Yea, this means some cleaning is needed in the example flowgraphs after having so many updates in the code :)
Anything left unfixed?
Anything left unfixed?
I've found you never want to ask this question, or else you'll always find something that isn't fixed, or just nits and nags to fix constantly. Still have the missing blocks_throttle_2, but its honestly not a big deal to just add an available one. I'll try to test in Arch when I have a chance to see if the bleeding edge version of GNU Radio presents the same missing block or not.
Anyways, not really anything major, but noticed in m17_loopback.grc that the default option in the QT GUI chooser is still set for Geolocation but META has extended callsign data in it. Just need to change the default option from 1 to 2. Also, the META has '\x00\x00\x65\x41\xb0\x93\xff\x00\x00\x00\x00\x00\x00\x00\x00'
in it, which I believe has an erroneous 0xFF byte in it which is the MSB on callsign field 2 (unless that was intentional as a reserved value 0xff0000000000). I'd recommend going with '\x00\x00\x65\x41\xB0\x93\x02\x44\xE2\x47\x29\x77\x00\x00'
that you supplied instead so it doesn't produce a garbage CF2 field value. Either that, or just changing 0xff to 0x00.
Didn't really try out any of the other .grc files, don't have any tx hardware anyways, but in receiverRTLSDR and transmitterPLUTOSDR, got an error on the CODEC2 blocks.
Just a warning nag, but getting this on a clean make, Doxygen nags. I'm not at all familiar with Doxygen, so not sure if this is just a version thing, or something easy to clean up, or just ignore it because it has no bearing on the operation of the software.
[ 66%] Built target pygen_apps_9a6dd283c3de653fbca500f9721f634f
[ 70%] Generating documentation with doxygen
warning: Tag 'LATEX_SOURCE_CODE' at line 1397 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'CLASS_DIAGRAMS' at line 1678 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
/home/sdr/gr-m17/M17_Implementations/libm17/doc/mainpage.dox:1: warning: found more than one \mainpage comment block! (first occurrence: /home/sdr/gr-m17/docs/doxygen/other/main_page.dox, line 1), Skipping current block!
[ 70%] Built target doxygen_target
[ 74%] Generating __init__.pyc
[ 77%] Generating __init__.pyo
[ 77%] Built target pygen_python_m17_d1a2c9fc3e052249004d7c5c10db0f5a
[ 77%] Built target copy_module_for_tests
[ 81%] Scraping generated documentation for docstrings ...
[ 81%] Built target extracted_docstrings
[ 85%] Adding docstrings into m17 pybind headers ...
[ 85%] Built target m17_docstrings
[ 88%] Building CXX object python/m17/bindings/CMakeFiles/m17_python.dir/m17_coder_python.cc.o
[ 92%] Building CXX object python/m17/bindings/CMakeFiles/m17_python.dir/m17_decoder_python.cc.o
[ 96%] Building CXX object python/m17/bindings/CMakeFiles/m17_python.dir/python_bindings.cc.o
[100%] Linking CXX shared module m17_python.cpython-311-x86_64-linux-gnu.so
lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
Which version of GNU Radio are you using? In my 3.10 there are two throttle blocks (still not sure why, Marcus mentioned something about the reason at FOSDEM but I did not get it) and the legacy one (Throttle Block) is marked as obsolete (orange box), hence my use of the Throttle Block 2.
Just looked at this again, looks like somewhere between version 3.10.5.1 and 3.10.10.0, they introduced the new throttle block, not sure when 3.10.5.1 came out exactly, but that's what shipped by default on Debian 12 anyways. I'll give it a whirl on Ubuntu 24.04 and Fedora, see if those have a more up to date version of GNU Radio or not. No idea what version the new throttle block was introduced, so might be hard to track down, but this link does contain version numbers supplied in different distro repos. https://wiki.gnuradio.org/index.php/InstallingGR
Okay, update on the update of the update, but I tested out on Ubuntu 24.04 LTS, and its GNU Radio version is new enough to include the new throttle block, and it also doesn't have the CODEC2 block issue, so I'll switch over to there for any further testing with gr-m17. I should also note that I didn't have to do any of the exports listed below and it just worked. Probably wouldn't have set correctly anyways if I did try them, since Ubuntu 24.04 LTS is on Python 3.12.3 right now.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu/
export PYTHONPATH=/usr/local/lib/python3.11/dist-packages/
It did throw up a number of cmake warnings and doxygen make warnings though, but other than that, seems to work okay in my limited testing.
sdr@Ubuntu2404LTS:~/gr-m17/build$ cmake ..
-- The CXX compiler identification is GNU 13.2.0
-- The C compiler identification is GNU 13.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Checking for module 'gmp'
-- Found gmp, version 6.3.0
-- Found GMP: /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Using GMP.
-- Found MPLIB: /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found suitable version "1.83.0", minimum required is "1.83.0") found components: date_time program_options system regex thread unit_test_framework
-- Found Volk: Volk::volk
-- User set python executable /usr/bin/python3
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/gnuradio/GrPython.cmake:21 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake:37 (include)
CMakeLists.txt:30 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: /usr/bin/python3 (found version "3.12.3")
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/gnuradio/GrPython.cmake:27 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake:37 (include)
CMakeLists.txt:30 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.12.so (found suitable exact version "3.12.3")
-- Performing Test HAVE_VISIBILITY_HIDDEN
-- Performing Test HAVE_VISIBILITY_HIDDEN - Success
-- Performing Test HAVE_WARN_SIGN_COMPARE
-- Performing Test HAVE_WARN_SIGN_COMPARE - Success
-- Performing Test HAVE_WARN_ALL
-- Performing Test HAVE_WARN_ALL - Success
-- Performing Test HAVE_WARN_NO_UNINITIALIZED
-- Performing Test HAVE_WARN_NO_UNINITIALIZED - Success
-- Found Git: /usr/bin/git
-- Extracting version information from git describe...
fatal: No names found, cannot describe anything.
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.8") found components: doxygen missing components: dot
-- Using install prefix: /usr/local
-- Building for version: 1.0.0.0 / 1.0.0
-- No C++ unit tests... skipping
<string>:3: SyntaxWarning: invalid escape sequence '\W'
-- PYTHON and GRC components are enabled
-- Python checking for pygccxml - found
CMake Warning (dev) at /usr/lib/cmake/pybind11/FindPythonLibsNew.cmake:98 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/lib/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
/usr/lib/cmake/pybind11/pybind11Common.cmake:188 (include)
/usr/lib/cmake/pybind11/pybind11Config.cmake:250 (include)
/usr/lib/x86_64-linux-gnu/cmake/gnuradio/GrPybind.cmake:3 (find_package)
python/m17/bindings/CMakeLists.txt:25 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: /usr/bin/python3
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.12.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /usr/include (found version "2.11.1")
<string>:3: SyntaxWarning: invalid escape sequence '\W'
-- Configuring done (2.8s)
-- Generating done (0.0s)
-- Build files have been written to: /home/sdr/gr-m17/build
sdr@Ubuntu2404LTS:~/gr-m17/build$ make
[ 3%] Building CXX object lib/CMakeFiles/gnuradio-m17.dir/m17_coder_impl.cc.o
[ 7%] Building CXX object lib/CMakeFiles/gnuradio-m17.dir/m17_decoder_impl.cc.o
[ 11%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/m17.c.o
[ 14%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/decode/symbols.c.o
[ 18%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/decode/viterbi.c.o
[ 22%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/encode/symbols.c.o
[ 25%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/encode/convol.c.o
[ 29%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/math/golay.c.o
[ 33%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/math/math.c.o
[ 37%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/math/rrc.c.o
[ 40%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/payload/call.c.o
[ 44%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/payload/crc.c.o
[ 48%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/payload/lich.c.o
[ 51%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/phy/interleave.c.o
[ 55%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/phy/randomize.c.o
[ 59%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/phy/sync.c.o
[ 62%] Building C object lib/CMakeFiles/gnuradio-m17.dir/__/M17_Implementations/libm17/phy/slice.c.o
[ 66%] Linking CXX shared library libgnuradio-m17.so
[ 66%] Built target gnuradio-m17
[ 66%] Built target pygen_apps_9a6dd283c3de653fbca500f9721f634f
[ 70%] Generating documentation with doxygen
warning: Tag 'HTML_TIMESTAMP' at line 977 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'FORMULA_TRANSPARENT' at line 1199 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'LATEX_SOURCE_CODE' at line 1397 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'CLASS_DIAGRAMS' at line 1678 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'DOT_FONTNAME' at line 1708 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'DOT_FONTSIZE' at line 1713 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'DOT_TRANSPARENT' at line 1862 of file '/home/sdr/gr-m17/build/docs/doxygen/Doxyfile' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
/home/sdr/gr-m17/M17_Implementations/libm17/doc/mainpage.dox:1: warning: found more than one \mainpage comment block! (first occurrence: /home/sdr/gr-m17/docs/doxygen/other/main_page.dox, line 1), Skipping current block!
[ 70%] Built target doxygen_target
[ 74%] Generating __init__.pyc
[ 77%] Generating __init__.pyo
[ 77%] Built target pygen_python_m17_d1a2c9fc3e052249004d7c5c10db0f5a
[ 77%] Built target copy_module_for_tests
[ 81%] Scraping generated documentation for docstrings ...
[ 81%] Built target extracted_docstrings
[ 85%] Adding docstrings into m17 pybind headers ...
[ 85%] Built target m17_docstrings
[ 88%] Building CXX object python/m17/bindings/CMakeFiles/m17_python.dir/m17_coder_python.cc.o
[ 92%] Building CXX object python/m17/bindings/CMakeFiles/m17_python.dir/m17_decoder_python.cc.o
[ 96%] Building CXX object python/m17/bindings/CMakeFiles/m17_python.dir/python_bindings.cc.o
[100%] Linking CXX shared module m17_python.cpython-312-x86_64-linux-gnu.so
lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
[100%] Built target m17_python
Is this resolved?
Is this resolved?
As far as I'm concerned, I suppose it is resolved, unless @jmfriedt wants to leave it open for any specific reason.
Closing. If something is still not right, please open a separate issue.
Saw you guys were doing some updates and adding things, and decided to check them out and tinker a bit. Anways, a few things I've noted, so take them for what its worth.
I did a clean install on Debian 12 in a VM, and just might be worth adding all the required dependencies to fully build from a clean slate. This is the dependencies I came up with, not sure if build-essential is overkill, but it gets the job done. doxygen during build seems to be purely optional, and when found was throwing a few random nag warnings, so, again, may be worth mentioning this on the README.
sudo apt install git cmake build-essential doxygen gnuradio
Second, on your tests where you send a vector as Codec2 Voice, you have a vector of 0x01 0x02 0x03..., this produces a chirping sound when played back. Might be better to just send a silent vector instead, and if you don't want a zero fill for that, I've found that these vectors are what M17-FME puts out when its 3200 voice and 1600 voice with 'hello' arb data, respectively.
Thirdly, there was an update that changed the META encode to encoded bytes. The encoded bytes are gibberish when decoded by M17-FME, but I've found that just using the string input like it was before actually correctly encodes that as text, but you may want to put a correct payload in there, what is in there now doesn't quite come out right. This is what I had when I had it as encoded, but if you copy and paste this in, the block shows the text string correctly, which also happens if you enter the string as letters directly.
Fourthly (is that a word?), when I build, the throttle block is not found and throws this up, so I had to just disable it and make a new throttle block and connect it. So, not sure if this is from a missing dependency, older version, or what. I've just been making a new throttle sink, connecting that to a 'float' type file sink, and then passing the created file as input into M17-FME to test things out. Speaking of which, might be worth while to include a float file sink connected to M17 Encoder block for cross compatibility with M17_Implementations and M17-FME. I mean, if you got multiple tools in the tool belt, they might as well all work together.