Page 1 of 1

Problem connecting to device

Posted: Wed Feb 05, 2014 1:50 pm
by Ghostatlo
I recently got a BladeRF, and have been trying to set it up on my computer. I was following the Getting Started: Linux guide (I am running Ubuntu 13.10), and got to the section on “Detecting the bladeRF”. However, when I probed the device, this is what I received:

Code: Select all

bladeRF> probe

    Backend:        libusb
    Serial:         
    USB Bus:        1
    USB Address:    2
As you can see, there is no serial number for the BladeRF. Following the instructions on the Getting Started guide, I verified that my user account is in fact in the plugdev group.

Since I am a complete n00b to Linux, I’ve been doing searches on what dmesg and lsusb do and how to test for the proper VID and PID numbers of the BladeRF, but so far I haven’t been able to get either of these numbers for the BladeRF.

Next, I ended up at the firmware wiki page, where I followed the directions in the section “Upgrading on Linux”. This is what happens:

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ wget http://nuand.com/fx3/latest.img && bladeRF-cli -f latest.img
--2014-02-05 12:00:25--  http://nuand.com/fx3/latest.img
Resolving nuand.com (nuand.com)... 198.23.74.122
Connecting to nuand.com (nuand.com)|198.23.74.122|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 122112 (119K)
Saving to: ‘latest.img.4’

100%[===============================================>] 122,112      324KB/s   in 0.4s   

2014-02-05 12:00:26 (324 KB/s) - ‘latest.img.4’ saved [122112/122112]

Failed to open device ((null)): Unknown error code
Since this failed, I then followed the directions under “Force Cypress Bootloader”, but to no avail.

I am currently at a loss regarding what to do next. I used the version and verbose commands to see what information I could read. This is what I got:

Code: Select all

bladeRF> version

  bladeRF-cli version:        0.10.3-git-5110cf4-ppasaucy
  libbladeRF version:         0.12.1-git-5110cf4-ppasaucy

  Device version information unavailable: No device attached.

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -v verbose
[VERBOSE] Using libusb version: 1.0.16.10774
[VERBOSE] Non-bladeRF device found: VID 046d, PID c063
[VERBOSE] Found a bladeRF (based upon VID/PID)
[DEBUG] Failed to retrieve serial number
[DEBUG] Failed to populate FW version (instance 1756260640): �FT 
Failed to open device ((null)): File or device I/O failure

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -i
Failed to open device ((null)): File or device I/O failure
Please help me figure out what’s going on with my setup so that I can start using my BladeRF. Thanks!!!

Re: Problem connecting to device

Posted: Thu Feb 06, 2014 9:20 am
by Ghostatlo
Per your instructions, I fetched the latest PPA from git master, and then ran verbose again. Here is the output from that:

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -v verbose
[VERBOSE] Using libusb version: 1.0.16.10774
[VERBOSE] Non-bladeRF device found: VID 046d, PID c063
[VERBOSE] Non-bladeRF device found: VID 0424, PID 4060
[VERBOSE] Non-bladeRF device found: VID 0424, PID 2640
[VERBOSE] Non-bladeRF device found: VID 0424, PID 2514
[VERBOSE] Non-bladeRF device found: VID 1d6b, PID 0002
[VERBOSE] Non-bladeRF device found: VID 413c, PID 2106
[VERBOSE] Non-bladeRF device found: VID 1d6b, PID 0001
[VERBOSE] Non-bladeRF device found: VID 1d6b, PID 0001
[VERBOSE] Non-bladeRF device found: VID 1d6b, PID 0001
[VERBOSE] Found a bladeRF (based upon VID/PID)
[DEBUG] Failed to retrieve serial number
[DEBUG] Failed to get version string descriptor (-9). Using legacy fallback.
[VERBOSE] Legacy alt setting detected.
[VERBOSE] Legacy config i/f detected.
[VERBOSE] Claimed all inferfaces successfully
[VERBOSE] Legacy change to interface 0
[DEBUG] Failed to switch to USB_IF_NULL
Failed to open device (first available): Unknown error code
Your updates to the code are definitely triggering here. However, the line “Failed to retrieve serial number” is still a little unsettling. Next, I followed the instructions for fetching the newest firmware. After applying the jumper and using dmesg output, this is what I see:

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ dmesg | tail
[ 2188.920375] usb 1-4: Manufacturer: Nuand
[ 3260.098266] compiz[2094]: segfault at 314 ip 00007fd90f0fba83 sp 00007ffff2f183a0 error 4 in libnvidia-glcore.so.304.88[7fd90dc16000+19d0000]
[ 3269.689395] traps: bamfdaemon[1919] trap int3 ip:7fdc8ada93d9 sp:7fff13319db0 error:0
[ 4305.455292] usb 1-4: USB disconnect, device number 2
[ 4308.935083] usb 1-4: new high-speed USB device number 3 using ehci-pci
[ 4309.067982] usb 1-4: New USB device found, idVendor=04b4, idProduct=00f3
[ 4309.067987] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4309.067991] usb 1-4: Product: WestBridge 
[ 4309.067993] usb 1-4: Manufacturer: Cypress
[ 4309.067996] usb 1-4: SerialNumber: 0000000004BE
Most of this output matches what you had in your original post. However, I don’t know if this is a problem or not, but in your post it says “new high-speed USB device number 7 using xhci_hcd”, whereas mine says “new high-speed USB device number 3 using ehci-pci”. I don’t know the difference between xhci_hcd and ehci_pci; is this something that is a problem?

