Capture RX samples with bladeRF test program

Having issues with the site, hardware, source code, or any other issues?
Post Reply
anrp
Posts: 6
Joined: Fri Mar 01, 2013 3:25 am

Capture RX samples with bladeRF test program

Post by anrp »

I can't capture with the bladeRF test program.

I did manage to rebuild both the FX3 firmware and the FPGA firmware (commandline linux, quartus 12.1sp1). Apparently the device shipped with 1.0 FX3 firmware and I downgraded to 0.3 (what was in the github...) don't really know if that's related. Everything I installed/built out of github was as of 7PM EST July 24.

anrp@laptop5:~/bladerf/bladeRF/linux/apps$ sudo ./bin/bladeRF --device /dev/bladerf1 --load-fpga ../../hdl/quartus/hostedx40.rbf
Loading fpga...
FPGA aleady loaded - reloading!
Done.
bladeRF> probe

Path: /dev/bladerf1
Serial: 0x0000000000000000
Firmware: v0.3
FPGA: v0.0

bladeRF> set gpio 0x00
bladeRF> set gpio 0x57
bladeRF> set frequency rx 900000000

start=0 stop=63 set=31
Set RX frequency: 900000000Hz

bladeRF> set bandwidth 28000000

Set RX bandwidth - req: 28000000Hz actual: 28000000Hz
Set TX bandwidth - req: 28000000Hz actual: 28000000Hz

bladeRF> set samplerate 40000000

Setting RX sample rate - req: 40000000Hz, actual: 40000000Hz
Setting TX sample rate - req: 40000000Hz, actual: 40000000Hz

bladeRF> rx file.bin binary 100000000
bladeRF> print gpio

GPIO: 0x00000057

LMS Enable: Enabled
LMS RX Enable: Enabled
LMS TX Enable: Enabled
TX Band: Low Band (300M - 1.5GHz)
RX Band: Low Band (300M - 1.5GHz)


.... nothing, no file.bin. ??

Nothing really interesting in the kernel log.
[172041.949749] usb 4-1: new SuperSpeed USB device number 27 using xhci_hcd
[172041.967134] usb 4-1: Parent hub missing LPM exit latency info. Power management will be impacted.
[172041.969036] usb 4-1: New USB device found, idVendor=1d50, idProduct=6066
[172041.969046] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[172041.969052] usb 4-1: Product: bladeRF
[172041.969057] usb 4-1: Manufacturer: Nuand
[172041.969433] xhci_hcd 0000:0e:00.0: xHCI xhci_add_endpoint called with enabled ep ffff8804243652c0
[172041.969442] xhci_hcd 0000:0e:00.0: xHCI xhci_add_endpoint called with enabled ep ffff880423e130c0
[172041.985597] nuand_bladerf 4-1:1.0: Nuand bladeRF device is now attached

LED2 starts blinking after I load the FPGA, LED3 is always on, and LED1 blinks fast after I issue the samplerate command.
Should I be waiting for things to smooth out?
anrp
Posts: 6
Joined: Fri Mar 01, 2013 3:25 am

Re: Capture RX samples with bladeRF test program

Post by anrp »

Looking at bladeRF's rx.c test code, it's not implemented yet. Oops...

However, the rx_test.c doesn't work either.

sudo strace ./rx_test 40000000 40000000
execve("./rx_test", ["./rx_test", "40000000", "40000000"], [/* 18 vars */]) = 0
brk(0) = 0xa77000
[lots of boring library setup here]
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0) = 0xa77000
brk(0xa98000) = 0xa98000
open("/dev/bladerf1", O_RDWR) = 3
ioctl(3, 0x80044e1b, 0x7fffc78b21ac) = 0
ioctl(3, 0x80044e01, 0x7fffc78b218c) = 0
ioctl(3, 0x80044e00, 0x7fffc78b2170) = 0
read(3, 0x602080, 4096) = -1 ETIMEDOUT (Connection timed out)
read(3, 0x602080, 4096) = -1 ETIMEDOUT (Connection timed out)
read(3, 0x602080, 4096) = -1 ETIMEDOUT (Connection timed out)
read(3, 0x602080, 4096) = -1 ETIMEDOUT (Connection timed out)
read(3, 0x602080, 4096) = -1 ETIMEDOUT (Connection timed out)
read(3, 0x602080, 4096) = -1 ETIMEDOUT (Connection timed out)
bpadalino
Posts: 303
Joined: Mon Mar 04, 2013 4:53 pm

Re: Capture RX samples with bladeRF test program

Post by bpadalino »

We have someone working on getting TX and RX going on the CLI on github.

The format is something like

Code: Select all

rx config file=blah.bin n=8192
rx
rx start
That should setup to store to a file 'blah.bin' for 8192 samples. It will be binary, host native format. The 'rx' will print the configuration. The 'rx start' should start it. If you did 'n=0', the reception would be infinite until an 'rx stop' was issued.

The timeouts are strange. Are you connected via USB SS or HS in your dmesg? If you do a 'gpio print' what do you get?

Give the branch mentioned above a try and see how it works for you? Note that sample numbers being multiples of 1024 make life easy, but I believe support for different file sizes have been implemented.
Post Reply