adafruit / FreqShow

Raspberry Pi & PiTFT-based RTL-SDR frequency scanning and display tool.
MIT License
144 stars 67 forks source link

IOError on 64bit laptop aflter the splashscreen is displayed #13

Open bogdanr opened 8 years ago

bogdanr commented 8 years ago

I have this config:

# Application configuration.
SDR_SAMPLE_SIZE = 1922
CLICK_DEBOUNCE  = 0.4

if __name__ == '__main__':
        # Initialize pygame and SDL to use the PiTFT display and touchscreen.
        os.putenv('SDL_VIDEODRIVER', 'fbcon')
        os.putenv('SDL_FBDEV'      , '/dev/fb0')
        os.putenv('SDL_MOUSEDRV'   , 'TSLIB')
        os.putenv('SDL_MOUSEDEV'   , '/dev/input/mouse2')
        pygame.display.init()
        pygame.font.init()
        pygame.mouse.set_visible(True)

and I get this error message:

Found Rafael Micro R820T tuner
rtlsdr_demod_write_reg failed with -9
r82xx_write: i2c wr failed=-9 reg=06 len=1
Traceback (most recent call last):
  File "freqshow.py", line 103, in <module>
    fscontroller.current().render(screen)
  File "/root/FreqShow/views.py", line 364, in render
    self.render_spectrogram(screen.subsurface(spect_rect))
  File "/root/FreqShow/views.py", line 461, in render_spectrogram
    freqs = self.model.get_data()
  File "/root/FreqShow/model.py", line 159, in get_data
    samples = self.sdr.read_samples(freqshow.SDR_SAMPLE_SIZE)[0:self.width+2]
  File "/usr/lib64/python2.7/site-packages/rtlsdr/rtlsdr.py", line 337, in read_samples
    raw_data = self.read_bytes(num_bytes)
  File "/usr/lib64/python2.7/site-packages/rtlsdr/rtlsdr.py", line 321, in read_bytes
    % (result, num_bytes))
IOError: Error code -8 when reading 3844 bytes