heliosh
About
- Username
- heliosh
- Joined
- Visits
- 6
- Last Active
- Roles
- Member
- Points
- 36
-
Reading signal strength from shell [option added to kiwirecorder]
I could, but the difficult part is not the script, but getting known to rrdtool. It's pointless if you don't understand how rrdtool works. Once you understand how rrdtool works, you're most likely better off with creating your own scripts.
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:rrdtool create kiwi.rrd \ --step 60 \ DS:10m:GAUGE:120:-200:0 \ RRA:LAST:0.5:1:2628000
https://oss.oetiker.ch/rrdtool/doc/rrdupdate.en.html
That has to be run every minute, for example by a cronjob.workingdir=~/kiwiclient samplecount=15 lowfreq=950 highfreq=1050 v10m=`$workingdir/kiwirecorder.py --nb --server-host=192.168.8.73 --server-port=8073 --freq=27999 --S-meter=$samplecount --m usb -L $lowfreq -H $highfreq |awk '{print $2}'` rrdtool update $workingdir/rrd/kiwi.rrd N:$v10m
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.RRDGRAPH="/usr/bin/rrdtool graph" WWWPATH=/var/www/rrd/kiwi $RRDGRAPH -v dBm/Hz $WWWPATH/kiwi-daily.png \ --end now --start end-86400s -w 1440 -h 500 -A -E \ DEF:v10m=kiwi.rrd:v10m:LAST:reduce=AVERAGE \ CDEF:v10mHz=v10m,20,- \ LINE2:v10mHz#0066ff:"10m"
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. -
Reading signal strength from shell [option added to kiwirecorder]
I could, but the difficult part is not the script, but getting known to rrdtool. It's pointless if you don't understand how rrdtool works. Once you understand how rrdtool works, you're most likely better off with creating your own scripts.
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:rrdtool create kiwi.rrd \ --step 60 \ DS:10m:GAUGE:120:-200:0 \ RRA:LAST:0.5:1:2628000
https://oss.oetiker.ch/rrdtool/doc/rrdupdate.en.html
That has to be run every minute, for example by a cronjob.workingdir=~/kiwiclient samplecount=15 lowfreq=950 highfreq=1050 v10m=`$workingdir/kiwirecorder.py --nb --server-host=192.168.8.73 --server-port=8073 --freq=27999 --S-meter=$samplecount --m usb -L $lowfreq -H $highfreq |awk '{print $2}'` rrdtool update $workingdir/rrd/kiwi.rrd N:$v10m
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.RRDGRAPH="/usr/bin/rrdtool graph" WWWPATH=/var/www/rrd/kiwi $RRDGRAPH -v dBm/Hz $WWWPATH/kiwi-daily.png \ --end now --start end-86400s -w 1440 -h 500 -A -E \ DEF:v10m=kiwi.rrd:v10m:LAST:reduce=AVERAGE \ CDEF:v10mHz=v10m,20,- \ LINE2:v10mHz#0066ff:"10m"
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. -
Kiwi: Mk II? [answer: no]
-
Kiwi: Mk II? [answer: no]
-
Kiwi: Mk II? [answer: no]