Connecting to BladeRF in a Linux Virtual Machine

Having issues with the site, hardware, source code, or any other issues?
Post Reply
flo003
Posts: 9
Joined: Tue Sep 15, 2015 9:56 am

Connecting to BladeRF in a Linux Virtual Machine

Post by flo003 »

Hi I've been working for a while with Blade, my current set up is as follows:
- I connect the Blade directly from my Mac, I've been using the bladerf-cli as well as GNURadio with Osmocom Source without any problems.
- I installed a Virtual Box with Ubuntu 14 and successfully created all the quarts files and also followed the Getting Started: Linux Guide: https://github.com/Nuand/bladeRF/wiki/G ... d%3A-Linux but haven't been able to connect to the blade. The bladeRF-cli -p shows no device..

I'm interested in connecting to the blade through the Ubuntu virtual machine because i want to use the bladder-cli and the logic analyzer and other debug tools from quarts' software.

Note: My friend is working with a very similar setup but with a Windows Host machine and is experiencing the same problem..

Any suggestions?
Thank you very much.

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

Re: Connecting to BladeRF in a Linux Virtual Machine

Post by jynik »

Hi Florencia,

We've heard reports of various VM software on various operating systems not playing so well with USB devices, so we usually don't recommend their use. Some paid ($$$) virtualization software has been reported to work great, while others yield significant performance issues. Perhaps you could use the bladeRF natively on your Mac and install the quartus tools in a VM?

With all that said, I see VirtualBox recently released XHCI support, which I have not personally tested. Did you install the Virtualbox Expansion Pack? If I remember correctly, for USB support, you have to download this,accept an additional license agreement, and install it.

Once that's installed, I think you also need to ensure your user is in a vboxusers group...at least that's what I needed to ensure in Linux.

Hope you find some helpful hints here,
Jon
flo003
Posts: 9
Joined: Tue Sep 15, 2015 9:56 am

Re: Connecting to BladeRF in a Linux Virtual Machine

Post by flo003 »

Hi Jon thanks for your response. Using the info you provided I did the following steps:

1- Updated the virtual box software for OS X to the version 5.0.4 https://www.virtualbox.org/wiki/Downloads
2- I installed the Virtualbox 5.0.4 Expansion Pack.
3- In the virtual machine's settings I configured the 3.0 USB
(I had previously followed the Getting Started: Linux Guide on my virtual machine running Ubuntu 15.04)

The communication with the blade now works. I tried to capture some data in order to get an idea if some samples were lost or not. To do so I set the capturing mode to the 32 bit counter and tried different sample rates and number of samples:

With a sample rate of 1MHz and 4M samples no gaps were found.
With a sample rate of 10MHz and 10M samples no gaps were found.
With a sample rate of 10MHz and 100M samples 3 gaps were found.
With a sample rate of 15MHz and 1M samples 3 gaps were found.

I did the same tests on my Mac ( capturing data directly to the host machine without entering to the virtual machine) and no gaps were found in any of those set ups. I also tried to capture 100M samples with a sample rate of 40MHz and only one gap was found.

All in all I believe loosing 3 samples in 100M is a pretty good result. For my application 10M Hz is a reasonable sample rate so I don't think I will find any troubles.

The next step is to connect the blade to the quarts tools (running in the Ubuntu virtual machine )via the USB Blaster which I hope gets here next week.

Thanks a lot.
Florencia
jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: Connecting to BladeRF in a Linux Virtual Machine

Post by jynik »

Hi Florencia,

I'm glad to hear you got things up and running, and appreciate you sharing the version numbers -- that'll be a big help to other people.

It sounds like the VirtualBox developers have done some great work with respect to XHCI support, so kudos to them!

When you see those 3 sample discontinuities are those just as the stream starts up, or do you see those "later" on?

I'd be curious to hear any difference you see between testing directly on the host and the VM for sample rates of 20MHz - 40 MHz.

Cheers,
Jon
Post Reply