bastibl / gr-ieee802-15-4

IEEE 802.15.4 ZigBee Transceiver
https://www.wime-project.net
GNU General Public License v3.0
270 stars 87 forks source link

ieee802_15_4 has no attribute rime_stack #70

Closed martinbishopx closed 1 year ago

martinbishopx commented 1 year ago

Hey Basti!

I could successfully build the two hierarchical blocks. I had to adjust my library path for the python modules because it could not been found before:

export PYTHONPATH=/usr/local/lib/python3/dist-packages/:${PYTHONPATH}

When I am not trying to run the "transceiver_CSS_loopback.grc I am getting the following error:

<<< Welcome to GNU Radio Companion 3.8.5.0 >>>

Block paths:
    /home/debug/.grc_gnuradio
    /usr/share/gnuradio/grc/blocks
    /usr/local/share/gnuradio/grc/blocks

Loading: "/home/debug/gr-ieee802-15-4/examples/transceiver_CSS_loopback.grc"
>>> Done

Generating: '/home/debug/gr-ieee802-15-4/examples/transceiver_CSS_loopback.py'
>>> Warning: This flow graph may not have flow control: no audio or RF hardware blocks found. Add a Misc->Throttle block to your flow graph to avoid CPU congestion.

Executing: /usr/bin/python3 -u /home/debug/gr-ieee802-15-4/examples/transceiver_CSS_loopback.py

Warning: failed to XInitThreads()
Error: failed to enable real-time scheduling.
Traceback (most recent call last):
  File "/home/debug/gr-ieee802-15-4/examples/transceiver_CSS_loopback.py", line 374, in <module>
    main()
  File "/home/debug/gr-ieee802-15-4/examples/transceiver_CSS_loopback.py", line 350, in main
    tb = top_block_cls()
  File "/home/debug/gr-ieee802-15-4/examples/transceiver_CSS_loopback.py", line 205, in __init__
    self.ieee802_15_4_rime_stack_0 = ieee802_15_4.rime_stack([129], [131], [132], [23,42])
AttributeError: module 'ieee802_15_4' has no attribute 'rime_stack'

>>> Done (return code 1)

The blocks have been found so far. Within the code I was also not able to find the "rime_stack" attribute. Do you have an idea what went wrong? :)

grafik

martinbishopx commented 1 year ago

I am not sure if it is important but I am using Ubuntu 20.04 in a VM. I used/built the corresponding branch (maint-3.8 ) for gnuradio compantion 3.8. The building process worked out so far. I also had to connect the lines of the CSS_PHY.grc project, but I guess, even if I made a wrong connection there, this block built should not be the problem here?

Thanks! :)

bastibl commented 1 year ago

Did you look at this issue: https://github.com/bastibl/gr-ieee802-15-4/issues/50 ?

martinbishopx commented 1 year ago

Hey Basti! Thanks for the quick response. Unfortunately it did not work. I have swig installed and the two path variables set as follow:

debug@go:~$ echo $LD_LIBRARY_PATH
/home/debug/gr-ieee802-15-4/build/lib/:LD_LIBRARY_PATH

The "libgnuradio-ieee802_15_4.so " is in there as shown below:

debug@go:~$ ls -lisa /home/debug/gr-ieee802-15-4/build/lib/
1050170   4 drwxrwxr-x 4 debug debug   4096 Mai  5 22:11 .
1050148   4 drwxrwxr-x 8 debug debug   4096 Mai  5 22:11 ..
1050172   4 drwxrwxr-x 3 debug debug   4096 Mai  5 21:36 cmake
1050171   4 drwxrwxr-x 4 debug debug   4096 Mai  5 22:11 CMakeFiles
1050207   8 -rw-rw-r-- 1 debug debug   5122 Mai  5 21:36 cmake_install.cmake
1050214   4 -rw-rw-r-- 1 debug debug    281 Mai  5 21:36 CTestTestfile.cmake
1050311   0 lrwxrwxrwx 1 debug debug     36 Mai  5 21:38 libgnuradio-ieee802_15_4.so -> libgnuradio-ieee802_15_4.so.1.1.0git
1050310   0 lrwxrwxrwx 1 debug debug     46 Mai  5 21:38 libgnuradio-ieee802_15_4.so.1.1.0git -> libgnuradio-ieee802_15_4.so.v3.6-108-g881b7011
1050309 576 -rwxrwxr-x 1 debug debug 586664 Mai  5 21:38 libgnuradio-ieee802_15_4.so.v3.6-108-g881b7011
1050205  44 -rw-rw-r-- 1 debug debug  41942 Mai  5 21:36 Makefile

The PYTHONPATH is also being set as follow:

debug@go:~$ echo $PYTHONPATH
/usr/local/lib/python3/dist-packages/:/usr/local/lib/python3/dist-packages/:

The modules can be successfully imported as shown below:

imported_modules

Swig is also being installed:

debug@go:~$ swig
Must specify an input file. Use -help for available options.

Did I miss a certain path? I am using Ubuntu 20.04 in the default installation setup. One thing that might help and which sounds like I am missing a path, is the following:

When I deactivate the RIME STACK block and try to build it, I get the following error:

AttributeError: module 'ieee802_15_4' has no attribute 'mac'

Thanks for your support! :)

bastibl commented 1 year ago

Set the LD_LIBRARY_PATH to the install path of the library (not the build dir). Probably that's /usr/local/lib. Then do sudo ldconfig.

martinbishopx commented 1 year ago

Hey Basti! Thanks for the support! I did not rebuild the project after installing swig. I did it and it worked. Should check the log next time because it mentioned swig is now being installed - wasn't before. Thanks for your help!