Hello,
Actually, relaunching the call
of libusb_control_transfer
in rtlsdr_demod_write_reg
does the trick for all three messages and sets the frequency correctly without
error message. This seems to fix also the gain not being set.
The call of rtlsdr_demod_read_reg is necessary before recalling
libusb_control_transfer, if we juste call libusb_control_transfer a 2nd time
this doesn't work.
The patch in my initial post is not necessary if this one is applied.
Pull request:
https://github.com/steve-m/librtlsdr/pull/58
Regards
Le mercredi 2 octobre 2019, 08:25:54 CEST Fab Stz a écrit :
Hello,
When doing a setFrequency I usually have this error afterwards and the
frequency is actually not changed
rtlsdr_demod_write_reg failed with -9
r82xx_write: i2c wr failed=-9 reg=17 len=1
r82xx_set_freq: failed=-9
By searching around I found this commit that makes the trick for me.
https://github.com/keenerd/rtl-sdr/commit/
9ed9ffa37e24f3293fa960cfcd74909ac3e9996c
This will actually really set the frequency and remove the last 2 errors
related to "r82xx". The only error remaining is then
rtlsdr_demod_write_reg failed with -9
If you can include that upstream that would be nice.
I created a pull request here :
https://github.com/steve-m/librtlsdr/pull/56
Actually the commit is part of a large PR that you may be interested in ?
https://github.com/keenerd/rtl-sdr/pull/8
Regards,