VirtualBox: No bladeRF device(s) available.

Having issues with the site, hardware, source code, or any other issues?
Post Reply
n_qrtu
Posts: 17
Joined: Fri Feb 12, 2016 3:59 am

VirtualBox: No bladeRF device(s) available.

Post by n_qrtu »

Hello,

I am using VirtualBox on a MAC (El Capitan version 10.11.5), but I cannot get the board connected.

This is what I get:
=============
[admin@SDR ~]$ bladeRF-cli -i -v verbose
[VERBOSE @ libusb.c:541] Using libusb version: 1.0.15.10646
[DEBUG @ libusb.c:210] Failed to get configuration descriptor: LIBUSB_ERROR_IO
[DEBUG @ libusb.c:550] No devices available on the libusb backend.

No bladeRF device(s) available.

If one is attached, ensure it is not in use by another program
and that the current user has permission to access it.
=============

I cannot figure out which is the problem. If anyone has some clues, please let me know.

I have checked the "Enable USB Controller" and "Enable USB 2.0 (EHCI) Controller" options under a VM's USB settings.
With USB 3.0 option the same is happening.

Also, the groups seem fine:
[admin@SDR ~]$ groups
admin wheel bladerf


Thank you for your help.
Nicolae
jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: VirtualBox: No bladeRF device(s) available.

Post by jynik »

Just for the sake of noting -- there's native support for OS X for what it's worth, through both MacPorts and HomeBrew. In the past we've seen people struggle with USB 3 and VM software, and generally recommend operating natively.

With that said...
  • Can you provide the output of lsusb?
  • Do you see the device being connected in dmesg output?
  • When using USB devices in Virtualbox on a Linux host, I seem to recall having to ensure I was in a vboxusers group -- is there anything similar to this in OS X? I'm wondering if the VM guest doesn't have sufficient privileges to access the host's USB device, given the failure you reported.
n_qrtu
Posts: 17
Joined: Fri Feb 12, 2016 3:59 am

Re: VirtualBox: No bladeRF device(s) available.

Post by n_qrtu »

Hi,

Thanks a lot for you quick reply.

We are trying to make it work with VM since we plan to use the board for a class, so we would like to give the students a VM and in this way they all will have the same environment.
I thought VM would be a good idea, but now we run already into trouble, so not sure about it anymore.

Even if we make it work, I am now wondering if we will not have trouble with samples which will be dropped? We plan to sample at around 4M. Probably the USB 2.0 connection will be fine, but what about the VM? Do you have any experience if at our sample rate we should expect samples which are dropped because of using a VM? If this is the case, then we will definitelly drop the VM idea. Instead we would ask the students to install bladeRF of their respective operating system (here we probably need to assist them, but I cannot see a better solution at this point if VM is not an option).

Side comment: this is related to the GPS project I asked you about in the past. You asked me to post the setup and details, I did not forget about it, but we were busy with another class during the spring semester. Now we prepare for the SDR class, so I will post the details soon.

====
The board seems connected, dmesg gives:
[ 169.483256] usb 1-1: new high-speed USB device number 2 using ehci-pci
[ 169.637910] usb 1-1: New USB device found, idVendor=2cf0, idProduct=5246
[ 169.637910] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 169.637911] usb 1-1: Product: bladeRF
[ 169.637911] usb 1-1: Manufacturer: Nuand
[ 169.637911] usb 1-1: SerialNumber: cb98cd9c8d2b4edf61b7c0fd0173545b

=====
[admin@SDR ~]$ lsusb
Bus 001 Device 002: ID 2cf0:5246
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
=====

I have added as well a group "vboxusers" and I made sure I am in that group.

=====

Not sure what else to try...

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

Re: VirtualBox: No bladeRF device(s) available.

Post by jynik »

Hi Nicolae,

VMs vs Bootable Image

In the past, VMs seem to just introduce another set of variables into the troubleshooting, which is why we generally don't advise they be used. It may be the case that various VM offerings have improved significantly, but we have heard reports of poorer performance in VMs than on the native machine.

If your goal is to give students an identical environment, you may want to look into the GNU Radio Live SDR Environment. We've had good success with using this for trainings and classes.

I have a pending patch for this to integrate the 2016.06 bladeRF release, and am hosting an unofficial build of this here. The "code" for configuring the live image build may be found here -- you could potentially adapt this to your needs.

Device detection issue

The lsusb output indicates to me that you have a bladeRF running firmware version 2.0.0, based upon its VID:PID=2cf0:5246. This is good - we know the VM at least "sees" the device.

Per the release notes on https://nuand.com/fx3.php, this requires libbladeRF v1.6.0 or later (the current release includes 1.7.2).

