Closed guruofquality closed 5 years ago
Actually this is not as simple as this. This commit fixes the issue with the RX gain (but maybe something should be fixed in libbladerf to handle that), but it breaks the transmission. I think the issue is with
After calling writeStream
several times, you get a timeout. It seems the buffers are all filled and nothing ever empty them.
Remember to enable the front end via bladerf_enable_module() after calling bladerf_sync_config(), and before attempting to call bladerf_sync_tx().
Ok, so the change is incorrect for transmit, but it might be OK for RX?
Remember to enable the front end via bladerf_enable_module() <i>after</i>
calling bladerf_sync_config(), and <i>before</i> attempting to call
bladerf_sync_rx().
Rx is the same. I think I will revert the commit. This is probably a libbladerf bug. I cant do anything about it in this wrapper.
I think the other option (if bladerf cant fix it in the driver) is to stash the gain when streaming and re-apply the gain once the enable() is called. I think a few of the rx only devices also do something like this.
The change seems indeed correct for RX but incorrect for TX.
I agree it would be best if this could be fixed in libbladerf instead. I opened https://github.com/Nuand/bladeRF/issues/746
this may affect certain settings to not have channels enabled at init time. This should fix some issues with setting the gain.