BladeRF xA9 load FPGA problem.

Having issues with the site, hardware, source code, or any other issues?
Post Reply
Gryzel
Posts: 1
Joined: Thu Sep 13, 2018 9:02 am

BladeRF xA9 load FPGA problem.

Post by Gryzel »

BladeRF xA9 and I'm try to use the autoload function.
What am I doing wrong ?
Help me please!

bladeRF-cli -v verbose -L ./hostedxA9-latest.rbf
Deferring device init until after FPGA load
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/libusb.c:604] Using libusb version: 1.0.22.11312
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/libusb.c:481] Found a bladeRF (idx=0)
[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:1369] Read Firmware version: 2.2.0-git-47f93fe1
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:1375] Capability mask before FPGA load: 0x0000000f00000000
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 2
[DEBUG @ host/libraries/libbladeRF/src/backend/usb/usb.c:131] Reporting no FPGA present - BLADERF_FORCE_NO_FPGA_PRESENT is set.
[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:1451] Skipping FPGA configuration and initialization - BLADERF_FORCE_NO_FPGA_PRESENT is set.
Writing FPGA to flash for autoloading...
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 2
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:455] Erasing 55 blocks starting at block 4
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:460] Erased block 58
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:468] Done erasing 55 blocks
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 1
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 2
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:672] Writing 1 pages starting at page 1024
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:676] Writing page 1024
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:685] Done writing 1 pages
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 1

[DEBUG @ host/libraries/libbladeRF/src/driver/spi_flash.c:58] Invalid number of pages: 50231
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf1/flash.c:167] Failed to write bitstream: Invalid operation or parameter
Error: Invalid operation or parameter
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:3342] bladerf2_trigger_init: Board state insufficient for operation (current "Firmware Loaded", requires "Initialized").
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:3342] bladerf2_trigger_init: Board state insufficient for operation (current "Firmware Loaded", requires "Initialized").
User avatar
rtucker
Posts: 77
Joined: Sun Jan 25, 2015 10:38 am

Re: BladeRF xA9 load FPGA problem.

Post by rtucker »

Greetings,

This is a known issue specific to the A9, and we hope to have a working and tested fix for the next release. The issue tracker entry for it is here: https://github.com/Nuand/bladeRF/issues/571

Thanks for your patience! -rt
Rey Tucker (she/her)
Systems Engineer, Nuand LLC
Rochester, NY, USA

#WontBeErased
bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

Re: BladeRF xA9 load FPGA problem.

Post by bglod »

Please do not use that branch directly as it is right now -- it is extremely broken and may cause harm!! (I should probably remove it, tbh...)

If you need this functionality "now" just use master and modify this line:

https://github.com/Nuand/bladeRF/blob/6 ... .h#L75-L76

To read:

Code: Select all

#define BLADERF_FLASH_TOTAL_SIZE (128 << 17)
Thanks!
Electrical Engineer
Nuand, LLC.
Montezuma
Posts: 39
Joined: Fri Mar 01, 2013 6:42 am

Re: BladeRF xA9 load FPGA problem.

Post by Montezuma »

