1SimpleSoapy 2=========== 3 4Simple pythonic wrapper for SoapySDR library 5 6Requirements 7------------ 8 9- `Python 3 <https://www.python.org>`_ 10- `NumPy <http://www.numpy.org>`_ 11- `SoapySDR <https://github.com/pothosware/SoapySDR>`_ 12 13Limitations 14----------- 15 16Only receiving is implemented. Transmission may be implemented in future. 17 18Example 19------- 20:: 21 22 import simplesoapy 23 import numpy 24 25 # List all connected SoapySDR devices 26 print(simplesoapy.detect_devices(as_string=True)) 27 28 # Initialize SDR device 29 sdr = simplesoapy.SoapyDevice('driver=rtlsdr') 30 31 # Set sample rate 32 sdr.sample_rate = 2.56e6 33 34 # Set center frequency 35 sdr.freq = 88e6 36 37 # Setup base buffer and start receiving samples. Base buffer size is determined 38 # by SoapySDR.Device.getStreamMTU(). If getStreamMTU() is not implemented by driver, 39 # SoapyDevice.default_buffer_size is used instead 40 sdr.start_stream() 41 42 # Create numpy array for received samples 43 samples = numpy.empty(len(sdr.buffer) * 100, numpy.complex64) 44 45 # Receive all samples 46 sdr.read_stream_into_buffer(samples) 47 48 # Stop receiving 49 sdr.stop_stream() 50