Invalid FPGA size 49 after updating firmware

Having issues with the site, hardware, source code, or any other issues?
REal0day
Posts: 9
Joined: Mon Aug 20, 2018 8:06 pm

Invalid FPGA size 49 after updating firmware

Post by REal0day »

When starting up interactive mode, the following errors occurs:

[ERROR @ host/libraries/libbladeRF/src/board/bbladerf1/bladerf1.c:921] Invalid FPGA size 49
Failed to open device (first available): An unexpected error occured

I've attached part of my dmesg to help assist with this.

First installed FPGA hostedxA4-latest.rbf
Then firmware bladeRF-fw_latest.img

When it said, " Done. Cycle power on the device.", I unplugged it and this when the error occurred.
I thought power cycle was to remove all power and start it again. Must have made a mistake.
Thanks for your help.
bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

Re: Invalid FPGA size 49 after updating firmware

Post by bglod »

Unfortunately, the website link to the latest FX3 firmware wasn't updated, so it's still pointing to bladeRF1 firmware v2.0.0. Your dmesg log shows that your bladeRF-micro is now presenting itself as the original bladeRF and libbladeRF/bladeRF-cli is reacting accordingly. We are working on a patch to bladeRF-cli / libbladeRF to prevent this from happening in the future. In the mean time, please download the FX3 firmware v2.2.0 and follow the recovery procedure. Note that you will need a short piece of wire to short across pins 1-2 of J6. The corresponding image has not been uploaded to our website yet, so I am attaching it, below.
bladeRF-micro-J6.jpg
Electrical Engineer
Nuand, LLC.
User avatar
rtucker
Posts: 77
Joined: Sun Jan 25, 2015 10:38 am

Re: Invalid FPGA size 49 after updating firmware

Post by rtucker »

The latest libbladeRF master (as of yesterday, https://github.com/Nuand/bladeRF/commit ... 06f1d49c83) will handle this situation by initializing the board just enough to allow flashing new firmware. So, if the J6 fix isn't working out, please try that.

This will be rolled into 2018.08-rc3 (and/or 2018.08), and for Ubuntu users, it's available on the development snapshots PPA (https://launchpad.net/~bladerf/+archive ... -snapshots).
Rey Tucker (she/her)
Systems Engineer, Nuand LLC
Rochester, NY, USA

#WontBeErased
REal0day
Posts: 9
Joined: Mon Aug 20, 2018 8:06 pm

Re: Invalid FPGA size 49 after updating firmware

Post by REal0day »

Can I try this firmware update without doing the J6 fix?
I don't have a jumper cable. Went down to Fry's and they were out. REALLY don't want to wait and order one online.
Pretty broke from this purchase already. :?
User avatar
rtucker
Posts: 77
Joined: Sun Jan 25, 2015 10:38 am

Re: Invalid FPGA size 49 after updating firmware

Post by rtucker »

The latest software is able to work itself out of this situation, yes.

Also, any conductive object should work... I've used tweezers, for example. But, working around this in software is much easier, especially if you don't have three hands :)

Code: Select all

/// INSTALLING THE WRONG FIRMWARE:
rtucker@rho:~$ bladeRF-cli -f Downloads/bladeRF_fw_v2.0.0.img 
Deferring device init until after FPGA load
Flashing firmware...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:455] Erasing 3 blocks starting at block 0
...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:579] Done reading 474 pages
Done. A power cycle is required for this to take effect.

(power cycle)

rtucker@rho:~$ bladeRF-cli -e 'version' -e 'print'
[CRITICAL @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:889] Device type mismatch! FPGA size 49 is a bladeRF2 characteristic, but the USB PID indicates bladeRF1. Initialization cannot continue.
[INFO @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:892] You must download firmware v2.2.0 or later from https://www.nuand.com/fx3/ and flash it (bladeRF-cli -f /path/to/bladeRF_fw.img) before using this device.
[WARNING @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:904] Skipping further initialization...

  bladeRF-cli version:        1.6.0-git-e5fb3e9c
  libbladeRF version:         2.0.0-git-e5fb3e9c

  Firmware version:           2.0.0
  FPGA version:               Unknown (FPGA not loaded)


  Error: Command requires FPGA to be loaded