I have been using, on my MacOS 10.13.6 MacBooks(yes, I have two and both are the same model, A1398 MacBook Pro Retina Late 2013 15.4"(one of which I am about to replace the battery on, so wish me luck), though I also use Windows 10 Pro, Kali, and Ubuntu(both version of Linux are through VMware Fusion Pro v10.1.3) the following command, until this gets sorted out:

bladeRF-cli -l [location/of/the/desired/FPGA/image]/hostedxA9-latest.rbf(or [insert name of FPGA file name].rbf)

The "-l" above is just a lower-case "L", which is just another way of loading the FPGA file "manually", the other being:

$ bladeRF-cli -I
bladeRF>load fpga [location/of/the/desired/FPGA/image]/hostedxA9-latest.rbf(or [insert name of FPGA file name].rbf)

Though, on Windows 10(I have tried three different laptops. I have done the following on both MacBook Pros running Windows 10(one Pro and one Enterprise), and on my Asus Zenbook Prime UX51VZ, running Windows 10 Pro), once I open "bladeRF CLI" shortcut, the v0.7.3 FPGA RBF file is loaded, but it isn't loaded on either of my MacOS installs(one is a "fresh" install, with drive formatted beforehand). What is happening is that Windows is loading the FPGA file that is stored locally, as I tested this by installing the FPGA .rbf v0.8.0, power-cycled the A9, and v0.7.3 was showing as running when I ran the "version" command.

In short, it seems, that FPGA autoloading isn't working, and FPGA .rbf file loading for MacOS isn't working either(as none of the file locations mentioned in one of the GitHub issue tracker updates are created in MacOS like it must be for most, or maybe all Linux versions.
bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

Re: BladeRF xA9 load FPGA problem.

Post by bglod »

Montezuma wrote: Sat Sep 22, 2018 5:55 am I have done the following on both MacBook Pros running Windows 10(one Pro and one Enterprise), and on my Asus Zenbook Prime UX51VZ, running Windows 10 Pro), once I open "bladeRF CLI" shortcut, the v0.7.3 FPGA RBF file is loaded, but it isn't loaded on either of my MacOS installs(one is a "fresh" install, with drive formatted beforehand). What is happening is that Windows is loading the FPGA file that is stored locally, as I tested this by installing the FPGA .rbf v0.8.0, power-cycled the A9, and v0.7.3 was showing as running when I ran the "version" command.

In short, it seems, that FPGA autoloading isn't working, and FPGA .rbf file loading for MacOS isn't working either(as none of the file locations mentioned in one of the GitHub issue tracker updates are created in MacOS like it must be for most, or maybe all Linux versions.
Have you checked out the Wiki regarding this topic? https://github.com/Nuand/bladeRF/wiki/FPGA-Autoloading
Electrical Engineer
Nuand, LLC.
Montezuma
Posts: 39
Joined: Fri Mar 01, 2013 6:42 am

Re: BladeRF xA9 load FPGA problem.

Post by Montezuma »

bglod wrote: Mon Sep 24, 2018 10:39 am
Montezuma wrote: Sat Sep 22, 2018 5:55 am I have done the following on both MacBook Pros running Windows 10(one Pro and one Enterprise), and on my Asus Zenbook Prime UX51VZ, running Windows 10 Pro), once I open "bladeRF CLI" shortcut, the v0.7.3 FPGA RBF file is loaded, but it isn't loaded on either of my MacOS installs(one is a "fresh" install, with drive formatted beforehand). What is happening is that Windows is loading the FPGA file that is stored locally, as I tested this by installing the FPGA .rbf v0.8.0, power-cycled the A9, and v0.7.3 was showing as running when I ran the "version" command.

In short, it seems, that FPGA autoloading isn't working, and FPGA .rbf file loading for MacOS isn't working either(as none of the file locations mentioned in one of the GitHub issue tracker updates are created in MacOS like it must be for most, or maybe all Linux versions.
Have you checked out the Wiki regarding this topic? https://github.com/Nuand/bladeRF/wiki/FPGA-Autoloading
Yes, I have. When I attempt to use the CLI to write the firmware on one of my MacBook Pros(11,3, Model A1398, Late 2013 15.4 inch, "named" TIS-OSX-2; my other MacBook Pro, same exact model and type, is currently...down. I am working to excise the Li-Ion battery, as it has swollen and become an issue I must deal with. As such, I can only test it on one of my MacBooks, and an Asus Windows 10 laptop...but, I digress...), I get the following(currently using MacOS 10.13.6, and iTerm2 build 3.2.1beta6):

TIS-OSX-2:~ michael$ bladerf-cli -L /Users/michael/Documents/SDR-Downloads/bladeRF-Downloads/Firmware-v0.8.0-Downloads/hostedxA9.rbf
Deferring device initialization due to requested FPGA or firmware actions.
Writing FPGA to flash for autoloading...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:472] Erasing 55 blocks starting at block 4
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:477] Erased block 58
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:485] Done erasing 55 blocks
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:689] Writing 1 pages starting at page 1024
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:693] Writing page 1024
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:702] Done writing 1 pages
Error: Invalid operation or parameter
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:3412] bladerf2_trigger_init: Board state insufficient for operation (current "Firmware Loaded", requires "Initialized").
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:3412] bladerf2_trigger_init: Board state insufficient for operation (current "Firmware Loaded", requires "Initialized").
TIS-OSX-2:~ Michael$


When I attempt to load the FPGA file(v0.8.0, FX3 firmware version 2.2.0) with the lower-case "L"(or, bladeRF-CLI -l), I get this:

TIS-OSX-2:~ michael$ bladeRF-CLI -l /Users/michael/Documents/SDR-Downloads/bladeRF-Downloads/Firmware-v0.8.0-Downloads/hostedxA9.rbf
Deferring device initialization due to requested FPGA or firmware actions.
Loading fpga...
Successfully loaded FPGA bitstream!
TIS-OSX-2:~ Michael$


Tested on Windows 10(Insider Preview 17746.1000 (rs5_release), save that after:

[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:702] Done writing 1 pages

the CLI message shows:

Error: Invalid operation or parameter

So...yeah.. :)
User avatar
rtucker
Posts: 77
Joined: Sun Jan 25, 2015 10:38 am

Re: BladeRF xA9 load FPGA problem.

Post by rtucker »

Hmmm, is this with the BLADERF_FLASH_TOTAL_SIZE workaround? xA9 FPGA flashing is not yet fixed (see https://github.com/Nuand/bladeRF/issues/571), but it's being worked on.
Rey Tucker (she/her)
Systems Engineer, Nuand LLC
Rochester, NY, USA

#WontBeErased
Post Reply