[rtl-sdr patch?] lib: retry i2c on failure

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

Fab Stz fabstz-it at yahoo.fr
Wed Oct 2 08:58:36 UTC 2019


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,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lib rtlsdr_demod_write_reg try a 2nd time.patch.patch
Type: text/x-patch
Size: 884 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20191002/73ad376b/attachment.bin>


More information about the osmocom-sdr mailing list