jaycedowell / rtl_osv21

RTL SDR software for reading Oregon Scientific v2.1 sensors
GNU General Public License v2.0
5 stars 6 forks source link

readRTL() cannot be called again without restarting python #6

Closed aabaker closed 8 years ago

aabaker commented 8 years ago

decoder.c contains a comment that the call to rtlsdr_close() has been omitted because it causes segfaults. The post at http://photobyte.org/rtl-sdr-segmentation-error-solved/ says this is due to a specific version of libusb and using a newer libusb fixes it.

Reinstating the rtlsdr_close() routine allows another read to be started but that read never completes because do_exit doesn't get reset to 0.

jaycedowell commented 8 years ago

Could try adding a "do_exit = 0;" on line 319 of decoder.c?

aabaker commented 8 years ago

That should work but it seemed cleaner to me to do it before starting the new read rather than when the current one finishes. For some reason I'd failed to push the change I made to make it work but it's now at https://github.com/aabaker/rtl_osv21/commit/7b96d995a5e86ce3f6577c1bac5a3e7055409e4a

jaycedowell commented 8 years ago

Even better. If you put in a pull request for this I'll merge it in.

jaycedowell commented 8 years ago

Thanks.