how to do autonomous data export

General discussions
captcha
Posts: 4
Joined: Fri May 19, 2017 5:26 am

how to do autonomous data export

Postby captcha » Fri May 19, 2017 5:52 am

Dear Forum,

Up until now I have mainly interacted with SDRs through a GUI, however using an RSP2 I am now trying to see if there's a way to monitor certain frequencies and export any relevant data in some kind of unattended way. I don't as yet know what characteristics can be exported but I'd like to set up an autonomous monitoring station that will output the noise levels on a few frequencies in the amateur radio bands and save them as a data file to disk. Once I have that I can run gnuplot to make pretty graphs so I can see what the noise levels were across the day.

For example I'd like to monitor 3.500MHz, 3.600MHz and 3.700MHz (80m band). Take a small sample once every 5 minutes, get the signal and noise level figures and then save that to an ASCII file.

Would that be difficult to do?

Is there perhaps a guide somewhere that can help a noob in this area get started?

Btw, I'm fluent (enough) with C and Java.
Last edited by captcha on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

K5MWR
Posts: 1
Joined: Thu Jun 01, 2017 12:22 pm

Re: how to do autonomous data export

Postby K5MWR » Thu Jun 01, 2017 12:28 pm

Very interested in learning about this capability also as our club is setting up a new station an we are seeing significant noise issues that need to be correlated to other building activities. The approach you are suggesting here of using the SDRplay to monitor several freq and log strength readings is precisely what we are trying to see how to do.
Thanks
K5MWR
Last edited by K5MWR on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

captcha
Posts: 4
Joined: Fri May 19, 2017 5:26 am

Re: how to do autonomous data export

Postby captcha » Fri Jun 02, 2017 1:57 am

Although I haven’t gotten the final answer yet, I was able to test using other methods and got some results that I think are worth posting here.

I wasn’t able to make much sense of the api or extio. These are still foreign beasts to me and although they may hold they key to my question, I kinda gave up on this as I have gotten some results with other techniques that look promising to what I’m trying to achieve.

First, I wondered if it was possible to save the audio to a .wav file. If I could do that then maybe I could do some post-processing on the .wav file and get some information about signal intensity etc. Since I didn’t have the RSP2 at hand (I’m asking on behalf of a fellow ham who owns one) I tried my cheapo RTL820 sdr. The RTL820 doesn’t go much lower than 24MHz, but for testing purposes this would suffice. My user environments are both Linux and Windows (7) but I found that many things work on both platforms.

Using the command line utility rtl_fm I was able to save audio directly to file. Something like:

Code: Select all

rtl_fm -f 137620000 -s 11025 -g 29 -p 22 - | sox -t raw -e signed -c 1 -b 16 -r 11025 - recording.wav
will save the audio (not I-Q data) and do some further processing with sox (Linux).

Then, also in Linux:

Code: Select all

play -V0  <filename> stat -freq
shows the byte-for-byte values of a 16-bit PCM .wav, and

Code: Select all

sox <filename> -n stat
shows a final report of summarized values.

I also experimented with VAC (Virtual Audio Cable) to save audio from SDRsharp to file, but ideally you want to do this autonomously and without the overheads (and requirements) of a GUI to tune to a frequency and produce audio.

As a further tangent I found this very useful site http://kmkeen.com/rtl-power/ where the use of the rtl_power command line tool is demonstrated to record a slice of fm spectrum and save it as a .csv file. If this software is compatible with the RSP2 I think we’re in business.

I have used this a few times now and I’m really impressed with how easy it is to save data. On the aforementioned website is also a link to a python script that can turn the .csv data into a waterfall graph:

Image
Not really necessary, but it does help visualize a large chunk of recorded data in csv format.

Python (for generating the graphs) isn't natively installed in Windows, but can be grabbed from the python website. Also, I noticed that I had to install the Pillow library to make these scripts work.


The saved data in .csv format looks something like this:
Image
Whereby each cell with a dBm value is a pixel on the graph.

One thing I discovered is that the rtl_power utility has been made available for other sdr’s through the efforts of the Pothos and SoapySDR Project (https://github.com/pothosware/pothos/wiki). Their ported code is called rx_power and I was able to run it with my RTL820 dongle and got the same .csv output.

Since I don’t have the RSP2 device at my disposal at this stage, I would hazard a guess and say that if the Pothos/SoapySDR suite of tools is compatible with whatever the RSP2 is using, it would be a workable solution to export data of a slice of arbitrary frequencies, run some basic file processing scripts over it and log the results in a database of sorts.

I will post back here when I have some more news to report on how to export data from the RSP2.
Last edited by captcha on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest