Пример #1
0
def openSdr():
    d = soapySdrDevice.SoapySdrManager()

    for sdr in d.getSdrs():
        it = sdr.getItems()
        if 'driver' in it:
            if it['driver'] == 'hackrf':
                break
    else:
        print("No hackrf found. Exiting")
        exit(-1)
    sdr.setSampleRate(1.012e6)
    print("Sample rates", sdr.getSampleRate())
    sdr.setFrequency(145.00e6)
    print("Center frequencies", sdr.getFrequency())
    return sdr
Пример #2
0
import dsp.db
import dsp.limiter
import dsp.resample
import dsp.agc
import dsp.fmDemod
import dsp.sink
import dspPipeLine
import time
import soundDevice
import dsp.fftPlot
import dsp.status
import dsp.tuner
import dsp.squelch
import dsp.acCouple

d = soapySdrDevice.SoapySdrManager()

#list all sdr devices
print "SDR devices"
for s in d.getSdrs():
    print "Device", str(s)

for sdr in d.getSdrs():
    it = sdr.getItems()
    if 'driver' in it:
        if it['driver'] == 'hackrf':
            break
else:
    print "No hackrf found. Exiting"
    exit(-1)