bladeRF-cli fails for repeated reception

Having issues with the site, hardware, source code, or any other issues?
Post Reply
feraculix
Posts: 3
Joined: Fri May 03, 2024 4:22 am

bladeRF-cli fails for repeated reception

Post by feraculix »

Hi everyone,

I'm exploiting the bladeRF-cli functionality to brute-force repeatedly receive with two channels and write the results to different files (overwriting them again and again).

In essence, I wrote a brief bash script to do the following
1. bladeRF-cli -l fpga_file...
2. forever do:
bladeRF-cli -s my_script.txt
where in my_script.txt, I configure the rx frequency, gain, samplerate and bandwidth ONCE, and then call HUNDRETS OF TIMES
rx config file=RX0.csv format=csv n=10K channel=1,2; rx start;rx wait;
rx config file=RX1.csv format=csv n=10K channel=1,2; rx start;rx wait;
rx config file=RX2.csv format=csv n=10K channel=1,2; rx start;rx wait;
rx config file=RX3.csv format=csv n=10K channel=1,2; rx start;rx wait;
rx config file=RX0.csv format=csv n=10K channel=1,2; rx start;rx wait;
rx config file=RX1.csv format=csv n=10K channel=1,2; rx start;rx wait;
.. and so on.

This seemed to work for maybe 20 seconds, until libusb eventually returns an error:
(with verbose settings, sorry for not copying the exact debug messages, I'm currently on another machine, I can do this if required)
.. everything running smoothly, when suddenly:
sync.c -> sync_rx: Worker is now running. [everything fine here]
nios_access.c -> nios_config_read: Read 0x00000001 [everything fine here]
nios_access.c -> nios_config_write: Wrote 0x00000001 [everything fine here]
common.c -> check_total_sample_rate: active_channels=1, rate_accum=4000000, maximum=80000000 [everything fine here]
libusb.c -> lubs_control_transfer failed: status = -7 [at this point, usually a: common.c -> check_total_sample_rate: active_channels=2, rate_accum=8000000, maximum=80000000 should be returned, after which the worker go to idle, buf mgmt should reset, worker should start again]
.... operation timed out .

When retrying, the bladeRF-cli fails at a different line in my_script.txt, sometimes being able to perform 2k or 3k "rx config ... rx start", sometimes it failes after a few hundrets of receptions.

If this persists, I am probably forced to write custom code in python (which I need to do sooner or later anyways), however, it would have been nice to be able to use the executable provided by Nuand out-of-the box ...

Any hint/advice/comment is appreciated, thank you.


Additional information:
bladeRF2.0 xA4
bladeRF-cli version: 1.8.0-0.2022.11-1
libbladeRF version: 2.4.1-0.2022.11-1
firmware version: 2.4.0-git-a3d5c55f
FPGA version: 0.15.3 (configured by USB host)
Doing this on a raspberry pi 5.
Post Reply