FlightAware Discussions

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


Airspy Bounty: Anyone interested in automating all these findings in a single installation script with the right defaults depending on the detected hardware and PiAware installation?
I can offer an Airspy R2, Airspy Mini and a Airspy HF+. All useful for avgeeks/spotters to monitor the Mode S and ATC communications.
I believe this will help the community a lot.


i would be interested, and suspect many others would be as well. a simple installation using an RPI would be much appreciated


hello prog, i re-read your post. seems i misunderstood. i can’t offer any programming help but do believe that if you had truly plug and play installation scripts you could sell a lot more of your product to FA (and other tracking site) contributors. i just purchased one of your airspy mini’s and will work with Wiedehopf (per some of the above posts) to implement


You can be the guinea pig for an installation script that only works on the piaware sd-card image.
I’ll have one whipped up before your airspy mini is delivered.

Putting the stuff in the first and second post into a script isn’t that hard :stuck_out_tongue_winking_eye:

(the script is gonna be for piaware sd-card images only at first, but that’s what you are gonna use anyway)


well done! (and some more characters to get to 20)


Thanks a lot! My email address youssef at airspy dot.com. Please drop me a line.


Sure, will do.

I’m curious, why did you call the sample rate “MLAT frequency” on the command line?

Also, what exactly does bit packing do and is it ever a bad thing?


When I saw your name, the word “ADSB#” flashed in my memory. Are you the one who wrote ADSB#?


The ASAVR output format can send either 20 MHz or 12 MHz MLat according to that switch.

Bit packing tells the hardware to pack every 2 x 12bit samples into 3 bytes instead of sending every samples as a 16bit integer. This saves 25% of the USB bandwidth, but leaves less headroom in the MCU for synchronizing the USB with the ADC. In general, it helps with some old computers or SBCs.


Yes, among other things.


I will love to know names of other softwares you wrote. Glad to have you in this forum.


But it also controls the sample rate correct?

So -m 20 can give slightly more messages because the oversampling is doing more work, is that accurate? The name is really confusing :slight_smile:


Thank you. You have the list of the public software at https://airspy.com/download


I’ve completed an initial version of the script you requested.
It should work on piaware sd-card installed as well as package addon installs with dump1090-fa.

wget -O install.sh https://raw.githubusercontent.com/wiedehopf/airspy-conf/master/install.sh
sudo bash install.sh

Does that seem simple enough?

There is also an uninstall.sh to restore the changed piaware-config settings to their defaults and restore the dump1090-fa config file to its state before the install script was run.
It also disables the airspy service so it doesn’t try to run anymore.
The additional service and config file for airspy_adsb as well as the binary are left in place but they don’t waste much space anyway.

Edit: Please check the first post of this thread on how to use these scripts.


The switch sets the sample rate of the ADC in the device to 12 or 20 MSPS, then configures the timing and the DSP filrers of the decoder accordingly. The MLAT frequency is based on the ADC sample rate. When the output is AVRAS, the counter is appended to the frame as-is. When using Beast format, if the MLAT is 20 MHz (20 MSPS at the ADC), it is converted to 12 MHz by a simple multiplication by 12 / 20.

The “oversampling” factor when using -m 12 is x6, and when using -m 20 it is x10 compared to the baseline of 2 MHz required to decode the mode-s frames at 1 Mbps in PPM.
More oversampling is better because 20 MSPS gives a better timing resolution and can detect weaker signals at the edge of the noise floor. It is useful when detecting overlapping signal peaks that will just show up as “valleys” with a lower timing resolution.


Brilliant! That was quick :slight_smile: How about a one liner:

sudo bash -c "$(wget -O - https://raw.githubusercontent.com/wiedehopf/airspy-conf/master/install.sh)"


It needs braces and quotation marks.

To be honest i like my 2liner better :wink:
If you really want to you can look at the script to see what it does before you execute it.
Anyway people who want to look at it will do that anyway i suppose.


Note that this script just overwrite /etc/default/dump1090-fa and configures piaware.
If it is a piaware sd-card install that works because piaware in that case will overwrite /etc/default/dump1090-fa anyway.
And changing piaware-config on a non-sd-card install actually changes nothing because it already looks for port 30005 on localhost.

So it doesn’t really check what is installed but the configuration i chose just works in both cases :slight_smile:


A install script is better than nothing. But I would prefer a “complete” debian package:

  1. Include airspy_adsb into Github airspy.
  2. Include the airspy_adsb.service file there
  3. All the user would have to to is $ sudo apt-get airspy, then check /etc/default/airspy_adsb and eventually enable sudo systemctl enable airspy_adsb
  4. if there is an update everything would work automatically. Manually downloading code by wget is cumersome because there is no update mechanism.


So you mean AVRAS is better than BEAST? How would the airspy_adsb command parameters look like? I quickly tried to switch from BEAST to AVARS but it failed. With a powerful computer, we could try to run MLAT natively at 20 MSPS or even faster…


It’s not better, it is just a different format.

piaware and fr24feed MLAT both only support 12 MHz MLAT via beast.

Due to the oversampling you are still providing very precise timing information compared to some other feeders.

While i agree that a package is nice, it could not include configuration for piaware/dump1090-fa like the script that was requested.

Also if the package is not in debian mainline you need to setup a webserver to provide the debian packages, best sign them as well. It is quite the hassle.

I’d say this is quite a good compromise, the airspy_adsb binary is pretty stable by now i think and rarely gets new updates that you NEED to have.