Could you run bladeRF-cli --lib-version to confirm that you have a sufficient libbladeRF version? Let's rule this out first.
n_qrtu
Posts: 17
Joined: Fri Feb 12, 2016 3:59 am

Re: VirtualBox: No bladeRF device(s) available.

Post by n_qrtu »

Hi,

Thanks a lot for the answer.

I have managed to solve the problem. It was not a VM problem (I am using virtualBox), but a problem related to the installation of bladeRF. (It was not the libbladeRF version, I had the latest version)

Here below are the details:

I noticed that there was some error with libtecla while compiling.
So I did the following:
=====
wget http://www.astro.caltech.edu/~mcs/tecla ... 6.3.tar.gz
tar zxvf libtecla-1.6.3.tar.gz
cd libtecla
./configure
make && sudo make install
====

The other thing I did was adding the option "-DBLADERF_GROUP=bladerf"
to
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
-DINSTALL_UDEV_RULES=ON ../

FInally, I did this as well:
cat "/usr/local/lib64" > /etc/ld.so.conf.d/libbladeRF.conf
sudo ldconfig

All of these made it work. Now I am not sure which was critical, I do not remember the order of the things above, I have tried a lot of other things as well... :-)
I can say that the error with libtecla still persisted, so maybe that it was not really required.

==================

Now, since we are here, I should report another thing I have noticed, which can be usefull to other people:

Using virtualBox on El Capitan 10.11.4, there was no way to make any USB device be seen by the VM (not even with dmesg). Updating to 10.11.5 or 10.11.6 solved the problem of seeing USB devices.

===================

Yes, I was thinking about using GNU Radio.

In class we are using Matlab, and for the beginning we plan just to acquire some samples of the GPS signal and then process them offline with Matlab. The way I have set things now is getting the samples file from the interactive mode: bladeRF-cli -i, setup the RX parameters, do the calibration (cal lms, cal dc rx), set up the acqusition file, and then "rx start". This is all done from a terminal.

I have noticed that all this can be done from Matlab as well. The only problem is that while acquring the samples, I have noticed that Matlab adds some extra processing/delay, so some samples are dropped at our sampling rate of 4M. Given this, I have decided to do all the aquisition directly from the terminal, using the interactive mode and woking on /dev/shm so there is fast data writing.

As far as I understood, GNU Radio should be better in terms of real-time operation, so I would expect that it will not drop samples. But I have never used GNU Radio, and first I would need to get a bit familiar with it. Maybe you can point me to some examples of setting the parameters of bladeRF and acquiring a signal with GNU Radio? Like this I would get started and see how it goes.

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

Re: VirtualBox: No bladeRF device(s) available.

Post by jynik »

Hi Nicolae,

I'm happy to hear that you made some progress.

libtecla

libtecla is a library used by bladeRF-cli to provide the interactive console. It provides command history and neat things like vim or emacs key bindings. It is not required, but I personally love having command history and vi bindings while in the CLI.

Is this the issue you were running into, by chance?
https://github.com/Nuand/bladeRF/wiki/T ... ibgccacode

Permissions
I would put my money on the group permissions and/or udev side of things being your fix. One way to have confirmed that this was the issue would have been to run bladeRF-cli as root via sudo. (I generally advise against this, with the exception of testing for permissions-related issues.)

OS X version
Excellent observation - thank you for sharing that and letting everyone know!

MATLAB

Most of what you can do in the CLI can be done in MATLAB, as you found. As you found however, MATLAB and Simulink (or at least our bindings implementations) don't really provide the level of real-time capability that can be achieved using GNU Radio or Pothos.

I would treat the MATLAB bindings more like a glorified bladeRF-cli -- record of a large chunk of samples and then post process them, rather than try to make a real-time application out of scripts alone. Perhaps this would alleviate the need to run the CLI and import samples.

GNU Radio

There's a couple GNU Radio examples in our repo here:
https://github.com/Nuand/bladeRF/tree/m ... s/gnuradio

The FRS example has a little paper associated with it: https://www.nuand.com/bladeRF-doc/examp ... RF_frs.pdf

bladeRF support is made available through the gr-osmosdr source and sink blocks. This part of the page list some of the bladeRF-specific parameters and mapping of gain controls.

In general, feel free to widen your scope for examples to things using gr-osmosdr.
n_qrtu
Posts: 17
Joined: Fri Feb 12, 2016 3:59 am

Re: VirtualBox: No bladeRF device(s) available.

Post by n_qrtu »

Hi,

Thanks for your answer.

libtecla:

The issue comes when installing on Centos 7 or Fedora 23. (on Mac I am running only the VM with Centos 7).

Even after doing:

Code: Select all

