Skip to content

Commit

Permalink
Broken code & added socat
Browse files Browse the repository at this point in the history
Fixed $RECEIVERPORT wrongness unless you are changing local dump1090 port on launch -  localhost:30005 must be used as input
All feeders are broken with current code.
Changed netcat to socat -u
  • Loading branch information
adsb-related-code committed Mar 13, 2018
1 parent 67be2f4 commit 68aa68e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setup.sh
Expand Up @@ -125,8 +125,8 @@ fi
echo 22
sleep 0.25

if [ $(dpkg-query -W -f='${STATUS}' netcat 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
sudo apt-get install -y netcat >> $LOGFILE 2>&1
if [ $(dpkg-query -W -f='${STATUS}' socat 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
sudo apt-get install -y socat >> $LOGFILE 2>&1
fi

echo 28
Expand Down Expand Up @@ -172,7 +172,7 @@ fi
while true
do
sleep 30
/usr/bin/mlat-client --input-type dump1090 --input-connect localhost:$RECEIVERPORT --lat $RECEIVERLATITUDE --lon $RECEIVERLONGITUDE --alt $RECEIVERALTITUDE --user $ADSBEXCHANGEUSERNAME --server feed.adsbexchange.com:31090 --no-udp --results beast,connect,localhost:30104
/usr/bin/mlat-client --input-type dump1090 --input-connect localhost:30005 --lat $RECEIVERLATITUDE --lon $RECEIVERLONGITUDE --alt $RECEIVERALTITUDE --user $ADSBEXCHANGEUSERNAME --server feed.adsbexchange.com:31090 --no-udp --results beast,connect,localhost:30104
done
EOF

Expand Down Expand Up @@ -223,7 +223,7 @@ EOF
while true
do
sleep 30
/bin/nc 127.0.0.1 $RECEIVERPORT | /bin/nc feed.adsbexchange.com $RECEIVERPORT
/usr/bin/socat -u TCP:localhost:30005 TCP:feed.adsbexchange.com:$RECEIVERPORT
done
EOF

Expand Down

0 comments on commit 68aa68e

Please sign in to comment.