Open t812206236 opened 3 years ago
Also, you will see a lot of changes, but these changes are automatically generated by gr_modtool, the new oot3.8 seems to have changed a lot of things.
I can't seem to get it to work now. "make" is having error with theses lines of code:
"<+OTYPE+> out = (<+OTYPE+> )"
r ::io_signature::make(<+MIN_IN+>, <+MAX_IN+>, sizeof(<+ITYPE+>)),
" gr::io_signature::make(<+MIN_IN+>, <+MAX_IN+>, sizeof(<+ITYPE+>)) output_items[0];"
gr::io_signature::make(<+MIN_OUT+>, <+MAX_OUT+>, sizeof(<+OTYPE+>)))
const <+ITYPE+> in = (const <+ITYPE+> ) input_items[0];
@KimlongSeng I don't know why you can't compile, but I want to say that some libraries used by gnuradio's series of things are not compatible with the latest libraries, so they made a thing called pybombs. If you don't use pybombs, you may not have a problem, but once there is a problem, you don't know whose problem it is, Therefore, it is recommended to use pybombs as your gnuradio running environment, so that you can do relevant development at ease PyBOMBS ? The What, the How and the Why
Update: I manage to get the miller_decoder block show up with getting an error in the gnuradio, and fix the nfc lib error by add path to python sys manually.
My last error is showing:
Generating: '/home/rlab-dell-2/Documents/GNU radio/top_block.py'
Executing: /usr/bin/python3 -u /home/rlab-dell-2/Documents/GNU radio/top_block.py
Warning: failed to XInitThreads()
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.8.1.0
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Enabled direct sampling mode, input 2
Exact sample rate is: 2000000.052982 Hz
Traceback (most recent call last):
File "/home/rlab-dell-2/Documents/GNU radio/top_block.py", line 172, in
Done (return code 1)
@t812206236 Have you ever encounter this error : module 'nfc' has no attribute 'modified_miller_decoder'. it is from the auto generate gnu-radio python(graph flow )
@KimlongSeng I just tried and didn't encounter this problem
I see it is probably something to do with importing modual from python2+ to python 3+. Thank you for the reply :) @t812206236
@KimlongSeng I really, really suggest you use pybombs,The following is its built-in script for setting up the environment
cjq@cjq-Latitude-5288:~/prefix-3.8$ cat ./setup_env.sh
# WARNING: This file is auto-generated by pybombs, any manual changes to it may be overwritten!
export PATH="/home/cjq/prefix-3.8/bin:$PATH"
export PYTHONPATH="/home/cjq/prefix-3.8/lib/python3/site-packages:/home/cjq/prefix-3.8/lib/python3/dist-packages:/home/cjq/prefix-3.8/lib/python3.8/site-packages:/home/cjq/prefix-3.8/lib/python3.8/dist-packages:/home/cjq/prefix-3.8/lib64/python3/site-packages:/home/cjq/prefix-3.8/lib64/python3/dist-packages:/home/cjq/prefix-3.8/lib64/python3.8/site-packages:/home/cjq/prefix-3.8/lib64/python3.8/dist-packages:$PYTHONPATH"
export LD_LIBRARY_PATH="/home/cjq/prefix-3.8/lib:/home/cjq/prefix-3.8/lib64/:$LD_LIBRARY_PATH"
export LIBRARY_PATH="/home/cjq/prefix-3.8/lib:/home/cjq/prefix-3.8/lib64/:$LIBRARY_PATH"
export PKG_CONFIG_PATH="/home/cjq/prefix-3.8/lib/pkgconfig:/home/cjq/prefix-3.8/lib64/pkgconfig:$PKG_CONFIG_PATH"
export PYBOMBS_PREFIX="/home/cjq/prefix-3.8"
# If we're in a Python virtualenv, activate that
if [ -r /home/cjq/prefix-3.8/bin/activate ]; then
source /home/cjq/prefix-3.8/bin/activate
fi
cjq@cjq-Latitude-5288:~/prefix-3.8$
Did you see it? It has helped you select the tools you need
I reinstall gnu radio with pybomb, and it does not recognize the rtlsdr_source at first , but after installing rtl-sdr., it still show "AttributeError: module 'nfc' has no attribute 'modified_miller_decoder'" when i try to run it.
$ cat ./setup_env.sh /# WARNING: This file is auto-generated by pybombs, any manual changes to it may be overwritten! export PATH="/home/rlab-dell-2/prefix-3.8/bin:$PATH" export PYTHONPATH="/home/rlab-dell-2/prefix-3.8/lib/python3/site-packages:/home/rlab-dell-2/prefix-3.8/lib/python3/dist-packages:/home/rlab-dell-2/prefix-3.8/lib/python3.8/site-packages:/home/rlab-dell-2/prefix-3.8/lib/python3.8/dist-packages:/home/rlab-dell-2/prefix-3.8/lib64/python3/site-packages:/home/rlab-dell-2/prefix-3.8/lib64/python3/dist-packages:/home/rlab-dell-2/prefix-3.8/lib64/python3.8/site-packages:/home/rlab-dell-2/prefix-3.8/lib64/python3.8/dist-packages:$PYTHONPATH" export LD_LIBRARY_PATH="/home/rlab-dell-2/prefix-3.8/lib:/home/rlab-dell-2/prefix-3.8/lib64/:$LD_LIBRARY_PATH" export LIBRARY_PATH="/home/rlab-dell-2/prefix-3.8/lib:/home/rlab-dell-2/prefix-3.8/lib64/:$LIBRARY_PATH" export PKG_CONFIG_PATH="/home/rlab-dell-2/prefix-3.8/lib/pkgconfig:/home/rlab-dell-2/prefix-3.8/lib64/pkgconfig:$PKG_CONFIG_PATH" export PYBOMBS_PREFIX="/home/rlab-dell-2/prefix-3.8" /# If we're in a Python virtualenv, activate that if [ -r /home/rlab-dell-2/prefix-3.8/bin/activate ]; then source /home/rlab-dell-2/prefix-3.8/bin/activate
@jcrona
I redo this upgrade and avoid unnecessary changes,The instructions I did below:
For related tutorials, please refer to https://wiki.gnuradio.org/index.php/OutOfTreeModules.
The only problem is that this package does not implement the test, as if it was not implemented. In addition, it is not tested whether nfc is executed according to its logic. At present, it can only be compiled and run, and the block nfc_modified_miller_decoder can be seen in gr3.8, but I think there should be no problem. After all, I did not change the source code.
Signed-off-by: cjq 812206236@qq.com