GNU Radio Companion Flow Graph for Blade?

Follow our development of DSP and SDR tutorials

Moderator: robert.ghilduta

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: GNU Radio Companion Flow Graph for Blade?

Post by jynik » Sat Mar 01, 2014 8:11 am

Before going further, it's probably a good idea to verify that you've got the latest and greatest versions of everything.

To check your versions of all things bladeRF-related, load your FPGA and then run the version command in bladeRF-cli's interactive mode:

Code: Select all

jon@entropy [127] % bladeRF-cli -i  
bladeRF> load fpga ~/projects/bladeRF-files/hostedx40_v0.0.3.rbf 
Loading fpga from /home/jon/projects/bladeRF-files/hostedx40_v0.0.3.rbf...
Done.
bladeRF> version

  bladeRF-cli version:        0.10.5-git-8a5dc51
  libbladeRF version:         0.13.1-git-8a5dc51

  Firmware version:           1.6.1-git-b7e6642
  FPGA version:               0.0.3

bladeRF> 
To check your gr-osmosdr version, you can run the following. Note that I have to use the PKG_CONFIG_PATH environment varible because I installed my GNU Radio items in /opt. (h/t to horizon for pointing out that pkg-config info is availabe here.)

Code: Select all

PKG_CONFIG_PATH=/opt/gnuradio-3.7.1git/lib/pkgconfig/ pkg-config --modversion gnuradio
v0.1.0-70-gcc083037
Here we see that I'm at commit cc083037, which is the lastest commit to master if we check the associated osmocom repo

I'm going to write up a wiki page or to this morning/afternoon about looking for discontinuities and roughly determining the max sample rate your setup can run at. I'll post that here when I get a chance.

2011EE10487
Posts: 18
Joined: Tue Feb 25, 2014 6:39 am

Re: GNU Radio Companion Flow Graph for Blade?

Post by 2011EE10487 » Mon Mar 10, 2014 9:14 pm

Hi jynik,
Sorry for the late reply as I was on a vacation for a week. I've checked my versions of all things related to bladeRF. Here is the output of version command.

bladeRF-cli version: 0.10.2-git-9023f69
libbladeRF version: 0.12.1-git-9023f69
Firmware version: 1.6.0-git-89d57ff
FPGA version: 0.0.2

and the output of info command is

Serial #: e7130d59a56ffc2cb3c77e019a435981
VCTCXO DAC calibration: 0xa081
FPGA size: 40 KLE
FPGA loaded: yes
USB bus: 7
USB address: 2
USB speed: SuperSpeed
Backend: libusb
Instance: 0

On checking the version of osmosdr I am getting the output as
5410ee53.
Further I couldn't git clone from osmocon repo because of some error. So I cloned from https://github.com/bert/gr-osmosdr, And according to this https://github.com/bert/gr-osmosdr/commits/master my version is the newest.
Also if you have written the wiki can you share it here also.

Thanks.

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: GNU Radio Companion Flow Graph for Blade?

Post by jynik » Tue Mar 11, 2014 7:40 pm

Hi there,

So I see that your host software (libbladeRF and bladeRF-cli), firmware, and FPGA are all slightly older versions. I know it's a bit annoying, but I find it's easier to debug things when folks first get everything up to date first -- it helps rule out the possible number of differences in our setups, and keeps us from spinning our wheels on something that's already been fixed. Could you update those first, and then we'll go from there?

Given that you're having GNU Radio issues, I think it'd be better if you figured out the issue you're having with the osmocom repo. gr-osmosdr master tracks the latest and greatest bladeRF stuff very closely, so it's good to update that when updating the bladeRF software. The repo you are pulling from appears to have not sync'd up with the official gr-osmosdr master in about 3 months.

Could you paste a log from the following command, and we'll help you get straightened out with the gr-osmosdr repo situation?

Code: Select all

git clone git://git.osmocom.org/gr-osmosdr

2011EE10487
Posts: 18
Joined: Tue Feb 25, 2014 6:39 am

Re: GNU Radio Companion Flow Graph for Blade?

Post by 2011EE10487 » Thu Mar 13, 2014 11:32 am

I tried running the command git clone git://git.osmocom.org/gr-osmosdr and I'm getting the following message.
Cloning into 'gr-osmosdr'...
fatal: unable to connect to git.osmocom.org:
git.osmocom.org[0: 144.76.43.76]: errno=Connection refused
git.osmocom.org[1: 2a01:4f8:191:444b::2:5]: errno=Network is unreachable.

I guess this is because I'm behind a proxy server. So I run the following command (This I use to git clone other repositries from behind the proxy) git clone https://git.osmocom.org/gr-osmosdr. When I gave this command I got the following error.

fatal: https://git.osmocom.org/gr-osmosdr/info/refs not found: did you run git update-server-info on the server?

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: GNU Radio Companion Flow Graph for Blade?

Post by jynik » Thu Mar 13, 2014 5:15 pm

I haven't been in that situation, so I'm afraid I can't be of much help on that front. I see that someone posted a very similar quesion on Stack Overflow though, for what it's worth.

