How to change port for compatible work with NKN!

If install is Raspbian Image with Package Install of dump1090-fa and piaware

1 - Change port numbers of dump1090-fa

1.1 - Edit file /etc/default/dump1090-fa

sudo nano /etc/default/dump1090-fa   
# dump1090-fa configuration
# This is sourced by /usr/share/dump1090-fa/start-dump1090-fa as a
# shellscript fragment.

# If you are using a PiAware sdcard image, this config file is regenerated
# on boot based on the contents of piaware-config.txt; any changes made to this
# file will be lost.

# dump1090-fa won't automatically start unless ENABLED=yes
ENABLED=yes

RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0"
DECODER_OPTIONS="--max-range 360 --fix"
NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1300 --net-ro-interval 0.2 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005"
JSON_OPTIONS="--json-location-accuracy 1"

1.2 - In above file, in the line starting with NET_OPTIONS, make following changes:

change 30002 to 31002
change 30003 to 31003
change 30004 to 31004
change 30005 to 31005

Save (Ctrl+O) and close (Ctrl+) file

1.3 - Restart dump1090-fa

sudo systemctl restart dump1090-fa

 

2 - Change port numbers of piaware

2.1 - Issue piaware-config commands as follows

sudo piaware-config receiver-type other
sudo piaware-config receiver-port 31005
sudo piaware-config receiver-host 127.0.0.1

2.2 - Restart Piaware

sudo systemctl restart piaware

3 - Check status

sudo systemctl status piaware   

should give output like this

Nov 28 22:32:09 ubuntu20 piaware[66394]: Starting multilateration client: /usr/lib/piaware/helpers/fa-mlat-client --input-connect 127.0.0.1:31005 --input-type aut>
Nov 28 22:32:09 ubuntu20 piaware[66394]: mlat-client(66425): fa-mlat-client 0.2.11 starting up
Nov 28 22:32:09 ubuntu20 piaware[66394]: mlat-client(66425): Using UDP transport to 70.42.6.228 port 15658
Nov 28 22:32:09 ubuntu20 piaware[66394]: mlat-client(66425): Listening for Beast-format results connection on port 30105
Nov 28 22:32:09 ubuntu20 piaware[66394]: mlat-client(66425): Listening for Extended Basestation-format results connection on port 30106
Nov 28 22:32:09 ubuntu20 piaware[66394]: mlat-client(66425): Route MTU changed to 1500
Nov 28 22:32:09 ubuntu20 piaware[66394]: mlat-client(66425): Input connected to 127.0.0.1:31005
Nov 28 22:32:10 ubuntu20 piaware[66394]: mlat-client(66425): Detected BEAST format input
Nov 28 22:32:10 ubuntu20 piaware[66394]: mlat-client(66425): Input format changed to BEAST, 12MHz clock
Nov 28 22:32:10 ubuntu20 piaware[66394]: mlat-client(66425): Beast-format results connection with 127.0.0.1:30104: connection established

 

3 - To Revert to Package Install’s Normal Config

3.1 dump1090-fa:

Edit file /etc/default/dump1090-fa and reverse the port number changes made in step 1.1

3.2 piaware:

Issue following commands

pi@piaware:~ $ sudo piaware-config receiver-type rtlsdr   
pi@piaware:~ $ sudo piaware-config receiver-port ""   
pi@piaware:~ $ sudo piaware-config receiver-host ""     

3.3 - Reboot Pi

sudo reboot   
3 Likes