BastilleResearch / gr-lora

GNU Radio OOT module implementing the LoRa PHY, based on https://github.com/matt-knight/research/tree/master/2016_05_20_jailbreak
GNU General Public License v3.0
470 stars 92 forks source link

unable to run the default examples #22

Closed sajanikapukotuwa closed 6 years ago

sajanikapukotuwa commented 6 years ago

Dear all,

I installed GNURadio and drivers for my USRP N210 on Ubuntu 16.04 LTS using the following commands.

`sudo apt-get install libuhd-dev libuhd003 uhd-host GNURadio After setting the IP of my PC ethernet to 192.168.10.3, I am able to successfully communicate with the USRP and its FPGA too was upgraded to latest firmware. Although, I did try using PPA;s for installing UHD drivers and GNURadio, their combination didnt work. Installing from default repos got me to the point to use the USRPs.

My intension is to receive LoRa packets using the USRP N210. Hence, I did the following,

git clone git://github.com/BastilleResearch/gr-lora.git
cd gr-lora
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

All the above commands ran with no problem.

I then went into examples folder and tried to run the tx_usrp example. But I keep receiving the following error message. I just want to get these examples to work so that I can work my way up.

<<< Welcome to GNU Radio Companion 3.7.9 >>>

Preferences file: /home/user/.gnuradio/grc.conf
Block paths:
    /usr/local/share/gnuradio/grc/blocks
    /usr/share/gnuradio/grc/blocks
    /home/user/.grc_gnuradio

Loading: "/home/user/Downloads/txrx_usrp.grc"
>>> Done

Showing: "/home/user/Downloads/txrx_usrp.grc"

Loading: "/home/user/gr-lora/examples/tx_usrp.grc"
>>> Done

Showing: "/home/user/gr-lora/examples/tx_usrp.grc"

Generating: '/home/user/gr-lora/examples/top_block.py'

Executing: /usr/bin/python -u /home/user/gr-lora/examples/top_block.py

linux; GNU C++ version 5.3.1 20151219; Boost_105800; UHD_003.009.002-0-unknown

-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes

UHD Warning:
    Unable to set the thread priority. Performance may be negatively affected.
    Please see the general application notes in the manual for instructions.
    EnvironmentError: OSError: error in pthread_setschedparam
Using Volk machine: avx2_64_mmx_orc
Traceback (most recent call last):
  File "/home/user/gr-lora/examples/top_block.py", line 228, in <module>
    main()
  File "/home/user/gr-lora/examples/top_block.py", line 222, in main
    tb = top_block_cls()
  File "/home/user/gr-lora/examples/top_block.py", line 137, in __init__
    self.lora_mod_0 = lora.mod(spreading_factor, 0x12)
AttributeError: 'module' object has no attribute 'mod'

>>> Done (return code 1)

Generating: '/home/user/gr-lora/examples/top_block.py'

Executing: /usr/bin/python -u /home/user/gr-lora/examples/top_block.py

linux; GNU C++ version 5.3.1 20151219; Boost_105800; UHD_003.009.002-0-unknown

-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes

UHD Warning:
    Unable to set the thread priority. Performance may be negatively affected.
    Please see the general application notes in the manual for instructions.
    EnvironmentError: OSError: error in pthread_setschedparam
Using Volk machine: avx2_64_mmx_orc
Traceback (most recent call last):
  File "/home/user/gr-lora/examples/top_block.py", line 228, in <module>
    main()
  File "/home/user/gr-lora/examples/top_block.py", line 222, in main
    tb = top_block_cls()
  File "/home/user/gr-lora/examples/top_block.py", line 137, in __init__
    self.lora_mod_0 = lora.mod(spreading_factor, 0x12)
AttributeError: 'module' object has no attribute 'mod'

>>> Done

I did not chose a specific location to install GNURadio and I am doubting if thats the reason for my errors.

I noticed that in the wiki, there are instructions to set some PATH variables. I understand how to generally set PATH variables in GNU/Linux but I do not know where exactly to set these paths to as I did the normal installation; not to a specific installation directory. I also do not know how to figure out where those path variables must be set to. I did try compiling GNURadio from source but it didn't work out for me.

I would really appreciate some advice, the strategic approach to get these default examples to work.

Thanks a lot.