The KiwiSDR 2 online store is open for orders! Please visit kiwisdr.nz
Reading signal strength from shell [option added to kiwirecorder]
Hi,
What is the easiest method to read the signal strength of a defined bandwidth/frequency from linux shell?
(easiest: least amount of programming skills required
What is the easiest method to read the signal strength of a defined bandwidth/frequency from linux shell?
(easiest: least amount of programming skills required
Comments
Ideal would be a single reading of the average of a few seconds.
See the Makefile target "s_meter" for an example of how to run it from the command line.
But it's the same for the web interface, so it probably isn't a problem of kiwirecorder.
The s_meter extension on the other hand does show levels below -127 dBm.
Since this is the first version of kiwiclient that can report s-meter values, a change maybe wouldn't hurt a lot. But on the other hand, I probably don't understand all consequences.
Anyway, I'm happy that I have s-meter values now. I'm trying to log the noise floor on the ham bands. It will need some tweaking though.
I'm thinking that it could be used as a drive by measurement system, and used to produce heat maps.
An example of what I'd like to achieve is shown on this web page.
https://www.g8jnj.net/vdsl
Regards,
Martin - G8JNJ
will return 10 S-meter averages on 10000 kHz, made in a 10 kHz passband with IQ mode
I've had a little difficulty with the first measurement being bogus so you may want to read a single average before accruing a bunch.
Also, the 2.5a version of wsprdaemon is in the latest kiwiclient repo in the tools directory.
python kiwirecorder.py -s 10.0.0.77 -p 8074 -f 10000 m iq -L -5000 -H 5000 --s-meter 2
returned:
RSSI: -59.2
Sorry, I don't use Windows much so can't help you further.
python kiwirecorder.py -s www -f 1440 -m iq -L -5000 -H 5000 --s-meter 10 > s-meter_output.txt
Any chance adding a 'streaming' version of this printing time and averaged S-meter reading to a file ?
Best regards, Ben
python kiwirecorder.py -s www -f 1440 -L -5000 -H 5000 --s-meter 10
RSSI: -67.7
And the single pipe command (>) overwrites the file each time:
python kiwirecorder.py -s www -f 1440 -m iq -L -5000 -H 5000 --s-meter 10 > s-meter_output.txt
And the double (>>) pipe command adds the RSSI reading to the text file each time:
python kiwirecorder.py -s www -f 1440 -m iq -L -5000 -H 5000 --s-meter 10 >> s-meter_output.txt
I tried this on Windows 10 and on my Ubuntu Desktop...
It would be nice to have the timestamp with each RSSI reading.
Like Heliosh I am also very interested in plotting RSSI.
Thank you JKS. Keep going.. (-:
you could try something in bash like
Just starting to learn simple programming and to speed up things I wonder if anyone would be willing to show me how to extract these averaged RSSI readings periodically and then plot these values in "real time". Any pointers are welcome.
Thanks,
Claire.
Thanks,
Claire
There are 3rd party tools for rrdtool that might be easier to use. I haven't tried them yet, but here's one:
https://www.cacti.net/
But there you go, that's how I did it:
First you need to create a rrd (round robin database):
https://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html
An example for a database covering 5 years for a single band and 1 minute resolution would be: Then you can feed the database with values from kiwirecorder.py:
https://oss.oetiker.ch/rrdtool/doc/rrdupdate.en.html That has to be run every minute, for example by a cronjob.
Note that kiwirecorder.py has sometimes random delays where it does nothing(?), so you can't use the entire minute for collecting s-meter data, but have to include some reserve time. I use max. 50% of the time but sometimes that's still not enough.
Finally you can create the graphs.
https://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html I have the graphs created from a php-script, so they are only created when I visit the page.
The conversion from dBm-bandwidth to dBm/Hz could be better done at the database-update stage and not at the graph-stage as I did it.
Because this is a one-off project and to save time I think for me it is better to try and find a way to use Python first. If that doesn't work out then I can always start to learn about rrdtool or perhaps better switch to Linux.
Claire
Thus if you have calibrated the S-meter (on the admin page), it may not read properly. The only way I've found around this problem is to "lie" to the calibration on the config page such that the returned value is always higher than -127 dBm. I discovered this while trying to measure the noise floor of a 33 dB gain LNA with terminated input. The gain ahead of the kiwi was sufficient to establish a low noise floor, near -171 dBm/1-Hz (-136 dBm in a USB bandwidth) but if properly calibrated, the returned value was always "-127".
Interestingly, the S-meter extension does not appear to have this problem. It can report values well below this limit.