Briefly start in TX mode to ensure correct RX frequency

Obviously SoapyHackRF does not set the correct RX frequency on startup.
This is a crude but effective workaround.
This commit is contained in:
Thomas Kolb 2022-05-07 20:10:55 +02:00
parent ec99cedaf4
commit b2d6c713e1

View file

@ -175,7 +175,7 @@ int main(void)
SoapySDR_setLogLevel(SOAPY_SDR_DEBUG);
bool on_air = false;
bool on_air = true;
debug_fd = open("/tmp/dump.cf32", O_CREAT | O_WRONLY | O_TRUNC);
@ -201,7 +201,8 @@ int main(void)
pfd.fd = m_tunfd;
pfd.events = POLLIN;
RESULT_CHECK(sdr_start_rx(&sdr));
// start in TX mode to work around SoapyHackRF not setting the correct frequency.
RESULT_CHECK(sdr_start_tx(&sdr, 1));
unsigned rx_retries = 0;