Announcement

Collapse
No announcement yet.

How to get the GNS 5890 ADS-B Receiver & Raspberry Pi working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get the GNS 5890 ADS-B Receiver & Raspberry Pi working

    Hello Flightradar24 community,
    Today i will show you how to get the GNS 5890 ADS-B Receiver running under Linux/Raspberry Pi. I had several problems doing this, so i get in touch with Roman (Developer of Adsbox) and finally we got it up and running. This tutorial should help all people to operate a cheap 24/7 feeding station for Flightradar24 without a computer and the GNS 5890 without much work. Thanks again for your great support, Roman! Sorry for my bad English, but it's not my native language. Now let's go!

    Operating System for Raspberry Pi
    I use Raspian. Don't know if other versions are working. You can download the latest Raspian image at the official website of Raspberry Pi.

    Modification for the GNS 5890
    To get the GNS 5890 up and running was the most difficult part. We needed special commands to get this done, but after several days, Roman and i worked it out. In order to get the GNS 5890 running with Adsbox we must "mount" the usb-receiver with special commands. Because we won't do this after every reboot, we are making this changes directly in the rc.local file. Connect to your Raspberry Pi via SSH. Enter this command:

    Code:
    sudo nano /etc/rc.local
    Paste the following commands in front / before exit0. This is important!

    Code:
    modprobe usbserial vendor=0x04D8 product=0xF8E8
    echo '#43-02' > /dev/ttyUSB0
    First command is some kind of "mounting" for the usb-stick. Second is important to get the squawk codes working in Adsbox. Finished? Perfect! Press CTRL + X and type yes and press enter.

    Now reboot your Raspberry Pi with this command:

    Code:
    sudo reboot
    Adsbox
    The current public version of Adsbox doesn't sent output with time-stamps, this is a huge problem for the current Flightradar24 feeder. But, no problem. A new version is available. You can download the current developer-version of the software which does have this feature!

    Installing Adsbox
    Login to your Raspberry Pi (SSH). First we download the current developer-version of Adsbox. Make sure you are in your home-folder. Mine is called /home/pi/. Type in this command:

    Code:
    wget https://dl.dropboxusercontent.com/u/84483/adsbox.zip
    Then:

    Code:
    unzip adsbox.zip
    After this jump into the extracted folder with this command:

    Code:
    cd adsbox
    Now type in this command:

    Code:
    make
    After several minutes, everything should be done.

    Installing Flightradar24 Linux feeder
    Now we need to install the current version of the Flightradar24 Linux feeder for our Raspberry Pi. First we are going back to our "home" folder. Type in this command:

    Code:
    cd
    Now type in this command:

    Code:
    wget https://dl.dropbox.com/u/66906/fr24feed_arm-le_241s.tgz
    Then:

    Code:
    tar -xvzf fr24feed_arm-le_241s.tgz
    Create startup script
    Now we are creating this startup script, so everything is starting automatically when our Raspberry Pi is rebooting. Modified version of peterhrs script. Thank you!

    Open up your text editor of choice and paste this code:

    Code:
    #!/bin/bash
    ### BEGIN INIT INFO
    # Provides: fr24
    # Required-Start: $remote_fs $syslog $time 
    # Required-Stop: $remote_fs $syslog $time 
    # Should-Start: $network
    # Should-Stop: $network
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Start Adsbox and Flightradar24 feeder at boot time 
    ### END INIT INFO 
    
    #
    #make sure fr24feeder and adsbox software are not running
    # 
    
    killall fr24feed_arm-le_241s
    killall adsbox
    
    # 
    #start adsbox (change your latitude and longitude)
    #
    
    cd adsbox
    ./adsbox -s /dev/ttyUSB0 --baud 115200 -d --lat your.latitude --lon your.longitude 
    
    & 
    
    cd 
    
    # 
    #start the fr24 feeder (use you own key) 
    # 
    
    ./fr24feed_arm-le_241s --fr24key=01234567890abcdef > fr24feed.log &
    Save it as fr24.sh and upload it to the root folder of your home-folder. Mine is called /home/pi/. Use any FTP client for this action if you are not a linux champ like me. For example use Filezilla to connect to your Raspberry Pi. Important: Don't use FTP, you must use SFTP as connection method! Then enter your Raspberry Pi ip-adress, username and password. Make sure you are connecting to port 22.

    After the upload is finished, enter this command (SSH terminal):

    Code:
    chmod +x fr24.sh
    Now we need to create a cronjob. Enter this command:

    Code:
    crontab -e
    Go to the end of the code and paste this into it:

    Code:
    @reboot sleep 10;/home/pi/fr24.sh 
    0 */8 * * * /home/pi/fr24.sh
    After you have done this, press CTRL + X und type yes and press enter.

    Now we need to reboot the Raspberry Pi again. Enter this command:

    Code:
    sudo reboot
    Wait some minutes and check if everything is working fine! To do this open your browser and enter http://your-raspberry-pi-ip-adress:8080. If you now see a webpage with some planes, everything is working fine! Now login into your account at Flightradar24. Use this URL: https://premium.flightradar24.com/premium/. Enter your username and password. Now your radar should be "ONLINE" and "last upload" should be updating every minute (if there are any planes)!

    Congratulation! Your Raspberry Pi and GNS 5890 USB ADS-B Receiver are now working as 24/7 feeding-station for Flightradar24.

    Hope this helps! If you have any questions post it in this thread.
    Last edited by Toranto; 2014-03-22, 14:11. Reason: Some changes

  • #2
    Nice!

    If someone is willing to expose the http://your-raspberry-pi-ip-adress:8080 to the internet - could they put the external url for it in their sig, so we can all have a look

    Comment


    • #3
      Originally posted by peterhr View Post
      Nice!

      If someone is willing to expose the http://your-raspberry-pi-ip-adress:8080 to the internet - could they put the external url for it in their sig, so we can all have a look
      Thank you!

      Yeah, great idea! I have a managed router, so this is a problem for my setup. Can't open ports without my ISP

      Comment

      Working...
      X