-
Notifications
You must be signed in to change notification settings - Fork 0
5. AIS
AIS stands for Automatic Identification System and is a technology similar to ADS-B, but used for ships. If you follow the steps in this chapter of the tutorial you will be able to receive AIS data and feed it to the big map.
You need to change the id / serial number of the SDR stick you want to use for AIS, to distinguish it reliably from other rtl-sdr sticks. You do not want to mix it up after a reboot, it will result in not working AIS.
Plug your AIS stick in a PC with no other RTL-SDR dongle connected. This can be your Raspberry Pi or every other linux computer with the rtl-sdr library installed.
Set the new serial with
sudo rtl_eeprom -s 20000001
You need to reconnect your stick or reboot your system sto access your stick with the new serial number 20000001. Beware that smaller numbers like 2 do not work.
If you didn't already, add our package repository first, as shown in the Install Chapter
sudo apt install ais-catcher
$ AIS-catcher -d 20000001
Device selected: Realtek, RTL2838UHIDIR, SN: 20000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Allocating 15 zero-copy buffers
!AIVDM,1,1,,A,339L0eU0010fOHbO76Cp;1ti0000,0*3B ( MSG: 3, REPEAT: 0, MMSI: 211222710)
!AIVDM,1,1,,A,139fw`P001PfOjNO7:mtur4j0<1I,0*26 ( MSG: 1, REPEAT: 0, MMSI: 211533730)
!AIVDM,1,1,,A,13=r2R000:PfKVlO6rw443Dh0<<C,0*56 ( MSG: 1, REPEAT: 0, MMSI: 215909000)
!AIVDM indicates, that you are getting real messages from at least one ship
Copy the config file template to the right place
sudo cp /etc/ais-catcher.d/rtlsdr.conf.example /etc/ais-catcher.d/20000001.conf
Fill in the credentials for your station with
sudo nano /etc/ais-catcher.d/20000001.conf
[...]
"http": [{
"active": true,
"url": "https://ais.feed.sdrmap.org/",
"userpwd": "YOURSTATION:THEPASSWORDWESENTYOU",
"interval": 1,
"gzip": true,
"response": false
},
[...]
To make AIS-catcher start with your station, we register it as a systemd service like this
sudo systemctl start ais-catcher@20000001.service
sudo systemctl enable ais-catcher@20000001.service
Thats it!