Open metasim opened 2 weeks ago
Do you stop the streams before changing the sampling rate?
@Heshyo I've tried it both ways. Stopping the stream first makes it occur less often, but doesn't eliminate the problem. The only workaround I have is to actually close the device and reopen it and set the new sample rate before activating the stream again.
This issue can somewhat be reproduced using the bladeRF-cli
alone:
set frequency rx 1.0G
set samplerate rx 1M
rx config file=samples.csv format=csv n=100M
rx start
rx wait 100ms
set samplerate rx 10M
rx wait 100ms
set samplerate rx 2M
rx wait 100ms
set samplerate rx 40M
rx wait 100ms
set samplerate rx 6M
rx wait 100ms
set samplerate rx 60M
rx wait
rx stop
Output:
RX1 Frequency: 1000000000 Hz (Range: [70000000, 6000000000])
Setting RX1 sample rate - req: 1000000 0/1Hz, actual: 1000000 0/1Hz
Setting RX1 sample rate - req: 10000000 0/1Hz, actual: 10000000 0/1Hz
Setting RX1 sample rate - req: 2000000 0/1Hz, actual: 2000000 0/1Hz
Setting RX1 sample rate - req: 40000000 0/1Hz, actual: 40000000 0/1Hz
[ERROR @ /privatehost/libraries/libbladeRF/src/streaming/sync.c:350] wait_for_buffer: Timed out waiting for buf_ready after 1000 ms
[ERROR @ /privatehost/libraries/libbladeRF/src/backend/usb/libusb.c:1090] Transfer timed out for buffer 0x1181c8000
Setting RX1 sample rate - req: 6000000 0/1Hz, actual: 6000000 0/1Hz
Setting RX1 sample rate - req: 60000000 0/1Hz, actual: 60000000 0/1Hz
Error: Operation invalid in current state
I'm not 100% sure, anecdotally the issue seems to happen more when the sample rate goes from something high to something substantially lower.
This is a request to reopen https://github.com/Nuand/bladeRF/issues/778, as we're constantly having the same problem reported.
Symptoms
Whenever the sample rate is changed, the driver hangs or times out.
Here are two examples of the types of errors rendered.
and
Versions
We're currently using the SoapySDR wrappers, as we use a number of SDRs (but bladeRF is our favorite). It's hard for us to pull SoapySDR out of the dependency chain, so I'm hoping someone could off advice of things to try to debug and track this down. Changing sample rate on the fly is a requirement for the system we're building.