FlightAware Discussions

HOWTO: Airspy mini and Airspy R2: Piaware / dump1090-fa configuration


#141

I’m not sure which clock the different RPi3 use.
Commenting out the arm_freq line will mean you get the normal clock of your pi.
For a 3B that is 1200 and for a 3B+ that is 1400.

If yours is really 800 than i would avoid the -m20 :slight_smile:
Check your FA stats, MLAT is probably already red.

Btw do you just reboot the pi when you change something like -m20?


#142

I think that 800MHz is the “normal” frequency and the 1200Mhz is the “Turbo” one. Same probably for your 3B+, 1400 is the Turbo one.
I’ll comment back that line, to see what I get.
I have installed inxi and that gives this info too:

pi@pi_3:~ $ sudo inxi
CPU~Quad core ARMv7 rev 4 (v7l) (-MCP-) speed~800 MHz Kernel~4.14.71-v7+ armv7l Up~15 min Mem~94.0/927.2MB HDD~NA(-) Procs~110 Client~Shell inx i~2.3.5


#143

If you make a # before that line and reboot, lscpu will show the default frequency on your Pi. What Raspberry Pi do you have?
Check the output of this command: cat /proc/cpuinfo
Then you can match the revision number with this page: https://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/


#144

Well, looks like that 800MHz line needs to stay commented:

pi@pi_3:~ $ sudo inxi
CPU~Quad core ARMv7 rev 4 (v7l) (-MCP-) speed~1200 MHz Kernel~4.14.71-v7+ armv7l Up~11 min Mem~83.6/927.2MB HDD~NA(-) Procs~108 Client~Shell inxi~2.3.5

pi@pi_3:~ $ lscpu
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Model: 4
Model name: ARMv7 Processor rev 4 (v7l)
CPU max MHz: 1200.0000
CPU min MHz: 1200.0000
BogoMIPS: 38.40
Flags: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32


#145

That 800 MHz is a recommendation by prog so that your RPi does not get too hot when force_turbo is on.
Paste your rc.local and i’ll modify it so you can check a file for lost samples :wink:

(replacing the current & with

 &> /tmp/airspy.log &

should do the trick)


#146

After noting so much activity on this thread, I decided to purchase AirSpy Mini. Went to AirSpy website to place order. Found price $99. Lost interest and did not place the order.


#147

See below my rc.local

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
sudo nice --10 /home/pi/airspy/airspy_adsb -c 127.0.0.1:30104:BEAST -g 21 -p -x -m20 /tmp/airspy.log &
exit 0

LE: Airspy.log is empty, after a few minutes.


#148

I would not buy the airspy mini either. I see no big advantage over the Nooelec NESDR with the high quality TCXO. But I have the R2 and I am happy with it. Of course an Airspy R2 is not eight times better as you would expect from it’s price but it is probably the best SDR you can get for this application. This is Gossen’s first law. So if you have no choice because your budget is limited be happy to have almost as good reception.


#149

I have bought it because… I can. I have 4 other SDR dongles around, but always wandered if there is something better.
I needed one that won’t make me worried that I am missing something, even if that something was like 15%.
Now, only if I would get the power to list the two FA dongles (have a yellow and a blue one) on eBay and recoup some of the money…


#150

You didn’t quite get it right, the end of the line should look like this:

-m20 -v &>/tmp/airspy.log &

Note the -v and &> before the file name :slight_smile:


#151

Thanks, changed that. Log is still empty. Should it be something there?


#152

Well, there also are the radarcape and the mode-s beast, or the AirNav RadarBox XRange - ADS-B Receiver, all dedicated to adsb, they are probably even better…


#153

Yes there should. Did you add the -v as well?

It should at least log that it’s starting up and which sample rate it is using, also network connections.


#154

Still empty:
sudo nice --10 /home/pi/airspy/airspy_adsb -c 127.0.0.1:30104:BEAST -g 21 -p -x -m20 -v &>/tmp/airspy.log &


#155

Tried exactly this command line in a script, it works fine.
You did a reboot as you need to do that i assume?

Did you change your setup in regards to how you start it or anything else?

Oh i think i get it. this script is executed with sh a different shell from bash -.-
Both are shells but some syntax apparently doesn’t work in the older/simpler shell.

Corrected version that should work:

sudo nice --10 /home/pi/airspy/airspy_adsb -c 127.0.0.1:30104:BEAST -g 21 -p -x -m20 -v 2>&1 >/tmp/airspy.log &

Sorry for that.


#156

Mode-S Beast (used also inside Radarcape) uses 8 bit ADC (MAX1192).
Airspy mini uses 12bit ADC @ 20 MSPS (10.4 ENOB, 70dB SNR, 95dB SFDR) inside an ARM CPU:


#157

sudo nice --10 /home/pi/airspy/airspy_adsb -c 127.0.0.1:30104:BEAST -g 21 -p -x -m20 -v 2>&1 >/tmp/airspy.log &

That command is still not showing anything in the log.


#158

After some googling for some reason i might understand reading more about it … it appears switching the two redirections makes it work. I have now tested it locally using /bin/sh:

sudo nice --10 /home/pi/airspy/airspy_adsb -c 127.0.0.1:30104:BEAST -g 21 -p -x -m20 -v >/tmp/airspy.log 2>&1 &

-m20 -v >/tmp/airspy.log 2>&1 &

Edit: of course the redirections are processed from right to left, just like in other programming languages basically. Oh well. Hope i remember it.


#159

That worked. LOTS of lost samples with -m 20.

Deleted that switch (and so reverting to default 12) and… no more lost samples. I’m at 850-870 msg/s (don’t know if matters).


#160

Interesting. Thought it would work with maybe 1000 or 1100 messages (For me it also lost significantly less or no messages at a given message rate when i switched bit packing off, at least that was my impression)
On the 3B+ it seems up until 1600 msg/s seems fine. Above that i probably need an extra 50 MHz so 1450 as frequency instead of 1400 :slight_smile:
Anyway i’m quite sure some changes to airspy_adsb might significantly reduce the required CPU or rather distribute it better.

Also that -x flag produced bogus messages somehow. Literally 6000 instead of 600 tracks per hour in the graphs.
Also if you are a sucker for fr24 stats … suddenly 3500 instead of 2200 planes really strange.
FA seems to ignore those messages better i think.