/// INSTALLING THE CORRECT FIRMWARE:
rtucker@rho:~$ bladeRF-cli -f Downloads/bladeRF_fw_v2.2.0.img
Deferring device init until after FPGA load
[CRITICAL @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:889] Device type mismatch! FPGA size 49 is a bladeRF2 characteristic, but the USB PID indicates bladeRF1. Initialization cannot continue.
[INFO @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:892] You must download firmware v2.2.0 or later from https://www.nuand.com/fx3/ and flash it (bladeRF-cli -f /path/to/bladeRF_fw.img) before using this device.
[WARNING @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:904] Skipping further initialization...
Flashing firmware...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:455] Erasing 3 blocks starting at block 0
...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:579] Done reading 480 pages
Done. A power cycle is required for this to take effect.

(power cycle)

rtucker@rho:~$ bladeRF-cli -e 'version' -e 'print'

  bladeRF-cli version:        1.6.0-git-e5fb3e9c
  libbladeRF version:         2.0.0-git-e5fb3e9c

  Firmware version:           2.2.0-git-3d38fac2
  FPGA version:               0.7.2


  RX1 Bandwidth:  18000000 Hz
  RX2 Bandwidth:  18000000 Hz
etc, etc
Rey Tucker (she/her)
Systems Engineer, Nuand LLC
Rochester, NY, USA

#WontBeErased
REal0day
Posts: 9
Joined: Mon Aug 20, 2018 8:06 pm

Re: Invalid FPGA size 49 after updating firmware

Post by REal0day »

DEF tried software first.
DEF didn't seem to work.

Code: Select all

root@ubuntu:~/Downloads# ls
 bladeRF_fw_latest.img       bladeRF_fw_v2.2.0.img             hostedxA4-latest.rbf
'bladeRF_fw_v2.2.0(1).img'   bladeRF_fw_v2.2.0.img.sha256sum   
root@ubuntu:~/Downloads# mv 'bladeRF_fw_v2.2.0(1).img' bRF_fw_v2.2.0.img
root@ubuntu:~/Downloads# bladeRF-cli -i
[ERROR @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:921] Invalid FPGA size 49.
Failed to open device (first available): An unexpected error occurred
root@ubuntu:~/Downloads# bladeRF-cli -f bRF_fw_v2.2.0.img 
Deferring device init until after FPGA load
[ERROR @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:921] Invalid FPGA size 49.
Failed to open device (first available): An unexpected error occurred
root@ubuntu:~/Downloads# mv 
bladeRF_fw_latest(1).img         bladeRF_fw_v2.2.0.img            bRF_fw_v2.2.0.img                
bladeRF_fw_latest.img            bladeRF_fw_v2.2.0.img.sha256sum  hostedxA4-latest.rbf             
root@ubuntu:~/Downloads# mv bladeRF_fw_latest
bladeRF_fw_latest(1).img  bladeRF_fw_latest.img     
root@ubuntu:~/Downloads# mv bladeRF_fw_latest\(1\).img bladeRF_fw_latest_1.img
root@ubuntu:~/Downloads# bladeRF-cli -f bladeRF_fw_latest_1.img 
Deferring device init until after FPGA load
[ERROR @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:921] Invalid FPGA size 49.
Failed to open device (first available): An unexpected error occurred
root@ubuntu:~/Downloads# bladeRF-cli -l 
bladeRF_fw_latest_1.img          bladeRF_fw_v2.2.0.img            bRF_fw_v2.2.0.img                hostedxA4.rbf
bladeRF_fw_latest.img            bladeRF_fw_v2.2.0.img.sha256sum  hostedxA4-latest.rbf             
root@ubuntu:~/Downloads# bladeRF-cli -l hostedxA4.rbf 
Deferring device init until after FPGA load
[ERROR @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:921] Invalid FPGA size 49.
Failed to open device (first available): An unexpected error occurred
root@ubuntu:~/Downloads# bladeRF-cli -l hostedxA4-latest.rbf 
Deferring device init until after FPGA load
[ERROR @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:921] Invalid FPGA size 49.
Failed to open device (first available): An unexpected error occurred
I downloaded the latest img and tried that.
Also tried bladeRF_fw_v2.2.0 with no luck.
Tried to flash the FPGA as well, no luck.
Guess I'll try the 3 hand method by connecting J6.

Will keep you all posted.
Thanks for the assistance!
bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

Re: Invalid FPGA size 49 after updating firmware

Post by bglod »

