• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

SimpleSoapy.egg-info/H03-May-2022-7154

LICENSEH A D06-Jun-20161.1 KiB2217

MANIFEST.inH A D06-Jun-201635 32

PKG-INFOH A D27-Apr-20172.3 KiB7154

README.rstH A D20-Mar-20171.1 KiB5034

setup.cfgH A D27-Apr-201738 53

setup.pyH A D27-Apr-20171,003 3228

simplesoapy.pyH A D27-Apr-201718 KiB505412

README.rst

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