tsunghanliu / adsb-box.snap

a snap to build a ADS-B receiver station
29 stars 4 forks source link

how to enable UAT/dump978? #15

Closed dlasher closed 3 years ago

dlasher commented 5 years ago

Appears most of the programs are installed to support it, quick guidelines on how to enable dump978, assuming another RTL-SDR stick is already plugged in, cabled, and ready to go?

tsunghanliu commented 5 years ago

To support the UAT, I think that the works will be:

I may not have enough time to implement this feature in the near future and I'm not able to verify it because UAT isn't used in my country. Besides US, any other country is using UAT?

dlasher commented 5 years ago

Agree with the outline, makes sense.

I have it running on the previous feeder box I was using, it's fairly simple, the complicated part is how to bring the data into your existing setup, either as a separate map/feed or integrated.

From what I can see, dump1090-fa has support for dump978, just not on the same process, which would be ideal given the work you've already done. Hard to really tell, since the same docs refer to installing dump978-fa.

notes: https://flightaware.com/adsb/piaware/install https://flightaware.com/adsb/piaware/advanced_configuration#uatsteps https://github.com/flightaware/dump978 https://github.com/mutability/dump978

https://www.adsbexchange.com/how-to-feed/adding-978-mhz-ads-b-capability-to-your-pipi2/ ^^ the method I'm using right now

Love what you've done using snaps so far, hoping we can keep adding features.. ACARS anyone? :)

https://www.sysrun.io/2015/11/16/rpi-docker-acars-receive-aircraft-sms/

tsunghanliu commented 5 years ago

Thanks for the information.

It's not that difficult thing. I'll find some time slots to plan and implement the UAT support.

dlasher commented 4 years ago

It may be easier than we think - I grabbed the 978 stuff from the flightware report (https://github.com/flightaware/dump978) and it compiles and installs cleanly. If you could get it into an Edge snap, I'll test/configure it, and let you know what it took to make it work.

dlasher commented 4 years ago

Especially right now, with the world in an odd state, it would be great to see a few more flights.. any chance we'll get this?

https://discussions.flightaware.com/t/how-to-add-on-978-mhz-dump978-fa-etc-with-buster-and-piaware-3-8/59737/13

tsunghanliu commented 4 years ago

Hi, The UAT support is on my TO-DO list, but it requires several updates, at least:

I don't have too much progress yet and will let you know if there's a testing or preview version.

dlasher commented 4 years ago

Thanks, that would be great. Love the snap, using it several places. :)

dlasher commented 3 years ago

Any update on this wishlist item? Flightaware5 now includes 978 support

tsunghanliu commented 3 years ago

I don't have too much progress on this. Like you said that Flightaware 5 includes dump978 support, so I will revisit this soon.

dlasher commented 3 years ago

Thanks, looking forward to it.

tsunghanliu commented 3 years ago

Hey @dlasher and folks,

I have a testing version for supporting UAT/dump978. I can only verify that the dump978 is running and new UI showed, but cannot see any UAT traffic because my country doesn't use UAT. That will be great if you could help to test.

Suppose your feeder has or will have two RTL-SDR dongles to collect both ADS-B and UAT signals.

highlight changes

refresh to testing version

# stop adsb-box temporarily
$ sudo snap stop adsb-box 
# backup your current settings and data
$ sudo snap save adsb-box
# refresh
$ sudo snap refresh adsb-box --channel edge/uat978

# here it takes about 8 minutes to migrate the RRD DB of graphs
# please be patient
$ sleep 480

# stop adsb-box temporarily again
$ sudo snap stop adsb-box 

provision dongle

This step is used to program the serial numbers in the EEPROM of dongles. The serial numbers will be provided to dump1090 and dump978 later. It would be easier to provision dongles one by one. If you find that the serial (SN) is not 00000001, you can skip this step.

# run rtl-sdr tools within the snap
$ sudo snap run --shell adsb-box.dump1090
(in-snap)$ cd $SNAP
# list dongles
(in-snap)$ rtl_test -t
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001
  ...
# set serial number to a 8 digit number, eg 10900001 or 09780001
# -d for index, -s for serial
(in-snap)$ rtl_eeprom -d 0 -s 10900001 

# unplug the dongle and plug another one
# re-do rtl_test and rtl_eeprom commands
# remember to use a different serial for the second dongle

(in-snap)$ exit

enable dump978

Replace serials with yours set in the previous step. In this example, dongle 10900001 is for dump1090 and dongle 09780001 is for dump978.

$ sudo snap set adsb-box receiver.dump1090.serial=10900001
$ sudo snap set adsb-box receiver.dump978.serial=09780001
$ sudo adsb-box.piaware-config uat-receiver-type sdr

restart adsb-box

Connect both dongles and their cables and antennas.

$ sudo snap restart adsb-box

verify

Please let me know if you have any questions or suggestions. Thank you.

tsunghanliu commented 3 years ago

arm64 version is still waiting for the Launchpad builder to build. I'll publish it later.

i386 is not supported in Ubuntu 20.04 and Core 20. So, i386 platform will stick on v1.5.x.

dlasher commented 3 years ago

Awesome, thank you!

Walked through the changes, everything "seems" to be working, but no 978 data yet.. will let it run a few hours and see.. I only get a few 978 a day, mostly traffic from the local flight school, so I'll give it time.

Linux pi-adsb 4.15.0-1084-raspi2 #89-Ubuntu SMP PREEMPT Tue Apr 13 12:52:44 UTC 2021 armv7l armv7l armv7l GNU/Linux

I do see 978 processes running:

root 2488 0.0 0.2 4344 2328 ? Ss 09:12 0:00 /bin/bash /snap/adsb-box/428/bin/skyaware978 root 2560 0.1 0.3 45200 2952 ? Sl 09:12 0:00 /snap/adsb-box/428/usr/bin/skyaware978-fa --connect localhost:30978 --reconnect-interval 30 --history-count 120 --history-interval 30 --json-dir /tmp/skyaware978 --lat XX.XXX --lon XX.XXX

Setting receiver type did complain a bit, putting in here in case it's important.

root@pi-adsb:~# adsb-box.piaware-config uat-receiver-type sdr

dlasher commented 3 years ago

I don't see dump978-fa running however, suspect that's why I have no data.

dlasher commented 3 years ago

SoapySDR seems unhappy.

root@pi-adsb:~# snap run --shell adsb-box.dump1090 root@pi-adsb:/root# dump978-fa --sdr driver=rtlsdr,serial=00000978 --raw-port 30978 --json-port 30979
raw-port: listening for connections on 0.0.0.0:30978 raw-port: listening for connections on [::]:30978 json-port: listening for connections on 0.0.0.0:30979 json-port: listening for connections on [::]:30979 Configuration error: No matching SoapySDR device found (cause: SoapySDR::Device::make() no match)

I can open the device and capture, so it's alive and well.

root@pi-adsb:/root# rtl_sdr -d 00000978 -f 978000000 -s 2083334 -g 48 - Found 2 device(s): 0: Realtek, RTL2832U, SN: 00000978 1: Realtek, RTL2832U, SN: 00001090

Using device 0: Generic RTL2832U Found Rafael Micro R820T tuner Exact sample rate is: 2083334.141630 Hz [R82XX] PLL not locked! Sampling at 2083334 S/s. Z+~GԎKՈIZ;|ׂA_L-i/_Y+{{SZO!T45-+U;{+-z+_d t--7O|+IeiY{g+-a#$z@Oc\-dPH+HWaF+N-/a+yAaY-~]-_9L@+++i-\}- :HE}zTK_daE+|a9|++ee6T5ρ>2Z5Xy+++O Tune+D@ain set to 48.00 dB. ȏa

thoughts?

tsunghanliu commented 3 years ago

Thanks @dlasher

I made a mistake in dump978 wrapper. Please refresh to ver v1.5.1-38-g4fdeddf. It should fix the issue of dump978-fa.

tsunghanliu commented 3 years ago

arm64 version is still waiting for the Launchpad builder to build. I'll publish it later.

arm64 version is available now.

dlasher commented 3 years ago

Looking good so far!

root 26389 0.1 0.2 4344 2324 ? Ss 19:34 0:00 /bin/bash /snap/adsb-box/432/bin/dump978 root 26425 51.1 1.1 73228 10864 ? Sl 19:34 0:31 /snap/adsb-box/432/usr/bin/dump978-fa --sdr driver=rtlsdr,serial=00000978 --format CS8 --raw-port localhost:30978 --json-port localhost:30979 root 26605 0.4 0.2 4344 2320 ? Ss 19:34 0:00 /bin/bash /snap/adsb-box/432/bin/skyaware978 root 26691 0.1 0.3 45200 2848 ? Sl 19:34 0:00 /snap/adsb-box/432/usr/bin/skyaware978-fa --connect localhost:30978 --reconnect-interval 30 --history-count 120 --history-interval 30 --json-dir /tmp/skyaware978 --lat X.X --lon X.X root 27065 0.1 0.3 45036 2952 ? Sl 19:34 0:00 /snap/adsb-box/432/usr/lib/piaware/helpers/faup978 --connect localhost:30978

The right services seem to be running, and the performance/graphs exist for 978 now.

Tomorrow when the flight school puts planes up again, I should have some data.

Thanks for the quick turn-around!

dlasher commented 3 years ago

image

We have UAT!

dlasher commented 3 years ago

And I'm tracking planes that are ONLY on 978 and not 1080.. The way I read the US requirements for 2020, all planes had to be announcing on 1080. interesting.

image

EDIT: I was wrong - 978UAT is legal still in the US, vs 1080ES

https://cincinnatiavionics.com/ads-b-out-difference-1090-978/


24hrs : 1,382 UAT positions reported, 28 aircraft!

tsunghanliu commented 3 years ago

I've uploaded the code and released a version to the edge channel. I'll promote it to candidate few days later

Note: i386 platform will not get this update because some packages are not available on Ubuntu 16.04.