Page 1 of 1

SDRPlay, Raspberry Pi & Python

Posted: Fri Sep 28, 2018 6:36 pm
by danielbfox
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.

Re: SDRPlay, Raspberry Pi & Python

Posted: Mon Oct 15, 2018 6:08 pm
by danielbfox
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?

Re: SDRPlay, Raspberry Pi & Python

Posted: Tue Oct 16, 2018 3:25 am
by fventuri
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

Re: SDRPlay, Raspberry Pi & Python

Posted: Thu Oct 18, 2018 1:34 am
by ralpizar
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 :)

Re: SDRPlay, Raspberry Pi & Python

Posted: Fri Oct 19, 2018 2:02 am
by AussieSusan
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