Airspy ADS-B decoder

We should probably start a new thread just for RPIMonitor.

I added GPU temp to the temperature gauge.
image
Not sure if they are ever very different but it was using
cat /sys/class/thermal/thermal_zone0/temp
so I added the
vcgencmd measure_temp
version which gets the GPU temp, I believe.

This goes in /etc/rpimonitor/template/temperature.conf

########################################################################
# Extract CPU Temperature information
#  Page: 1
#  Information               Status     Statistics
#  - cpu temperature         - yes      - yes
#
# Note: Rounding temperatures to two digits is done with the
#  post-processiing formula: sprintf("%.2f", $1/1000)
#  It is possible to roud to 1 digit with sprintf("%.1f", $1/1000)
########################################################################
dynamic.12.name=soc_temp
dynamic.12.source=/sys/devices/virtual/thermal/thermal_zone0/temp
dynamic.12.regexp=(.*)
dynamic.12.postprocess=sprintf("%.2f", $1/1000)
dynamic.12.rrd=GAUGE

dynamic.13.name=gpu_temp
dynamic.13.source=vcgencmd measure_temp
dynamic.13.regexp=temp=(.*)'C
dynamic.13.postprocess=sprintf("%.2f", $1)
dynamic.13.rrd=GAUGE

web.status.1.content.4.name=Temperature
web.status.1.content.4.icon=cpu_temp.png
web.status.1.content.4.line.1=JustGageBar("CPU Temperature", data.soc_temp+"°C", 30, data.soc_temp, 80, 100, 80)+" "+JustGageBar("GPU Temperature", data.gpu_temp+"°C", 30, data.gpu_temp, 80, 100, 80)

web.statistics.1.content.8.name=Temperature
web.statistics.1.content.8.graph.1=soc_temp
web.statistics.1.content.8.ds_graph_options.soc_temp.label=CPU temperature (°C)
web.statistics.1.content.8.graph.2=gpu_temp
web.statistics.1.content.8.ds_graph_options.gpu_temp.label=GPU temperature (°C)

Please do. I’d like to install it on my Pi4 when I get decent enough weather to lower the mast and it’s a bit of a pain searching through this threadnought.

Yes it was for RPI-Monitor ;+))

Thanks for this tips !

Got RPI monitor installed, not to grapple with adding avionics.

I created a new thread, with links to all of the existing info that I could find in this one.

Got some time to play with the RPi 4 today.
with only an Airspy R2 attached:

no packing(timeout -s INT 60 airspy_rx -r /dev/null -t 4 -a 20000000 -f 1090 -g 18)
Average speed 20.0002 MSPS Real

packing(added -p 1)
Average speed 20.0004 MSPS Real

no packing 24(timeout -s INT 60 airspy_rx -r /dev/null -t 4 -a 24000000 -f 1090 -g 18)
Average speed 20.5280 MSPS Real

packing at 24 (added -p 1)
Average speed 24.0007 MSPS Real

So it seems possible to run at 24 with packing.
Not sure if it is worth the risk, being on the edge of the USB bus capabilities.

Firmware versions on all my airspys are current:
Firmware Version: AirSpy NOS v1.0.0-rc10-3-g7120e77 2018-04-28

1 Like

This morning the CPU usage of my Airspy decoder dropped, but I haven’t change the version (i’m always in 1.42), strange this difference ?

It’s relative to CPU clock.

Thanks, so it’s better to have put the Performance setting on my cpu usage ?

If you don’t have lost samples in the system log, CPU usage is not an issue.
Thus changing the governor has zero effect.

It got colder so the CPU can run at max frequency instead of what was running before?
It happend to me, because my power supply got hot and had lass than 5.1V (triggered undervoltage limiter of CPU).

PS: I noticed that my Amazon Kindle PS is rated for 5.2V!!! They know something…

This morning new strange thing with the CPU Usage graph :

No reboot or change, i was sleeping at this time !
If i look in RPI-Monitor my cpu usage for the Airspy is near 50%, so is there a bug in the graph ?

My Airspy USB seems to work properly, since it decodes a usual number of planes this morning.

Sans-titre-1

And after a complete reboot of the Pi4, the graphs works good gain !

Strange isn’t it ?

Yes that’s strange.

What is the output for this:

pgrep airspy

The rpi monitor is running airspy -v i suppose to display the version number?
I’m really not sure what happened.
The way i grab the airspy CPU load is not very elegant, but it works and that’s good enough so far.

cat /proc/$(pgrep airspy_adsb)/task/$(ls /proc/$(pgrep airspy)/task | awk NR==3)/stat | cut -d ' ' -f 14,15 && getconf CLK_TCK

That’s the command run from python, the system and user time are then added and divided by CLK_TCK which the command gives on the second line.

If it was like my installation, piaware (the application) had stopped communicating with the FlightAware server. The connection between my RPI4 and FlightAware had been closed for many hours. the piaware process was running at 100%.

After rebooting, piaware was communicating normally with FlightAware and was down to using very minimal CPU.

There was nothing useful to see in daemon.log. piaware.log showed the following (between the time I woke up and saw the problem and the time I rebooted shortly thereafter) – pretty much nothing of interest except for:

Oct 24 04:08:48 raspberrypi piaware[825]: 2154016 msgs recv’d from dump1090-fa (1382 in last 5m); 2147682 msgs sent to FlightAware
Oct 24 04:11:19 raspberrypi piaware[825]: Lost connection to adept server at 70.42.6.224/1200: server closed connection
Oct 24 12:53:55 raspberrypi piaware[780]: creating pidfile /run/piaware/piaware.pid
Oct 24 12:53:55 raspberrypi piaware[780]: ****************************************************

NOTE: This all seemed to occur right at midnight (my time - EST). My statistics on FA stopped at that very same time - https://flightaware.com/adsb/stats/user/mtindor.

During the whole time that my RPI4 was not communicating with FlightAware, the graphs show that the Airspy and dump1090-fa were working and collecting aircraft data the whole time. There is no break in ADSB detection in my local graphs on the PI4. Everything looks completely normal in all of the logs and my local graphs, with the exception of lost communications between piaware and FlightAware servers at midnight EST.

Mike

I bet this is a tcltls bug. I thought we distributed packages that worked around it, though.

edit: oh, Pi 4, so not a sdcard image. Did you pick up the packaged version of tcl-tls from the FlightAware repository, or do you have the standard raspbian version?

This is the wrong thread for this discussion, but oh well. If it is a tcl-tls bug, keep in mind that I’m running Raspian Buster Lite on an RPI4 with Flightaware 3.7.2 installed – if that is of any help. Everyone with a feeder didn’t go down, obviously. So it must be unique to a specific platform / version of piaware.

I did not specifically install any tcl-tls stuff. I just installed Raspian Buster Lite and piaware (and Airspy stuff and graphs). So I guess I would have to say “no, I didn’t do that”. Wouldn’t know how.

Mike

root@ads-b:~# pgrep airspy
336
root@ads-b:~#

Thanks for your attention

Yeah i really can’t explain what’s happening.

sudo journalctl -u collectd

This log might have been useful when the problem was happening.
But might not have shown anything.

If it happens again … don’t reboot lol.