2011EE10487
Posts: 18
Joined: Tue Feb 25, 2014 6:39 am

Re: GNU Radio Companion Flow Graph for Blade?

Post by 2011EE10487 » Sat Mar 15, 2014 8:37 am

Hi jynik,
I've solved the issue of cloning the latest git repo. But now when I'm building the osmocom block (using the wiki http://sdr.osmocom.org/trac/wiki/GrOsmoSDR) I could successfully complete the command cmake ../ but when I've given the command make, it gave the following error

/home/shubham/Documents/gr-osmosdr/lib/bladerf/bladerf_source_c.cc: In member function ‘virtual int bladerf_source_c::work(int, gr_vector_const_void_star&, gr_vector_void_star&)’:
/home/shubham/Documents/gr-osmosdr/lib/bladerf/bladerf_source_c.cc:163:65: error: ‘bladerf_sync_rx’ was not declared in this scope
make[2]: *** [lib/CMakeFiles/gnuradio-osmosdr.dir/bladerf/bladerf_source_c.cc.o] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-osmosdr.dir/all] Error 2
make: *** [all] Error 2.

If you have any idea how to solve this problem then please help me out.

Thanks

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: GNU Radio Companion Flow Graph for Blade?

Post by jynik » Sat Mar 15, 2014 9:27 am

A new, easier to use interface for RX'ing and TX'ing samples has recently been added to libbladeRF, in v0.14.0.

gr-osmosdr master now includes an update to use that new interface. However, from the version number you posted earlier, I see that you're using a slightly dated libbladeRF version, which does not yet include this new interface.

So what you'll need to do is...
  • Put the latest software from the bladeRF git master. From the bladeRF repo directory, run:

    Code: Select all

    git pull master
  • rm your build/ directory, re-create it, and then run cmake ../ from inside that new build directory. This may be excessive, but I find that it rules out any doubt of properly reconfiguring things.
  • Rebuild and re-install the bladeRF software. When you run the CLI's version command, you should now see libbladeRF v0.14.0.
  • I'd rebuild gr-osmosdr, just to be thorough
  • Try running osmocom_fft -- you should now be up and running
In the near future, I'll be sending a patch to the gr-osmosdr maintainers to have the build complain about not seeing libbladeRF v0.14.0, rather than error out as you saw. Just need to get some time to do so :).

2011EE10487
Posts: 18
Joined: Tue Feb 25, 2014 6:39 am

Re: GNU Radio Companion Flow Graph for Blade?

Post by 2011EE10487 » Sat Mar 15, 2014 12:30 pm

Thanks for your help. I could solve that issue after getting the new version of libbladerf. But after getting the new version of all(libbladerf, bladerf-cli an osmocom), when I tried to run osmocom_fft I got the following message.
linux; GNU C++ version 4.7.2; Boost_104900; UHD_003.006.002-64-g92b0b7ab

gr-osmosdr v0.1.0-78-g1e8b45d0 (0.1.1git) gnuradio 3.7.2.1
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace
[bladeRF source] Using nuand LLC bladeRF #0 SN e713...5981 FW v1.6.1 FPGA v0.0.2
LNA gain range: start 0 stop 6 step 3
VGA1 gain range: start 5 stop 30 step 1
VGA2 gain range: start 0 stop 30 step 3
Supported sample rates 160000-40000000 step 40000.
Using Volk machine: avx_64_mmx_orc
Set center frequency to 1000000000.0
python2: /home/shubham/bladeRF/host/libraries/libbladeRF/src/sync_worker.c:78: rx_callback: Assertion `b->status[samples_idx] == SYNC_BUFFER_IN_FLIGHT' failed.
Aborted (core dumped)
.
I tried creating my own flowgraph for spectru analyser in gnuradio and execute it but I got the same error in that too. So if you could please help in solving this out.

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: GNU Radio Companion Flow Graph for Blade?

Post by jynik » Sat Mar 15, 2014 1:08 pm

That looks like a bug...specifically, a callback is happening with the provided transfer not being in the expected state...hence the assertion failure.

This may have been introduce in commit 06776a5f. Could you help me verify that by checking out the previous commit, and re-running?

Code: Select all

$ git checkout 5f8bcae45a7ce376e1dc0d9e0faab0e2ade9a481
$ rm -rf build
$ mkdir build && cd build
$ cmake ../
$ make && sudo make install
$ bladeRF-cli -i
bladeRF> version

 ... Verify the git tag portion of the version numbers match up with the first digits in the above changeset you checked out.
I will continue to look into this further.

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: GNU Radio Companion Flow Graph for Blade?

Post by jynik » Sat Mar 15, 2014 4:48 pm

I pushed a band-aid of a fix to master for this, just so it isn't in a totally broken state while I further dig into some other issues. While looking at this, I see that the sync interface doesn't correctly handle timeouts in the underlying async threads. I've opened issue #229 to track progress on fixing this.

With that said, I believe you should be up and running again, once you pull the latest from master.

My apologies for the bumpy ride...hopefully you should have smooth sailing for a while. :)

Post Reply