AX9, load_fpga time out, failed to open device

Having issues with the site, hardware, source code, or any other issues?
Post Reply
Nabi
Posts: 1
Joined: Mon Apr 03, 2023 4:25 am

AX9, load_fpga time out, failed to open device

Post by Nabi »

Hi,
I have recently purchase the AX9. I have an ubuntu 22.04, connected via USB3.0, i have followed all the steps from getting started with no problem. But when I attempt to connect via the interactive mode I can not because of a time out openning the device, see command just below. I have checked that the usb is detected, that I am running with USB 3.0. I have also updated the firmware but the fpga image can not be loaded because of the same problem. I put below some of the outcomes from my prompt. Any help?

Code: Select all

bladeRF-cli -i -v verbose
I obtain this one:
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/libusb.c:642] Using libusb version: 1.0.25.11696
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/libusb.c:519] Found a bladeRF (idx=0)
[DEBUG @ host/libraries/libbladeRF/src/backend/usb/libusb.c:189] Bus 002 Device 005: Nuand bladeRF 2.0, serial b32453c561064b489b4c13182be937ca
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/libusb.c:581] USB port reset succeeded for bladeRF b32453c561064b489b4c13182be937ca
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 0
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:293] Read Firmware version: 2.4.0-git-a3d5c55f
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:299] Capability mask before FPGA load: 0x0000007f00000000
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/flash.c:401] Found SPI flash manufacturer: WINBOND.
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/flash.c:414] Found SPI flash device: W25Q128JV (128 Mbit).
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/flash.c:452] SPI flash total size = 128 Mbit
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/flash.c:453] SPI flash page size = 256 bytes
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/flash.c:454] SPI flash erase block size = 65536 bytes
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/flash.c:455] SPI flash number of pages = 65536
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/flash.c:456] SPI flash number of erase blocks = 256 pages
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 2
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 3
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:447] Loading FPGA from: hostedxA9.rbf
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 3
[DEBUG @ host/libraries/libbladeRF/src/backend/usb/usb.c:442] Failed to write FPGA bitstream to FPGA: Operation timed out
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:457] bladerf2_open: dev->backend->load_fpga(dev, buf, buf_size) failed: Operation timed out
Failed to open device (first available): Operation timed out
I have checked the following:

Code: Select all

bladeRF-cli -p
Description: Nuand bladeRF 2.0
Backend: libusb
Serial: b32453c561064b489b4c13182be937ca
USB Bus: 2
USB Address: 4

and also I have performed

Code: Select all

lsusb  -s 2:5 -v
Bus 002 Device 004: ID 2cf0:5250 Nuand LLC bladeRF 2.0 micro
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x2cf0 Nuand LLC
idProduct 0x5250 bladeRF 2.0 micro
bcdDevice 0.00
iManufacturer 1 Nuand
iProduct 2 bladeRF 2.0
iSerial 3 b32453c561064b489b4c13182be937ca
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x007b
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 800mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 4
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x0016
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
HIRD Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 3
Lowest fully-functional device speed is SuperSpeed (5Gbps)
bU1DevExitLat 0 micro seconds
bU2DevExitLat 0 micro seconds
Device Status: 0x0000
(Bus Powered)

Code: Select all

bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
Flashing firmware...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:504] Erasing 3 blocks starting at block 0
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:508] Erasing block 2 (100%)...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:520] Done erasing 3 blocks
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:731] Writing 483 pages starting at page 0
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:736] Writing page 482 (100%)...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:747] Done writing 483 pages
[INFO @ host/libraries/libbladeRF/src/driver/spi_flash.c:114] Verifying 483 pages, starting at page 0
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:619] Reading 483 pages starting at page 0
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:623] Reading page 482 (100%)...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:636] Done reading 483 pages
Successfully wrote firmware to flash!
NOTE: A power cycle is required to load the new firmware.
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:457] bladerf2_open: dev->backend->load_fpga(dev, buf, buf_size) failed: Operation timed out
Failed to open device (first available): Operation timed out

Code: Select all

bladeRF-cli -l /usr/share/Nuand/bladeRF/hostedxA9.rbf
pmj60114@60114:/usr/share/Nuand/bladeRF$ bladeRF-cli -l /usr/share/Nuand/bladeRF/hostedxA9.rbf
Loading fpga...
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2192] bladerf2_load_fpga: dev->backend->load_fpga(dev, buf, length) failed: Operation timed out
Error: failed to load FPGA: Operation timed out
robert.ghilduta
Posts: 162
Joined: Thu Feb 28, 2013 11:14 pm

Re: AX9, load_fpga time out, failed to open device

Post by robert.ghilduta »

A couple of things, if you're on a laptop, please turn up the power settings to Performance, or similar.
Also, are you running in a Virtual Machine? If so, please ensure XHCI support is enabled.
bitwhyz
Posts: 1
Joined: Fri Aug 23, 2024 12:49 am

Re: AX9, load_fpga time out, failed to open device

Post by bitwhyz »

I am having this exact problem also using the BladeRF 2.0 xA9 hardware/software, but found a workaround.

I had been using an Ubuntu 22.04 virtual machine (with USB 3.1 enabled) on VMware Fusion running atop MacOS Sonoma and flashing the firmware to flash memory and autoloading FPGA file from the Ubuntu host filesystem. I would then use Gnuradio app to receive signals via the xA9 board. Worked fine.

At some point recently on Ubuntu VM guest, the firmware would flash perfectly, but the FPGA autoload from filesystem would timeout. Tried putting FPGA in flash memory to autoload but got the same FPGA load timed out issue.

I found a workaround by also installing the BladeRF 2.0 code on MacOS directly, and putting both the firmware and FPGA to flash memory so that autoloading FPGA does not rely on the MacOS host filesystem. Both loaded successfully from the MacOS environment of BladeRF software.

I then made sure the BladeRF software on Ubuntu VM guest was the same as MacOS, and installed Gnuradio on VM guest as well. Made sure USB 3.1 on the Ubuntu VM guest was set properly, made sure Ubuntu connected to the BladeRF xA9 via the VM guest, fired up Gnuradio and ran a flowgraph successfully. All seems to be working smoothly, thus far.

Thanks to Robert Ghilduta's previous post regarding virtual machines and USB behavior, I suspected USB behavior played a role in the FPGA timeout problem.
Post Reply