Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xmikos/simplesoapy
Simple pythonic wrapper for SoapySDR library
https://github.com/xmikos/simplesoapy
Last synced: 3 months ago
JSON representation
Simple pythonic wrapper for SoapySDR library
- Host: GitHub
- URL: https://github.com/xmikos/simplesoapy
- Owner: xmikos
- License: mit
- Created: 2017-02-16T01:07:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T00:50:59.000Z (almost 7 years ago)
- Last Synced: 2024-03-24T23:02:15.934Z (10 months ago)
- Language: Python
- Size: 29.3 KB
- Stars: 26
- Watchers: 4
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-gnuradio - SimpleSoapy - Simple pythonic wrapper for SoapySDR library (Other SDR Software)
README
SimpleSoapy
===========Simple pythonic wrapper for SoapySDR library
Requirements
------------- `Python 3 `_
- `NumPy `_
- `SoapySDR `_Limitations
-----------Only receiving is implemented. Transmission may be implemented in future.
Example
-------
::import simplesoapy
import numpy
# List all connected SoapySDR devices
print(simplesoapy.detect_devices(as_string=True))
# Initialize SDR device
sdr = simplesoapy.SoapyDevice('driver=rtlsdr')
# Set sample rate
sdr.sample_rate = 2.56e6
# Set center frequency
sdr.freq = 88e6
# Setup base buffer and start receiving samples. Base buffer size is determined
# by SoapySDR.Device.getStreamMTU(). If getStreamMTU() is not implemented by driver,
# SoapyDevice.default_buffer_size is used instead
sdr.start_stream()
# Create numpy array for received samples
samples = numpy.empty(len(sdr.buffer) * 100, numpy.complex64)
# Receive all samples
sdr.read_stream_into_buffer(samples)
# Stop receiving
sdr.stop_stream()