wget http://www.astro.caltech.edu/~mcs/tecla/libtecla.tar.gz
tar zxvf libtecla.tar.gz
cd libtecla/
./configure
make && sudo make install
The error still persists and is the following:

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DINSTALL_UDEV_RULES=ON -DBLADERF_GROUP=bladerf ../
-- Checking libusb version...
-- libusb version: 1.0.15

-- Checking libc version...
-- libc version: 2.17

--
CMake Warning at libraries/libbladeRF/CMakeLists.txt:232 (message):
  
  libusb >= 1.0.16 is HIGHLY recommended.  If you experience issues or poor
  performance, please try updating libusb.

  Detected version: 1.0.15

-- libbladeRF version: 1.7.2-git-3734f5c
-- nuand bladeRF udev rules will be installed to '/etc/udev/rules.d' upon running 'make install'
--
-- Could not find pandoc.  Interactive help may be out of date.
-- checking for module 'libtecla'
--   package 'libtecla' not found
-- Not building man page for bladeRF-cli.  (BUILD_BLADERF_CLI_DOCUMENTATION is OFF)
-- Configured to build bladeRF-cli version: 1.4.0-git-3734f5c
-- Configuring done
-- Generating done
-- Build files have been written to: /home/admin/Downloads/bladeRF/host/build
=======

Now, I see seevral things above:

Cannot find pandoc:

Code: Select all

-- Could not find pandoc.
This maybe came from when I did the following, I see there is no pandoc package when using the command from the installation guide:

Code: Select all

sudo yum install doxygen help2man pandoc
[sudo] password for admin: 
Loaded plugins: fastestmirror, langpacks
base                                                                    | 3.6 kB  00:00:00     
extras                                                                  | 3.4 kB  00:00:00     
updates                                                                 | 3.4 kB  00:00:00     
updates/7/x86_64/primary_db                                             | 5.7 MB  00:00:00     
Loading mirror speeds from cached hostfile
 * base: linuxsoft.cern.ch
 * extras: linuxsoft.cern.ch
 * updates: linuxsoft.cern.ch
Package 1:doxygen-1.8.5-3.el7.x86_64 already installed and latest version
No package pandoc available.
Resolving Dependencies
--> Running transaction check
---> Package help2man.noarch 0:1.41.1-3.el7 will be installed
--> Finished Dependency Resolution
======

Another thing I see is:

Code: Select all

 libusb >= 1.0.16 is HIGHLY recommended.  If you experience issues or poor
  performance, please try updating libusb.

  Detected version: 1.0.15
Should I worry about this?

Another thing: libtecla is still not found:

Code: Select all

-- checking for module 'libtecla'
--   package 'libtecla' not found
-- Not building man page for bladeRF-cli.  (BUILD_BLADERF_CLI_DOCUMENTATION is OFF)
I do not know how to solve it...

=======================

For the previous error, I am almost 100% convinced that it was the option "-DBLADERF_GROUP=bladerf" in

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DINSTALL_UDEV_RULES=ON -DBLADERF_GROUP=bladerf ../
which solved it.

=======================

Thanks for the GNU radio links, I will have a look after I am done with solving the errors above.

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

Re: VirtualBox: No bladeRF device(s) available.

Post by jynik »

Hi Nicolae,

I'm very sorry for how delayed my response is.

libtecla

You showed a warning about an older libusb version being detected -- did you mean to paste other error info?

Note that there is a known build issue in libteca for older OSX versions (libgcc.a error). A workaround is posted here:
https://github.com/Nuand/bladeRF/wiki/B ... -and-build

libtecla provides you with the ability to use the up and down arrows in the bladeRF-cli for command history. It also provides vim and/or emacs key bindings. It is not absolutely required, but makes the bladeRF-cli interactive mode much nicer to use.

pandoc

pandoc is used to generate documentation for the bladeRF-cli. You only need to worry about this if you're planning to make changes to bladeRF-cli documentation and submit patches to the project.

If you do not have it installed, that is fine -- the build will fall back to using some default files.

libusb

Your warning about libusb 1.0.15 is a bit concerning. Are there newer versions of your Linux distributions that you could use? libusb is up to 1.0.20 now, and there have been plenty of fixes and improvements since 1.0.15.
myusic
Posts: 2
Joined: Mon Jul 25, 2016 9:22 am

Re: VirtualBox: No bladeRF device(s) available.

Post by myusic »

Hi n_qrtu,

I refer to your thread, I see you have found the solution to solve your bladerf using VirtualBox. I have encounter the same exact problem. Could you kindly guide me through how do you do this step? So I could try on my side.

The other thing I did was adding the option "-DBLADERF_GROUP=bladerf"
to
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
-DINSTALL_UDEV_RULES=ON ../

