Closed maleadt closed 2 years ago
I have also seen this; one thing that is worth investigating is whether the digital loopback is passing through the TxTSP/RxTSP blocks; if so, you might need to disable the AGC, DC tracking loop, etc... You can do that by re-enabling the modules via the settings API:
SoapySDR.SoapySDRDevice_writeSetting(dev, "RXTSP_ENABLE", "TRUE")
SoapySDR.SoapySDRDevice_writeSetting(dev, "TXTSP_ENABLE", "TRUE")
This also happens with FPGA_TX_RX_LOOPBACK_ENABLE
, which doesn't involve the RF IC, so those settings don't have an effect.
I can't reproduce this in C, and since it disappears when running loopback_test()
a second time (which completely re-initializes the device) I'm going to chalk this up to stale buffers being submitted (i.e. not a serious problem). This seems confirmed by the number of buffers between these initial repetitions being exactly 256. I guess the hack in https://github.com/JuliaComputing/xtrx_julia/pull/37 is incomplete.
Here's a simple script that transmits a couple of buffers and receives them back over the loopback:
Output:
After a while, the data is properly received (in-order, consecutively), but the first couple of iterations are just weird. I'd expect a couple of additional zeros, because of compilation latency and such, but it's weird how some data repeats...
Note that this is with https://github.com/JuliaComputing/xtrx_julia/pull/37, hence the data reverts to 0 after the last buffer (999).