SDRPlay, Raspberry Pi & Python

Add useful snippets of code or links to entire SDR projects.
Post Reply
danielbfox
Posts: 6
Joined: Wed May 30, 2018 3:38 pm

SDRPlay, Raspberry Pi & Python

Post by danielbfox » Fri Sep 28, 2018 6:36 pm

I have an SDRPlay connected to a Raspberry PI 3B+ and everything is working fine. What I would like to do is be able to experiment with the SDRPlay using Python 2 or 3. Things like controlling or getting the frequency, mode, etc. or reading the sample buffer from a Python program. I'm looking for some information to get me started on this. I'm using the microSD card image from this website.
Last edited by danielbfox on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

danielbfox
Posts: 6
Joined: Wed May 30, 2018 3:38 pm

Re: SDRPlay, Raspberry Pi & Python

Post by danielbfox » Mon Oct 15, 2018 6:08 pm

I python isn't an option then what IDE would I need to use to be able to experiment with controlling or getting data from the SDRPlay?

Reason: No reason

fventuri
Posts: 37
Joined: Sun Dec 25, 2016 4:24 pm

Re: SDRPlay, Raspberry Pi & Python

Post by fventuri » Tue Oct 16, 2018 3:25 am

Daniel,
I just saw your original question about SDRPlay and Python tonight.

I think you may want to look into GNU Radio (see: https://www.gnuradio.org/ and https://wiki.gnuradio.org/index.php/HowToUse).
GNU Radio is mostly written in Python and it allows you to write your own Python applications (https://wiki.gnuradio.org/index.php/Tut ... plications) ranging from a simple control for an SDR to a fully fledged radio receiver.

A good way to start with GNU Radio in my opinion is to use GNU Radio Companion (GRC) (see: https://wiki.gnuradio.org/index.php/GNURadioCompanion), which is a graphical interface to configure and assemble together the many blocks that make a complete SDR receiver; also GRC can generate Python files from a block design, which you may find a good way to get started quickly with your project (see: https://wiki.gnuradio.org/index.php/Gui ... _in_Python).

As per using one of the SDRplay RSP devices with GNU Radio, I recommend Jeff Long's gr-osmosdr block for SDRPlay RSPs - a good start on this topic is here: https://www.sdrplay.com/community/viewtopic.php?t=2881 - Jeff's github repository with the latest code is here: https://github.com/willcode/gr-osmosdr.

I went through all these steps a few months ago and I don't remember having many problems with building it (I did it on an x86_64 architecture; not sure how much different it would be for a Raspberry Pi/ARM architecture); I don't recall exactly all the steps, but I might be able to help you if you get stuck.

Franco
Last edited by fventuri on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

ralpizar
Posts: 1
Joined: Thu Oct 18, 2018 1:25 am

Re: SDRPlay, Raspberry Pi & Python

Post by ralpizar » Thu Oct 18, 2018 1:34 am

Hello, Greetings from Costa Rica.
I am would like to work on an ACARS decoder using RSP1A (I am using a WSMA-901 airband antenna ) and Raspberry Pi.
Do you -by chance- any decoder ( such as acarsdec ) available that I could use?
Any suggestion? Thanks in advance :)
Last edited by ralpizar on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

AussieSusan
Posts: 30
Joined: Wed Aug 16, 2017 6:50 am

Re: SDRPlay, Raspberry Pi & Python

Post by AussieSusan » Fri Oct 19, 2018 2:02 am

I used Python on my iMac to do some simple channel selection and FM decoding on a 2MHz bandwidth data stream from my RSP2.
However when I tried to transfer this to my RPi3, it struggled to keep up as Python is not the best choice (in my opinion) for fast real-time data processing. The have hardware (and driver) ran the equivalent C code (actually splitting into multiple simultaneous decoding threads) with hardly a sweat.
I've not tried it, but if you do go the Python route and have problems having it keep up, try separating the data capture form the USB port into a separate thread, and possibly use CPython, so it can use a single core for this high response-time task and use the other cores for the processing.
Susan

Reason: No reason

Post Reply