It doesn't look like you updated your host software (libbladeRF / bladeRF-cli). Do you know how you installed it in the first place?

If you used PyBOMBS, it should be as simple as:

Code: Select all

pybombs update bladeRF
If you used Ubuntu's apt-get, make sure you're using the bleeding edge development (bladerf-snapshots) PPA as noted in our Getting Started Wiki, and not the regular PPA as that is not new enough at this time.

If you built from source ... well, answer the above questions first and then I'll go into this part. :)
Electrical Engineer
Nuand, LLC.
REal0day
Posts: 9
Joined: Mon Aug 20, 2018 8:06 pm

Re: Invalid FPGA size 49 after updating firmware

Post by REal0day »

Installed from source via git.
I'll do a git pull, rebuild, then try again!
bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

Re: Invalid FPGA size 49 after updating firmware

Post by bglod »

Great! That should work perfectly. Let us know how it goes.
Electrical Engineer
Nuand, LLC.
REal0day
Posts: 9
Joined: Mon Aug 20, 2018 8:06 pm

Re: Invalid FPGA size 49 after updating firmware

Post by REal0day »

So Good News first, I was able to install the firmware and the device connected.
Bad News: I keep attempting to installed version 2.2.0, but it's not working.
Other issues include my serial number is now 00000000000000000.
and loading FPGA is still not working. Probably because it believes the size is not 49?
My thoughts. We're getting somewhere...

Code: Select all

root@Win7:~/Downloads# bladeRF-cli -f bv2.2.0.img 
Deferring device init until after FPGA load
[CRITICAL @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:889] Device type mismatch! FPGA size 49 is a bladeRF2 characteristic, but the USB PID indicates bladeRF1. Initialization cannot continue.
[INFO @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:892] You must download firmware v2.2.0 or later from https://www.nuand.com/fx3/ and flash it (bladeRF-cli -f /path/to/bladeRF_fw.img) before using this device.
[WARNING @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:904] Skipping further initialization...
Flashing firmware...
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:455] Erasing 3 blocks starting at block 0
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:460] Erased block 2
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:468] Done erasing 3 blocks
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:672] Writing 480 pages starting at page 0
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:676] Writing page 479
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:685] Done writing 480 pages
[INFO @ host/libraries/libbladeRF/src/driver/spi_flash.c:112] Verifying 480 pages, starting at page 0
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:565] Reading 480 pages starting at page 0
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:568] Reading page 479
[INFO @ host/libraries/libbladeRF/src/backend/usb/usb.c:579] Done reading 480 pages
Done. A power cycle is required for this to take effect.
root@Win7:~/Downloads# bladeRF-cli -e 'version' -e 'print'
[CRITICAL @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:889] Device type mismatch! FPGA size 49 is a bladeRF2 characteristic, but the USB PID indicates bladeRF1. Initialization cannot continue.
[INFO @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:892] You must download firmware v2.2.0 or later from https://www.nuand.com/fx3/ and flash it (bladeRF-cli -f /path/to/bladeRF_fw.img) before using this device.
[WARNING @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:904] Skipping further initialization...

  bladeRF-cli version:        1.6.1-git-4bcdd6ec
  libbladeRF version:         2.0.1-git-4bcdd6ec

  Firmware version:           2.0.0
  FPGA version:               Unknown (FPGA not loaded)


  Error: Command requires FPGA to be loaded

root@Win7:~/Downloads# bladeRF-cli -e 'version' -e 'print'
[CRITICAL @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:889] Device type mismatch! FPGA size 49 is a bladeRF2 characteristic, but the USB PID indicates bladeRF1. Initialization cannot continue.
[INFO @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:892] You must download firmware v2.2.0 or later from https://www.nuand.com/fx3/ and flash it (bladeRF-cli -f /path/to/bladeRF_fw.img) before using this device.
[WARNING @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:904] Skipping further initialization...

  bladeRF-cli version:        1.6.1-git-4bcdd6ec
  libbladeRF version:         2.0.1-git-4bcdd6ec

  Firmware version:           2.0.0
  FPGA version:               Unknown (FPGA not loaded)


  Error: Command requires FPGA to be loaded

root@Win7:~/Downloads# bladeRF-cli -b
bladeRF-cli: invalid option -- 'b'
root@Win7:~/Downloads# bladeRF-cli -p

  Backend:        libusb
  Serial:         00000000000000000000000000000000
  USB Bus:        2
  USB Address:    4


