Hacking the GNURadio Module 'gr-satnogs'

Hello,

  • Build under Debian Buster

apt install -y build-essential cmake gnuradio g++
python-mako python-six libogg-dev
libvorbis-dev libpng-dev libpng+±dev
swig
cd /tmp
git clone https://github.com/gnuradio/volk.git
cd volk
mkdir build
cd build
cmake …
make -j $(nproc --all)
sudo make install

dpkg -r gr-satnogs

git clone https://gitlab.com/librespacefoundation/satnogs/gr-satnogs.git
cd gr-satnogs
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr …
make -j $(nproc --all)
make install

I’ve warnings when build ‘gr-satnogs’ with master branch :

gr-satnogs/include/satnogs/whitening.h:58: Warning 314: ‘in’ is a python keyword, renaming to ‘_in’
gr-satnogs/include/satnogs/whitening.h:60: Warning 314: ‘in’ is a python keyword, renaming to ‘_in’
gr-satnogs/include/satnogs/whitening.h:63: Warning 314: ‘in’ is a python keyword, renaming to ‘_in’
gr-satnogs/include/satnogs/whitening.h:65: Warning 314: ‘in’ is a python keyword, renaming to ‘_in’

Scanning dependencies of target _satnogs_swig0
[ 63%] Building CXX object swig/CMakeFiles/_satnogs_swig0.dir/satnogs_swig0PYTHON_wrap.cxx.o
gr-satnogs/build/swig/satnogs_swig0PYTHON_wrap.cxx:94908:41: warning: cast between incompatible function types from ‘PyObject* ()(PyObject, PyObject*, PyObject*)’ {aka ‘_object* ()(_object, _object*, _object*)’} to ‘PyCFunctio ’ {aka ‘_object* ()(_object, _object*)’} [-Wcast-function-type]
{ “whitening_sptr_make”, (PyCFunction)_wrap_whitening_sptr_make, METH_VARARGS|METH_KEYWORDS, (char *)“whitening_sptr_make(whitening_sptr self, uint32_t mask, uint32_t seed, uint32_t order) -> whitening_sptr”},
^~~~~~~~~~~~~~~~~~~~~~~~~
gr-satnogs/build/swig/satnogs_swig0PYTHON_wrap.cxx:94910:45: warning: cast between incompatible function types from ‘PyObject* ()(PyObject, PyObject*, PyObject*)’ {aka ‘_object* ()(_object, _object*, _object*)’} to ‘PyCFunctio ’ {aka ‘_object* ()(_object, _object*)’} [-Wcast-function-type]
{ “whitening_sptr_scramble”, (PyCFunction)_wrap_whitening_sptr_scramble, METH_VARARGS|METH_KEYWORDS, (char *)“whitening_sptr_scramble(whitening_sptr self, uint8_t * out, uint8_t const * _in, size_t len, bool msb=False)”},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gr-satnogs/build/swig/satnogs_swig0PYTHON_wrap.cxx:94911:47: warning: cast between incompatible function types from ‘PyObject* ()(PyObject, PyObject*, PyObject*)’ {aka ‘_object* ()(_object, _object*, _object*)’} to ‘PyCFunctio ’ {aka ‘_object* ()(_object, _object*)’} [-Wcast-function-type]
{ “whitening_sptr_descramble”, (PyCFunction)_wrap_whitening_sptr_descramble, METH_VARARGS|METH_KEYWORDS, (char *)“whitening_sptr_descramble(whitening_sptr self, uint8_t * out, uint8_t const * _in, size_t len, bool msb=False)”},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gr-satnogs/build/swig/satnogs_swig0PYTHON_wrap.cxx:94912:62: warning: cast between incompatible function types from ‘PyObject* ()(PyObject, PyObject*, PyObject*)’ {aka ‘_object* ()(_object, _object*, _object*)’} to ‘PyCFunctio ’ {aka ‘_object* ()(_object, _object*)’} [-Wcast-function-type]
{ “whitening_sptr_scramble_one_bit_per_byte”, (PyCFunction)_wrap_whitening_sptr_scramble_one_bit_per_byte, METH_VARARGS|METH_KEYWORDS, (char *)“whitening_sptr_scramble_one_bit_per_byte(whitening_sptr self, uint8_t * out, uint8_t const * _in, size_t bits_num)”},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gr-satnogs/build/swig/satnogs_swig0PYTHON_wrap.cxx:94913:64: warning: cast between incompatible function types from ‘PyObject* ()(PyObject, PyObject*, PyObject*)’ {aka ‘_object* ()(_object, _object*, _object*)’} to ‘PyCFunctio ’ {aka ‘_object* ()(_object, _object*)’} [-Wcast-function-type]
{ “whitening_sptr_descramble_one_bit_per_byte”, (PyCFunction)_wrap_whitening_sptr_descramble_one_bit_per_byte, METH_VARARGS|METH_KEYWORDS, (char *)“whitening_sptr_descramble_one_bit_per_byte(whitening_sptr self, uint8_t * out, uint8_t const * _in, size_t bits_num)”},

If install and test with stanogs-client 0.9.1, obersvation failed.

satnogs satnogs-client[481]: Traceback (most recent call last):
satnogs satnogs-client[481]: File “/usr/bin/satnogs_msk_ax25.py”, line 24, in
satnogs satnogs-client[481]: import satnogs
satnogs satnogs-client[481]: File “/usr/lib/python2.7/dist-packages/satnogs/init.py”, line 30, in
satnogs satnogs-client[481]: from satnogs_swig import *
satnogs satnogs-client[481]: File “/usr/lib/python2.7/dist-packages/satnogs/satnogs_swig.py”, line 22, in
satnogs satnogs-client[481]: from satnogs_swig0 import *
satnogs satnogs-client[481]: File “/usr/lib/python2.7/dist-packages/satnogs/satnogs_swig0.py”, line 986, in
satnogs satnogs-client[481]: MIN_WPM = _satnogs_swig0.MIN_WPM
satnogs satnogs-client[481]: AttributeError: ‘module’ object has no attribute ‘MIN_WPM’