FATAL: [bladeRF source] Failed to open bladeRF device *:instance=0

Having issues with the site, hardware, source code, or any other issues?

Moderator: robert.ghilduta

Post Reply
tp5
Posts: 2
Joined: Fri Apr 24, 2020 1:13 pm

FATAL: [bladeRF source] Failed to open bladeRF device *:instance=0

Post by tp5 » Thu Apr 30, 2020 2:36 pm

I've been trying to get a bladeRF A9 to work with GNU Radio Companion / gr-osmosdr in a development VM.
The bladeRF-cli utility seems able to connect with the device, but this error always prints this GRC's debug window:

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.11
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp
Opening nuand bladeRF with device identifier string: "*:instance=0"

FATAL: [bladeRF source] Failed to open bladeRF device

I've tried following the wiki instructions for PPA install and the troubleshooting wiki, I've tried with and without udev rules added, I've tried with USB 2 and USB 3 speed, I've tried all of the above in both a VMWare Player VM and a Virtualbox VM to see if it was a issue with the vm software. The GRC test circuit is just a basic FM reciever as a hello world, which works (if very choppy) with an RTL SDR but not the bladerf. The osmocom fft also works with the RTL but throws the same error with a bladerf source. I've tried re-flashing fresh firmware for the FPGA and the microcontroller, power cycling the bladerf after each. I've tried running GRC and osmocom fft as root, to test if it was a permissions issue. Nothing seems to work.

Guest Machine setup:
Fresh install of Virtualbox Ubuntu 18.04 guest on Windows 10 host, with guest additions
4 cores (of host's 8)
8 GB RAM (of host's 16)
3.0 USB (the A9 is directly connected to a 3.0 physical port on the host)
BladeRF A9 & RTL SDR connected to guest's USB interface.
bidirectional copy-paste, drag-and-drop, and shared folder enabled
Other settings default

Test circuit:
osmocom source (device: bladerf=0, sample rate = 2M, ch0_freq = 106.7M) -> low pass filter (decimation: 8, gain: 2, sample rate = 2M, cutoff = 200k, transition width: 10k) -> wbfm recieve(quadrature rate: 250k, decimation: 1) -> rational resampler(interpolation: 24, decimation: 250) -> audio sink (sample rate: 24khz)
for the rtl test circuit, just replace bladerf=0 with rtl=0.

When I run the open command in any of these ways from the bladerf cli directly, it appears to work (no errors appear), and shows the device is open in the probe output:
>open
>open *:instance=0
>open *
>open *:serial=[serial number here]
>open *:device=2:2

PPA installation:
sudo add-apt-repository ppa:bladerf/bladerf -y
sudo apt update

# add cli
sudo apt install bladerf libbladerf-dev libbladerf-doc -y

# add firmware and fpga images
sudo apt install bladerf-f* -y

# add gnuradio
# xterm added because GRC complains it can't find xterm at startup
sudo apt install gnuradio gr-osmosdr xterm -y

# test that A9 is detected
bladeRF-cli -e print -e probe -e info

RX1 Bandwidth: 3000000 Hz (Range: [200000, 56000000])
RX2 Bandwidth: 3000000 Hz (Range: [200000, 56000000])
TX1 Bandwidth: 1500000 Hz (Range: [200000, 56000000])
TX2 Bandwidth: 1500000 Hz (Range: [200000, 56000000])

RX1 Frequency: 106700000 Hz (Range: [70000000, 6000000000])
RX2 Frequency: 106700000 Hz (Range: [70000000, 6000000000])
TX1 Frequency: 923999998 Hz (Range: [47000000, 6000000000])
TX2 Frequency: 923999998 Hz (Range: [47000000, 6000000000])

RX1 AGC: Enabled
RX2 AGC: Enabled

Clock reference: none
Clock input: Onboard VCTCXO
Clock output: Disabled

RX1 RSSI: preamble = -63 dB, symbol = -70 dB
RX2 RSSI: preamble = -64 dB, symbol = -84 dB

Loopback mode: none

RX mux: BASEBAND - Baseband samples

Gain RX1 overall: 60 dB (Range: [-16, 60])
Gain RX2 overall: 60 dB (Range: [-16, 60])
Gain TX1 overall: 56 dB (Range: [-23.75, 66])
Gain TX2 overall: 56 dB (Range: [-23.75, 66])

RX1 sample rate: 2000000 0/1 (Range: [520834, 61440000])
RX2 sample rate: 2000000 0/1 (Range: [520834, 61440000])
TX1 sample rate: 2000000 0/1 (Range: [520834, 61440000])
TX2 sample rate: 2000000 0/1 (Range: [520834, 61440000])

Bias Tee (RX1): off
Bias Tee (RX2): off
Bias Tee (TX1): off
Bias Tee (TX2): off

Current VCTCXO trim: 0x1fd5
Stored VCTCXO trim: 0x1fd5

Hardware status:
Power source: DC Barrel
Power monitor: 4.924 V, 0.67 A, 3.24 W
RF routing:
TX1: RFIC 0xff ((null) ) => SW 0x0 (OPEN )
TX2: RFIC 0xff ((null) ) => SW 0x0 (OPEN )
RX1: RFIC 0xff ((null) ) <= SW 0x0 (OPEN )
RX2: RFIC 0xff ((null) ) <= SW 0x0 (OPEN )


Description: Nuand bladeRF 2.0 (currently open)
Backend: libusb
Serial: [deleted by me]
USB Bus: 2
USB Address: 2


Board: Nuand bladeRF 2.0 (bladerf2)
Serial #: [deleted by me]
VCTCXO DAC calibration: 0x1fd5
FPGA size: 301 KLE
FPGA loaded: yes
Flash size: 128 Mbit
USB bus: 2
USB address: 2
USB speed: SuperSpeed
Backend: libusb
Instance: 0

I'm completely out of ideas, any tips would be appreciated.

robert.ghilduta
Posts: 73
Joined: Thu Feb 28, 2013 11:14 pm

Re: FATAL: [bladeRF source] Failed to open bladeRF device *:instance=0

Post by robert.ghilduta » Fri May 01, 2020 10:31 am

Just a few questions and thoughts:

#1) What do you see when you run lsusb or dmesg on the guest? Does the host see the bladeRF when it is plugged in?

#2) Have you ensured the appropriate USB 3.0 accelerator support is enabled in VirtualBox / VMWare?

#3) Would you be able to test it on native Linux machine?

Also, to ensure you're using the latest source code, please try this build method: https://github.com/Nuand/bladeRF/wiki/G ... on_PyBOMBS

Post Reply