Transfer timed out for buffer

Having issues with the site, hardware, source code, or any other issues?
Post Reply
jarek556
Posts: 6
Joined: Mon Oct 15, 2018 9:52 pm

Transfer timed out for buffer

Post by jarek556 »

Hello!

I have problem with bladerf 2.0 A4. After some time of operation, the call to bladerf_sync_rx issues the following error:

[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1045] Transfer timed out for buffer 0x7f6227f0e410
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1045] Transfer timed out for buffer 0x7f6227f16420
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1045] Transfer timed out for buffer 0x7f6227f1e430
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1045] Transfer timed out for buffer 0x7f6227f26440
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1045] Transfer timed out for buffer 0x7f62245c3310
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1045] Transfer timed out for buffer 0x7f62245cb320
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1045] Transfer timed out for buffer 0x7f62245d3330
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1045] Transfer timed out for buffer 0x7f62245db340

When this problem appears, bladerf_sync_rx returns error -6: BLADERF_ERR_TIMEOUT

Next calls to bladerf_sync_rx doesn't work too, until card is closed and reopened again.

Host is Intel NUC with latest debian:

Linux fc05 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux

all possible software updated to latest versions:

bladeRF-cli -i
bladeRF> info

Board: Nuand bladeRF 2.0 (bladerf2)
Serial #: 9f26b7e5e0a8476fa32a0afbf2b64041
VCTCXO DAC calibration: 0x1f0f
FPGA size: 49 KLE
FPGA loaded: yes
Flash size: 32 Mbit (assumed)
USB bus: 2
USB address: 2
USB speed: SuperSpeed
Backend: libusb
Instance: 0

bladeRF> version

bladeRF-cli version: 1.6.1-git-c9a2230c
libbladeRF version: 2.0.2-git-c9a2230c

Firmware version: 2.2.0-git-47f93fe1
FPGA version: 0.7.3

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

Re: Transfer timed out for buffer

Post by bglod »

Can you try a different USB 3.0 port (that is connected to a different controller)? Or a different host altogether? Usually these types of problems are a lack of processing power on the host or a crappy USB controller. Sometimes the problem can be alleviated by tweaking the buffer size, number of buffers, and number of transfers.
Electrical Engineer
Nuand, LLC.
jarek556
Posts: 6
Joined: Mon Oct 15, 2018 9:52 pm

Re: Transfer timed out for buffer

Post by jarek556 »

I did a lot of testing and problem continues. I have tested few mainboards, cables and bladeRF cards. From time to time problem appears. I have tested latest fimrware and drivers, nothing helps.

Code: Select all

        
        buff_size = 4000000;
        const unsigned int num_buffers   = 16;
        const unsigned int buffer_size   = 8192; // Must be muliple of 1024
        const unsigned int num_transfers = 8;
        const unsigned int timeout_ms    = 3500;
        /* Configure both the device's RX module for use with the
         * synchronous interface. SC16 Q11 samples *without* metadata are
         * used. */
#ifdef BLADERF_API_1
        status = bladerf_sync_config(m_dev,
                                     BLADERF_MODULE_RX,
                                     BLADERF_FORMAT_SC16_Q11,
                                     num_buffers,
                                     buffer_size,
                                     num_transfers,
                                     timeout_ms);
#else
        status = bladerf_sync_config(m_dev,
                                     BLADERF_RX_X1, // x1 RX (SISO),
                                     BLADERF_FORMAT_SC16_Q11,
                                     num_buffers,
                                     buffer_size,
                                     num_transfers,
                                     timeout_ms);
#endif
What can I change/test to fix this problem ?
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: Transfer timed out for buffer

Post by robert.ghilduta »

Please ensure you are running the latest version of master from the Github.
beMet
Posts: 5
Joined: Tue Jun 21, 2022 4:24 am

Re: Transfer timed out for buffer

Post by beMet »

Hello everyone,

i'm fairly new to bladeRF and trying to develop a little software for data collection. I have a very similar issue as mentioned in this thread. If anyone could help, that would be very nice!

My setup: Raspberry Pi 4B rev 1.4 with bladeRF 2.0 xA4

I'm trying to continously transfer rx samples to the raspberry pi (Tx samples are just sent at the beginning of a measurement and stay constant).
The code is written in python, so i'm using the provided bindings which are slightly adapted to my needs (including trigger).

i've been playing around a lot with the

Code: Select all

sync_config
setting, but I am not really successful.

Code: Select all

self._device.sync_config(self._layout.RX_X2, self._DataFmt.SC16_Q11, 2, 1024*1, 1, 0)
What makes the situation even more strange to me: i have different setups (different raspberry pis) and all seem to behave somewhat differntly.

I also tried the

Code: Select all

bladerf_set_usb_reset_on_open()
but there is no direct influence on the issue (however in the dmesg log i see the difference).

Thanks for all kinds of inputs and help
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: Transfer timed out for buffer

Post by robert.ghilduta »

As a quick debug, does bladeRF-cli run ok?
beMet
Posts: 5
Joined: Tue Jun 21, 2022 4:24 am

Re: Transfer timed out for buffer

Post by beMet »

Sorry for the late reply.

bladeRF-cli is running ok, as far as I can tell
Post Reply