Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 37 lines (28 sloc) 0.707 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#! /usr/bin/env python

from rtlsdr import RtlSDR
import sys

if __name__ == "__main__":

if len(sys.argv) < 2:
print >> sys.stderr, sys.argv[0], "<outfile>"
sys.exit(1)

if RtlSDR.get_device_count() < 1:
raise IOError("No known devices found")

s = RtlSDR(0, 105700000, 1024000)

# This is actually a property that changes the frequency
s.frequency = 54000000
s.frequency = 927000000
s.frequency = 435012000
s.frequency = 145125000
s.frequency = 130100000
s.frequency = 105700000

s.reset_buffer() # Must do before first read
buf = s.read()
outf = open(sys.argv[1], "w")

try:
while True:
outf.write(s.read())
except KeyboardInterrupt:
pass
finally:
outf.close()
s.close()
Something went wrong with that request. Please try again.