FInally, I did this as well:
cat "/usr/local/lib64" > /etc/ld.so.conf.d/libbladeRF.conf
sudo ldconfig

Your help is kindly appreciated

Thank you
n_qrtu
Posts: 17
Joined: Fri Feb 12, 2016 3:59 am

Re: VirtualBox: No bladeRF device(s) available.

Post by n_qrtu »

Hi,

Thank you for your answer.

For libtecla, I thought that the error came from the libusb warning, that is why I posted it.

The issues I have encountered came when installing on Fedora or CentOS, not on OSX. On OSX I am running only the VirtualBox with CentOS.

Anyway, things are working for the moment, even though I still have the warnings with libtecla, libusb, etc. For now I do not really need the up/down arrows, even though it would be nice to have them. But I can survive :-)
Libusb seems complicated to update, I did not know how to do it, and since things are working, I did not look further into it :-)

Cheers,
Nicolae

jynik wrote:Hi Nicolae,

I'm very sorry for how delayed my response is.

libtecla

You showed a warning about an older libusb version being detected -- did you mean to paste other error info?

Note that there is a known build issue in libteca for older OSX versions (libgcc.a error). A workaround is posted here:
https://github.com/Nuand/bladeRF/wiki/B ... -and-build

libtecla provides you with the ability to use the up and down arrows in the bladeRF-cli for command history. It also provides vim and/or emacs key bindings. It is not absolutely required, but makes the bladeRF-cli interactive mode much nicer to use.

pandoc

pandoc is used to generate documentation for the bladeRF-cli. You only need to worry about this if you're planning to make changes to bladeRF-cli documentation and submit patches to the project.

If you do not have it installed, that is fine -- the build will fall back to using some default files.

libusb

Your warning about libusb 1.0.15 is a bit concerning. Are there newer versions of your Linux distributions that you could use? libusb is up to 1.0.20 now, and there have been plenty of fixes and improvements since 1.0.15.
n_qrtu
Posts: 17
Joined: Fri Feb 12, 2016 3:59 am

Re: VirtualBox: No bladeRF device(s) available.

Post by n_qrtu »

Hi,

In short, my VirtualBox problem was solved by adding (on the native OS system) my username to the group vboxusers. This is usually done in Settings --> Users and Groups.
To connect the board, from the VM menu select Devices --> USB select bladeRF. This will connect the bladeRF to the VM. To check if the baldeRF is seen by the VM, one has to redo the previous steps and check that the baldeRF has a check sign next to it.
=====
Now, the long version :-) If you are interested in all the steps of installing the bladeRF here is what I did (for installing on CentOS). Do not ask me more, I will probably do not know the answer, I had our sysadmin help me with the installation :-)

Basically I just followed the steps from the documentation
https://github.com/Nuand/bladeRF/wiki/G ... ora_CentOS
with two small variations (described below)

sudo yum groupinstall "Development Tools" "Development Libraries"
sudo yum install libusbx libusbx-devel cmake wget gcc-c++

wget http://www.astro.caltech.edu/~mcs/tecla/libtecla.tar.gz
tar zxvf libtecla-1.6.3.tar.gz
cd libtecla
./configure
make && sudo make install

sudo groupadd bladerf
sudo usermod -a -G bladerf $USER
# Now log out and log back in...
groups

git clone https://github.com/Nuand/bladeRF.git ./bladeRF
cd bladeRF/
cd host/
mkdir build
cd build/

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
-DINSTALL_UDEV_RULES=ON -DBLADERF_GROUP=bladerf ../

(The last option "-DBLADERF_GROUP=bladerf" is not in the original guide on the web, but is added in some troubleshooting page. And is needed for us.)


cat "/usr/local/lib64" > /etc/ld.so.conf.d/libbladeRF.conf
sudo ldconfig

make && sudo make install

(or as original is saying: make && sudo make install && sudo ldconfig)

To test the board operation: (remember to mount it from the menu of the VirtualBox machine)

bladeRF-cli -i

For VirtualBox additionally:
-----------------------------
sudo groupadd vboxusers

(or using some GUI settings on your native OS)

=====

Cheers,
Nicolae

myusic wrote:Hi n_qrtu,

I refer to your thread, I see you have found the solution to solve your bladerf using VirtualBox. I have encounter the same exact problem. Could you kindly guide me through how do you do this step? So I could try on my side.

The other thing I did was adding the option "-DBLADERF_GROUP=bladerf"
to
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
-DINSTALL_UDEV_RULES=ON ../

FInally, I did this as well:
cat "/usr/local/lib64" > /etc/ld.so.conf.d/libbladeRF.conf
sudo ldconfig

Your help is kindly appreciated

Thank you
Post Reply