Anyways, after removing the jumper, I continued to get info.

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -i -v info
[INFO] Found FX3 bootloader device on bus=1 addr=3. This may be a bladeRF.
[INFO] Use bladeRF-cli command "recover 1 3 <FX3 firmware>" to boot the bladeRF firmware.
No device(s) attached.

bladeRF> recover 1 3 bladeRF_fw_v1.5.3.img

Success! Use "open" to switch to this device.
Note that a "load fx3 <firmware>" is required to write the firmware to flash.

bladeRF> open
bladeRF> info

  Serial #:                 37400f00b68a9d9e9d8814b62eaf69ed
  VCTCXO DAC calibration:   0x9b09
  FPGA size:                115 KLE
  FPGA loaded:              no
  USB bus:                  1
  USB address:              4
  USB speed:                Hi-Speed
  Backend:                  libusb
  Instance:                 0

bladeRF> version

  bladeRF-cli version:        0.10.3-git-20d70a6-ppasaucy
  libbladeRF version:         0.12.1-git-20d70a6-ppasaucy

  Firmware version:           1.5.3-git-276379e
  FPGA version:               Unknown (FPGA not loaded)

bladeRF> load fx3 bladeRF_fw_v1.5.3.img
Flashing firmware from bladeRF_fw_v1.5.3.img...
[INFO] Erasing 0x00020000 bytes starting at address 0x00000000.
[INFO] Writing 0x00020000 bytes to address 0x00000000.
[INFO] Verifying 0x00020000 bytes at address 0x00000000
Done. Cycle power on the device.
bladeRF> quit
At this point I cycled the power for the BladeRF

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ dmesg | tail
[ 4683.754330] usb 1-4: Product: bladeRF
[ 4683.754332] usb 1-4: Manufacturer: Nuand
[ 4683.754335] usb 1-4: SerialNumber: 37400f00b68a9d9e9d8814b62eaf69ed
[ 4962.540454] usb 1-4: USB disconnect, device number 4
[ 4997.635160] usb 1-4: new high-speed USB device number 5 using ehci-pci
[ 4997.769544] usb 1-4: New USB device found, idVendor=1d50, idProduct=6066
[ 4997.769549] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4997.769553] usb 1-4: Product: bladeRF
[ 4997.769555] usb 1-4: Manufacturer: Nuand
[ 4997.769558] usb 1-4: SerialNumber: 37400f00b68a9d9e9d8814b62eaf69ed
I don’t know if this is problematic or not, but the output I see is different from what you have at this point.

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -p

    Backend:        libusb
    Serial:         37400f00b68a9d9e9d8814b62eaf69ed
    USB Bus:        1
    USB Address:    5
At this point I am quite happy, as I now see a serial number of my bladeRF, which is already a huge step in the right direction. Next, I disabled the FPGA autoloading.

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -L X
Flashing fpga...
Disabling FPGA flash auto-load
[INFO] Erasing 0x00010000 bytes starting at address 0x00040000.
Done.
However, now I encounter a problem.

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -f bladeRF_fw_v1.6.0
Flashing firmware...
Error: failed to flash firmware: File or device I/O failure
Just for the sake of completion, I power cycled the BladeRF, and then checked the version on it.

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -i
bladeRF> version

  bladeRF-cli version:        0.10.3-git-20d70a6-ppasaucy
  libbladeRF version:         0.12.1-git-20d70a6-ppasaucy

  Firmware version:           1.5.3-git-276379e
  FPGA version:               Unknown (FPGA not loaded)
After going through this process, I don’t entirely know if my BladeRF is okay, or if there is some underlying problem going on.

Hopefully this verbose feedback (pun absolutely intended) is useful to you, and any help you can provide is much appreciated!

Re: Problem connecting to device

Posted: Thu Feb 06, 2014 12:26 pm
by Ghostatlo
Ah, that fixed it. I used v1.6.1 and v0.0.3, and it (almost) worked perfectly. There's only one issue now, which is in the last step.

Code: Select all

ben@ben-Precision-WorkStation-T7500:~$ bladeRF-cli -i
bladeRF> version

  bladeRF-cli version:        0.10.3-git-20d70a6-ppasaucy
  libbladeRF version:         0.12.1-git-20d70a6-ppasaucy

  Firmware version:           1.6.1-git-b7e6642
  FPGA version:               Unknown (FPGA not loaded)

bladeRF> load fpga hostedx40.rbf
Loading fpga from hostedx40.rbf...
Error: Operation timed out
Any idea why the operation is timing out?

Re: Problem connecting to device

Posted: Thu Feb 06, 2014 12:58 pm
by Ghostatlo
It's the EP4CE115F23C8N. Does this mean that I should be using

Code: Select all

wget www.nuand.com/fpga/v0.0.3/hostedx115.rbf
instead of

Code: Select all

wget www.nuand.com/fpga/v0.0.3/hostedx40.rbf

Re: Problem connecting to device

Posted: Thu Feb 06, 2014 1:11 pm
by Ghostatlo
It works!!! Thank you for your help throughout this!!! Yeah, I'm pretty happy to have gotten the beefier FPGA, I'm planning on using it a lot once I'm fully up and running.