Facebook Group: Military Air & Space Communications.
2700+ members, logs, how too's & more. Please click the link and join.
Raspberry Pi / RTL Dongle Mode-S Sharing System
I have created to custom software that will allow you to share military mode-s data with others. All you need is a Raspberry Pi
computer and an RTL-SDR Dongle that will receive 1090 MHz. Here is the RTL-SDR Dongle that I've been using with great success.
The data you will be sharing can be seen on the Live Military Aircraft Mode-S Logger, check it out!
Comparing MilAirComms Mode-S Data Sharing verses other Mode-S Data Sharing Systems
Other Sharing Sites
Decodes Mode-S Hex into Aircraft Type/User/Home Base
Displays City / State of Aircraft's Home Base
Real-Time Graph Updates of Altitude & Signal Strength
Print Daily Logs in Plan Text Format
Some, but delayed
Choose What Area to See Mode-S Data
Text Msg to Your Phone When You See New Military Flight
Interfaces with Virtual Radar Servers Map
Benifits of the MilAirComms Mode-S System & How it Can Help You:
- See Graph of Real-Time Altitude of Any Aircraft Your Receiving.
From this you can tell if he just took off, or is about to land at an airport near you. With that information you can
determine what frequencies he might be using. If you're near the coast, the altitude can clue you in on SAR (Search And Rescue) missions.
- See Graph of Real-Time Signal Strength of the 1090 MHz Mode-S Signal.
This can help you determine how your antenna is doing. It will also help in determining if the aircraft is getting closer or going away
- You Can Print Out Logs of What Aircraft Your Mode-S System has Received.
- The MilAirComms Mode-S System is a Stand-Alone-Computer. It Won't Tie Up Your Computer.
- The MilAirComms Mode-S System Connects via WiFi and uses 99% Less Bandwidth then Other Systems.
To make this setup as easy as possible I've included a "shell script" program on my website which you will download and it will take care of
setting up your Raspberry / Dongle to start sending live Mode-S Military data to the
Live Military Aircraft Mode-S Logger
To Setup Your Raspberry / RTL Dongle to Share Military Mode-S Data
STEP 1: Installing an Operating System & Networking, If you already have an operating system installed, skip to Step 2
If you're new to Raspberry Pi computers and don't have a Raspberry setup with an operating system and wifi you need to do the setup steps
found here: Raspberry Pi - Getting It Ready for Neat Scanner Projects.. While doing the steps
in that article, you can skip its step called: Making Your Raspberry Pi and Dongle Talk to Each Other because the
MilAirComms1090 install program will take care of that step. But you do need an operating system and be able to
communicate with your Raspberry Pi from your local network.
STEP 2: Downloading the MilAirComms1090 Install Program
At this time the Raspberry Pi version of MilAirComms1090 is no longer available
please use the Windows version. More info can be found here: (Windows / VRS) How You can Be a Mode-S Contributing Ground Station
STEP 3: Running the MilAirComms1090 Install Program
Next type sudo chmod 755 milaircomms1090_install.sh This changes the file permissions to allow you to run this file.
Its time to actually install the MilAirComms1090 software. Type ./milaircomms1090_install.sh Depending on how up-to-date your Raspberry Pi and operating system are the
install process can take a bit of time. There are a couple times the install will stop waiting for your input.
Each time it asks, enter Y You may see some warning messages, these can be disregarded as it will not effect
STEP 4: Setting Up Your Mode-S Account on MilAirComms.com
If you don't already have a FREE members account on MilAirComms.com you'll need to set one up. Its fast, easy and
FREE to do so. You can set up your new account from the Members Only page.
STEP 5: Emails / Text Message Notices of Mode-S Military Aircraft in Your Area
- If you're not interested in receiving text messages leave Text Email Address blank and skip to STEP 6.
If you would like to receive a text message on your cellphone any time your Mode-S system receives a new military aircraft you can do so
by entering the email address used to send text messages to your phone. Example, if you're with AT&T the email address
would be firstname.lastname@example.org where the numbers are your cell phone number. If you're with a carrier other than AT&T you'll can usually find
out from their webpage what email address to use.
Caution, if you live where there will be a lot of military Mode-S traffic you might not want to use this option. If you do not
have unlimited texting on your cellphone plan it could get costly. Also you might get text messages anytime day or night, at this time there
is not an option for setting up time for getting text messages (there will be in the near future). I use it and like it, on an average
day it might generate 30 text messages. If you do not want these text messages leave the "Text Email Address" field blank.
You can change this at anytime by going to Members Only, then clicking on Edit Your Account Info.
STEP 6: Setting Up User_Data.txt File on Raspberry Pi
Type cd /home/pi/milaircomms1090
Type sudo nano user_data.txt
The first line says ReceiverZipcode = "xxxxx". Using the arrow keys (the mouse doesn't work with this editor) replace the x's with
your zipcode. Do not delete the quote signs!
The next line says UserID = "xxxxx". You're user ID is a 5-digit number which you can retrieve from the Members Only page. Click on
Members Only, then click on Edit Your Account Info. Scroll to the bottom and take note of Your User Number (used for Mode-S sharing).
This is the number you'll replace the UserID x's with. Again, do not delete the quote signs.
When you've made the two above changes to this file hit your ctrl and x key. You'll be asked about saving, hit Y, it will confirm the
file name, just it the enter key.
STEP 7: Reboot Raspberry and Confirm RTL Dongle and Raspberry are Talking to Each Other
We need to reboot the Raspberry Pi. Type sudo reboot When the Raspberry as rebooted log back into the Raspberry.
Once logged in type rtl_test -t.
If your Raspberry is able to communicate with your dongle you should see something like this:
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.
Don't worry about the No E4000 tuner found, aborting statment. If you're running a dongle
for Mode-S it is not using the E4000 tuner, its running the R820 tuner which was found.
STEP 8: Starting MilAirComms1090
You will want to go to the /milaircomms1090 directory, to do this type cd /home/pi/milaircomms1090.
To start the MilAirComms1090 software type ./start_milaircomms1090.sh
STEP 9: Messages You See on Screen
When you first start milaircomms1090 software you will see some messages. The first few messages
are MilAircomms1090 copying the newest Military Hexcode Database from the MilAirComms.com website. This happens
everytime you start or restart the MilAirComms1090 softare assuring that you have the most current database.
The next few messages involve initializing the RTL-SDR Dongle, setting the frequency, gain and sample rate.
Next you're going to see a message that says Heartbeat Seconds = xxxxxxxxxx. At startup, and every 2 minutes
MilAirComms1090 sends a "heartbeat signal" to the MilAirComms.com website. This lets the website know that you're device
is online and ready to supply data. If MilAirComms.com successfully received the "heartbeat signal", you should see
the status of your location go online AND the very next message you see should be HEARTBEAT RECEIVED For xxxxx
(xxxxx is your user id number), this message is being sent to you by MilAirComms.com letting your Raspberry Pi know
everything is functioning correctly.
At this point you should go to the Live Military Aircraft Mode-S Logger page
then click on "Status of Ground Receiving Stations". You should see a station with your User ID# and Location being
displayed in the "Status of Mode-S Receiving Stations" table.
Next you're going to see a lot of messages with the date/time, a hex number, and "not military". These are civil Mode-S
messages your RTL Dongle is receiving. These are not sent to the MilAirComms.com site as we only are looking for
Military aircraft. Once your system receives a Mode-S message from a Military aircraft you'll see a simular message however
it will be white letters on a red background and say xxxxxx IS MILITARY. Once you see one of these messages you should
see that aircraft being updated on the Live Military Aircraft Mode-S Logger page.
STEP 10: If You Want the MilAirComms1090 Software To Run Automatically at Boot Up (not required)
If you want the Mode-S software to run anytime you boot up the Raspberry Pi computer these are the steps you'll want to do.
While its not required, it is nice to know if you have a power failure the system will automatically start once you get power,
or if you have a system problem you simply just power off, then power on your Raspberry.
Type cd /etc
Next type sudo nano rc.local
Using the down arrow key (your mouse will not work in this editor) go down and just above the
"exit 0" line add the following line /etc/./boot_milaircomms1090.sh There are no
spaces in that line.
When you've made the above change to this file hit your ctrl and x key. You'll be asked about saving, hit Y, it will confirm the
file name, just it the enter key.
Now anytime the Raspberry Pi reboots, the milaircomms1090 software will start automatically. After you reboot you can confirm the milaircomms1090
software is running by typing top. Top is a program that will show all the running tasks, you should see as the top task
"milaircomms1090". To exit out of top hit the ctrl c a few times until you're back to the linux prompt.
STEP 11: If You Want to Send Data to Virtual Radar Server (all data, not just Military) (not required)
With Virtual Radar Server it will map and log all mode-s messages you recieve, both military and civil. MilAirComms1090 is setup to allow access via port #30006.
While MilAirComms1090 has only been test with Virtual Radar Server, its possible it will work with other programs as long
as the other program can be configured for port 30006 and accept "RAW" data.
Here you can read more and download Virtual Radar Server.
Once you have Virtual Radar Server (VRS) installed on your PC start VRS, click on Options, then
Receiver Locations. You will see a button to create a New receiver location. On this screen
you should enter the Latitude and Longitude of your receiver. For the Location enter "Home".
Next go back to options, then click on
Data Sources, next click on Receivers. You will now see a button to create a New receiver.
Here are the important settings you need to make sure are set.
- Enabled = Yes
- Name = Anything you want, I use "RaPi 8 Bay" since its my 8 Bay antenna.
- Receiver location = Home
- Data source = AVR or BEAST Raw Feed
- Connection type = Network
- Reconnect at startup = Yes
- Address = 192.168.1.204 <--- Use the IP address of your Raspberry's Wifi Connection
- Port = 30006
In the lower left side of the window you'll see a button Test Connection. When you click on it you should see a
pop-up window saying "A connection can be made with these settings". Exit out of the Option window. Now you should see an area
called "Feed Status" in the middle of the screen. If everything is working you should see the name you gave to your receiver,
Connection Status should say connected and Total Messages should be counting up. These are each "DF" (Download Format)
messages being received from aircraft. Remember, your Raspberry Pi must be up and running the MilAirComms1090 software
for this to work.
To see aircraft on the map and see data click on the http://127.0.0.1.... link you see just above the Feed Status box.
If you need more help with VRS please visit the Virtual Radar Server website.
As a side note, when you're looking at the VRS map screen, the map will only display aircraft that are transmitting their
Lat/Long, not all aircraft do and I've never seen a military aircraft transmit their Lat/Long. In the table on the right side
you will see ALL aircraft that mode-s messages are being received for regardless if they're transmitting their Lat/Long.
I hope you've enjoyed this article.