bladeRF> fw_log
bladeRF> open
[CRITICAL @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:889] Device type mismatch! FPGA size 49 is a bladeRF2 characteristic, but the USB PID indicates bladeRF1. Initialization cannot continue.
[INFO @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:892] You must download firmware v2.2.0 or later from https://www.nuand.com/fx3/ and flash it (bladeRF-cli -f /path/to/bladeRF_fw.img) before using this device.
[WARNING @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:904] Skipping further initialization...

bladeRF> info

  Board:                    bladerf1
  Serial #:                 00000000000000000000000000000000
  VCTCXO DAC calibration:   0x1da9
  FPGA size:                49 KLE
  FPGA loaded:              no
  USB bus:                  2
  USB address:              4
  USB speed:                Hi-Speed
  Backend:                  libusb
  Instance:                 0



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

Re: Invalid FPGA size 49 after updating firmware

Post by bglod »

Can you redownload the latest FX3 firmware and try again? I'm afraid what you think was v2.2.0 may actually be v2.0.0 due to a mistake in the firmware_latest.img URL. The serial number of all zeroes is, I'm hoping, because of the firmware mismatch.
Electrical Engineer
Nuand, LLC.
REal0day
Posts: 9
Joined: Mon Aug 20, 2018 8:06 pm

Re: Invalid FPGA size 49 after updating firmware

Post by REal0day »

It is the latest_fw, checked sha256 hash and it is the same. :(
Happy to hear more suggestions before doing the jump.
bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

Re: Invalid FPGA size 49 after updating firmware

Post by bglod »

Just to make sure...you power cycled the bladeRF (remove all power and plug it back in again) after flashing the v2.2.0 FX3 firmware, correct?

Even though the sha256 matches, please delete all FX3 images you have stored locally and re-download the v2.2.0 image if you haven't done this already. I just want to make 100% certain nothing is messed up with the files on your end because (a) I noticed you have a lot of copies/renames of the FX3 image based on previous shell logs, and (b) it should be detected as a bladeRF2 after v2.2.0 flash and power cycle.

The bootloader recovery method using the jumper is not required and probably won't help at this point because you have the updated software that won't fail out upon detecting the FPGA size / board name mismatch. However, if you have any old wire laying around, a paper clip, tweezers, a metal fork -- anything conductive to short J6 pins 1 and 2 together, then it certainly can't hurt to try that method of flashing the firmware. You shouldn't need to buy anything special to do this.

One more thing -- if it's still not working, please take a picture of U20 (it's the SPI flash chip near J6, you can see it in the image I attached earlier). Make sure the picture is clear enough for us to see the vendor/model number engraved on the package. You can attach the image or use a hosting site like imgur.
Electrical Engineer
Nuand, LLC.
REal0day
Posts: 9
Joined: Mon Aug 20, 2018 8:06 pm

Re: Invalid FPGA size 49 after updating firmware

Post by REal0day »

It worked! Things are great now! Thank you!! :D
REal0day
Posts: 9
Joined: Mon Aug 20, 2018 8:06 pm

Re: Invalid FPGA size 49 after updating firmware

Post by REal0day »

Firmware looks like it installed correctly, but having trouble with the FPGA now.

Code: Select all

root@ubuntu:~/Downloads# bladeRF-cli -d "libusb: instance=0" -l hostedxA4-lastest.rbf -i
Deferring device init until after FPGA load
Loading fpga...
[INFO @ host/libraries/libbladeRF/src/helpers/version.c:106] FPGA version (v129.129.33153) is newer than entries in libbladeRF's compatibility table. Please update libbladeRF if problems arise.
Read Error -5
ad9361_init : Unsupported PRODUCT_ID 0xFFFFFFFB
ad9361_init : AD936x initialization error
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:1160] bladerf2_initialize: ad9361_init failed: An unexpected error occurred
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:3734] bladerf2_load_fpga: bladerf2_initialize failed: An unexpected error occurred
Error: failed to load FPGA: An unexpected error occurred
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:3287] bladerf2_trigger_init: Board state insufficient for operation (current "FPGA Loaded", requires "Initialized").
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:3287] bladerf2_trigger_init: Board state insufficient for operation (current "FPGA Loaded", requires "Initialized").
Post Reply