En una entrada anterior se ha descrito el sistema AIS (Automatic Identification System) de localización de embarcaciones, ahora vamos a proceder a instalar y configurar un receptor AIS en una Raspberry pi con un SDR USB de la misma forma que hemos hecho previamente con
- radiosonde_auto_rx (Recepción de radiosondas)
- dire wolf (Recepción de APRS en VHF)
La instalación compartirá con las instalaciones anteriores
- Raspberry Pi
- SDR USB
- Antena (aunque no sea especifica para esta frcuencia de VHF 161,975 MHz - Channel 87B y 162,025 MHz - Channel 88B)
El filtro pasabanda de 403 MHz es especifico para radiosondas y por eso no se usará y un filtro de banda suprimida de 88-108 MHz se estudiará usarlo o no pues puede ser conveniente en entornos urbanos con muchas emisoras de radiodifusión de FM.
De ls opciones posibles hemos elegido el software ais-catcher (Se descarta Rtl-ais) por las siguientes razones:
- Es un software mas moderno
- Es open source
- Es Compatible con RTL-SDR.
- Puede decodificar los dos canales AIS (161,975 MHz y 162,025 MHz) al mismo tiempo con un solo pincho SDR USB, y consume pocos recursos CPU/memoria.
- Las señales de los barcos que recibe se convierten a protocolo NMEA que pueden enviarse a sitios web como
Sin embargo, dado las restricciones del sistema que comparte Pi-Star para DMR, radiosonde_auto_rx para radiosondas y direwolf para APRS en VHF se termina instalando rtl-ais por los menores requerimientos que presenta
Lo primero de todo ábrase una sesión con su IA de confianza para estos temas, en mi caso uso actualmente Gemini que le ayudará en el proceso
AIS-CATCHER
Hay dos modulos:
- El básico que recibe las tramas AIS, las convierte en NEMEA y las envia a un servidor como Marine Traffic
- El modulo de visualización en local (Este por el momento no se monta para ahorrar consumo)
Instalación
Hay que conectarse a la Raspberry Pi (en nuestro caso concreto a Pi-Star, si usa una raspberry pi limpia lo tendra todo mas sencillo) y ejecutar:
- rpi-rw
- sudo apt-get update
- sudo apt-get install -y git make gcc g++ librtlsdr-dev libusb-1.0-0-dev libssl-dev
- sudo apt-get install -y cmake
- cd /home/pi-star
- git clone https://github.com/jvde-github/AIS-catcher.git
- cd AIS-catcher
- mkdir build
- cd build
- cmake ..
- sed -i 's/$/ -latomic/' CMakeFiles/AIS-catcher.dir/link.txt
- make -j2
- sudo make install
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/AIS-catcher
- AIS-catcher -L
AIS-catcher (build Apr 17 2026) v0.66-0-g35d6a6da
(C) Copyright 2021-2026 jvde-github and other contributors
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SDR support: RTLSDR RTLTCP SPYSERVER
Other support: SYSLOG SSL ZLIB RTLSDR-BIASTEE RTLSDR-TUNERBW
Prueba de funcionamiento
(C) Copyright 2021-2026 jvde-github and other contributors
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Found Rafael Micro R820T tuner
Allocating 15 zero-copy buffers
Device : RTL2838UHIDIR
Settings : rate 1536K format CU8 tuner 45.000000 rtlagc ON biastee OFF buffer_count 24
Model #0-0 -> (Src: 1, Grp: 1): [AIS engine v0.66] channel AB ps_ema ON afc_wide ON droop ON fp_ds OFF dsk OFF
[AIS engine v0.66 #0-0]received: 0 msgs, total: 0 msgs, rate: 0 msg/s
!AIVDM,1,1,,B,13iSav3000Ov`dBFTEGd;A;P06AH,0*1C ( MSG: 1, REPEAT: 0, MMSI: 253291000, signalpower: -2.19454, ppm: 0.289352, timestamp: 20260417182248)
!AIVDM,1,1,,B,33EieTPP@nwvS8VFTE38E5UP00uh,0*1E ( MSG: 3, REPEAT: 0, MMSI: 224161170, signalpower: -16.9694, ppm: 2.31481, timestamp: 20260417182249)
!AIVDM,1,1,,A,B3P=t>P007w`lS5aBHil7wpUCP06,0*14 ( MSG: 18, REPEAT: 0, MMSI: 235109434, signalpower: -18.3949, ppm: 0.289352, timestamp: 20260417182249)
!AIVDM,1,1,,B,H7WK6EDTCBD8:1JDp1knmn10744t,0*58 ( MSG: 24, REPEAT: 0, MMSI: 511100501, signalpower: -10.5473, ppm: -5.20833, timestamp: 20260417182250)
!AIVDM,1,1,,B,342O`iQ000wvewVFRtIT9AST2DOJ,0*03 ( MSG: 3, REPEAT: 0, MMSI: 271050950, signalpower: -5.51227, ppm: -0.868056, timestamp: 20260417182251)
!AIVDM,1,1,,B,13GQDPPP04wvRbfFTi1=0OwT26AH,0*50 ( MSG: 1, REPEAT: 0, MMSI: 225989762, signalpower: -16.6187, ppm: -2.31481, timestamp: 20260417182251)
[AIS engine v0.66 #0-0] received: 6 msgs, total: 220 msgs, rate: 1.99423 msg/s
- AIS-catcher -v
AIS-catcher (build Apr 19 2026) v0.00-1-unknown
(C) Copyright 2021-2026 jvde-github and other contributors
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
usb_claim_interface error -6
RTLSDR: cannot open device.
COREECTO
AIS-catcher (build Apr 17 2026) v0.66-0-g35d6a6da
(C) Copyright 2021-2026 jvde-github and other contributors
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Found Rafael Micro R820T tuner
Allocating 15 zero-copy buffers
Device : RTL2838UHIDIR
Settings : rate 1536K format CU8 tuner AUTO rtlagc ON biastee OFF buffer_count 24
Model #0-0 -> (Src: 1, Grp: 1): [AIS engine v0.66] channel AB ps_ema ON afc_wide
ON droop ON fp_ds OFF dsk OFF
[AIS engine v0.66 #0-0] received: 0 msgs, total: 0 msgs, rate: 0 msg/s
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Found Rafael Micro R820T tuner
Allocating 15 zero-copy buffers
Device : RTL2838UHIDIR
Settings : rate 1536K format CU8 tuner AUTO rtlagc ON biastee OFF buffer_count 24
Model #0-0 -> (Src: 1, Grp: 1): [AIS engine v0.66] channel AB ps_ema ON afc_wide
ON droop ON fp_ds OFF dsk OFF
[AIS engine v0.66 #0-0] received: 0 msgs, total: 0 msgs, rate: 0 msg/s
Prueba de recepción
- AIS-catcher -v -gr TUNER 45 (SE SALE CON CTRL-C)
(C) Copyright 2021-2026 jvde-github and other contributors
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Found Rafael Micro R820T tuner
Allocating 15 zero-copy buffers
Device : RTL2838UHIDIR
Settings : rate 1536K format CU8 tuner 45.000000 rtlagc ON biastee OFF buffer_count 24
Model #0-0 -> (Src: 1, Grp: 1): [AIS engine v0.66] channel AB ps_ema ON afc_wide ON droop ON fp_ds OFF dsk OFF
[AIS engine v0.66 #0-0]received: 0 msgs, total: 0 msgs, rate: 0 msg/s
!AIVDM,1,1,,B,13iSav3000Ov`dBFTEGd;A;P06AH,0*1C ( MSG: 1, REPEAT: 0, MMSI: 253291000, signalpower: -2.19454, ppm: 0.289352, timestamp: 20260417182248)
!AIVDM,1,1,,B,33EieTPP@nwvS8VFTE38E5UP00uh,0*1E ( MSG: 3, REPEAT: 0, MMSI: 224161170, signalpower: -16.9694, ppm: 2.31481, timestamp: 20260417182249)
!AIVDM,1,1,,A,B3P=t>P007w`lS5aBHil7wpUCP06,0*14 ( MSG: 18, REPEAT: 0, MMSI: 235109434, signalpower: -18.3949, ppm: 0.289352, timestamp: 20260417182249)
!AIVDM,1,1,,B,H7WK6EDTCBD8:1JDp1knmn10744t,0*58 ( MSG: 24, REPEAT: 0, MMSI: 511100501, signalpower: -10.5473, ppm: -5.20833, timestamp: 20260417182250)
!AIVDM,1,1,,B,342O`iQ000wvewVFRtIT9AST2DOJ,0*03 ( MSG: 3, REPEAT: 0, MMSI: 271050950, signalpower: -5.51227, ppm: -0.868056, timestamp: 20260417182251)
!AIVDM,1,1,,B,13GQDPPP04wvRbfFTi1=0OwT26AH,0*50 ( MSG: 1, REPEAT: 0, MMSI: 225989762, signalpower: -16.6187, ppm: -2.31481, timestamp: 20260417182251)
[AIS engine v0.66 #0-0] received: 6 msgs, total: 220 msgs, rate: 1.99423 msg/s
Configurar el servicio
Ahora lo configuramos como servicio para que arranque de forma automatica con la Raspberry Pi y sea facil su parada y rearranque
La forma rapida de instalarlo es
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/jvde-github/AIS-catcher/main/scripts/aiscatcher-install) -p"
Si da problemas por ser una raspberry pi con cosas se puede hacer por pasos
# 1. Instalar dependencias necesarias (sin usar backports)
sudo apt update
sudo apt install -y build-essential librtlsdr-dev libusb-1.0-0-dev pkg-config
# 2. Descargar el código fuente
cd /tmp
git clone https://github.com/jvde-github/AIS-catcher.git
cd AIS-catcher
# 3. Compilar
make
o si da problemas (Pi-star)
make CC=g++ CXX=g++
o mejor
make CC=g++ CXX=g++ CFLAGS="-O3"
# 4. Instalar el binario en una ruta accesible
sudo cp AIS-catcher /usr/local/bin/
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/jvde-github/AIS-catcher-control/main/install_ais_catcher_control.sh)"
rtl-ais
Este software es mas sencillo y antiguo pero completamente funcional, si bien no tiene un servidor web para acceder en lcoal a los datos
Instalar
- cd /tmp
- wget https://github.com/dgiardini/rtl-ais/archive/refs/heads/master.zip
- unzip master.zip
- cd rtl-ais-master
- ls
- make
- sudo cp rtl_ais /usr/local/bin/
- /usr/local/bin/rtl_ais -n -h 127.0.0.1 -P 35778 -p 0
- nohup /usr/local/bin/rtl_ais -n -h 127.0.0.1 -P 35778 -p 0 > /dev/null 2>&1 &
- sudo killall rtl_ais
- nohup /usr/local/bin/rtl_ais -n -h 185.77.96.227 -P 10632 -p 0 > /var/log/rtl_ais.log 2>&1 &
- sudo netstat -tupn | grep rtl_ais
- /usr/local/bin/rtl_ais -n -h 185.77.96.227 -P [TU_PUERTO MARINE TRAFFIC] -p 0
- sudo iptables -A OUTPUT -p udp --dport [TU_PUERTO MARINE TRAFFIC] -j ACCEPT
- sudo iptables -A INPUT -p udp --sport [TU_PUERTO MARINE TRAFFIC] -j ACCEPT
- sudo iptables -L OUTPUT -n -v
- rtl-ais-master$ /usr/local/bin/rtl_ais -n -h 185.77.96.227 -P [TU_PUERTO MARINE TRAFFIC] -p 0
Edge tuning disabled.
DC filter enabled.
RTL AGC disabled.
Internal AIS decoder enabled.
Buffer size: 163.84 mS
Downsample factor: 64
Low pass: 25000 Hz
Output: 48000 Hz
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Log NMEA sentences to console ON
AIS data will be sent to 185.77.96.227 port 10632
Tuner gain set to automatic.
Tuned to 162000000 Hz.
Sampling at 1600000 S/s.
Allocating 12 zero-copy buffers
!AIVDM,1,1,,A,B3dwfH03wk?8mP=18D3Q29OQjlvr,0*4A
!AIVDM,1,1,,A,13ElTP5Oh2wvS0rFTJJrnVJf0D2g,0*6C
!AIVDM,1,1,,A,14hMQL0000OvPrHFU2r`BA@p00ST,0*4F
!AIVDM,1,1,,B,13ElTP5000wvS0rFTJIq>6I20<2g,0*55
- rpi-rw
- sudo nano /etc/systemd/system/rtl-ais.service
[Unit]
Description=RTL-AIS Service
After=network.target mmdvmhost.service
Requires=network.target
[Service]
Type=simple
ExecStartPre=/bin/sleep 30
ExecStart=/usr/local/bin/rtl_ais -n -h 5.9.207.224 -P 10632 -p 0
Restart=always
RestartSec=10
User=root
[Install]
WantedBy=multi-user.target
- sudo systemctl daemon-reload
- sudo systemctl enable rtl-ais.service
- sudo systemctl start rtl-ais.service
- sudo systemctl status rtl-ais.service --no-pager -l
● rtl-ais.service - RTL-AIS Service
Loaded: loaded (;;file://pi-star/etc/systemd/system/rtl-ais.service/etc/sys
temd/system/rtl-ais.service;;; enabled; vendor preset: enabled)
Active: active (running) since Sun 2026-04-19 17:39:45 CEST; 1min 48s ago
Process: 2206 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS)
Main PID: 2251 (rtl_ais)
Tasks: 4 (limit: 1716)
CPU: 1min 17.247s
CGroup: /system.slice/rtl-ais.service
└─2251 /usr/local/bin/rtl_ais -n -h 185.77.96.227 -P 10632 -p 0
Apr 19 17:41:00 pi-star rtl_ais[2251]: !AIVDM,1,1,,B,14hMQL0000OvPr@FU2q8BACn0<2
C,0*78
Apr 19 17:41:01 pi-star rtl_ais[2251]: !AIVDM,1,1,,A,33a`db5000OvS7PFT0HVMCP40mD
r,0*14
sudo journalctl -u rtl-ais.service | grep '!AIVDM' | wc -l
sudo ss -tunap | grep rtl_ais
udp UNCONN 0 0 0.0.0.0:38101 0.0.0.0:* users:(("rtl_a
is",pid=2251,fd=8))
nc -zv 185.77.96.227 10632
185.77.96.227: inverse host lookup failed: Unknown host
Registrar la estación AIS
Usemos ais-catcher o rtl-ais se puede dar de alta la estación receptora en uno o más servidores AIS con lo que conseguiremos
- Contribuimos de forma desinteresada a la comunidad AIS
- Recibieremos un usuario premium de la plataforma a la que contribuimos
Despues de darnos de alta como usuarios pasamos a dar de alta nuestra estación y con el puerto o código que nos asignan lo incluimos en el comando ExecStart del servicio "h 185.77.96.227 -P [Nuestro_Puerto]" siendo [Nuestro_Puerto] un codigo suministrado por Marine Traffic
Comandos generales de mantenmiento de los servicios sobre Raspberry Pi
El servicio se puede llamar de cualquier forma, hemos usado indistintamente nombres como: AIS-catcher, rtl-ais.service, etc.
Dar permisos de escritura
- rpi-rw
Configurar un servicio tras crearlo con un editor como nano p.e. ais-rx.service en /usr/local/bin/
- sudo systemctl daemon-reload
Habilitar el servicio
- sudo systemctl enable ais-rx.service
Deshabilitar el servicio
- sudo systemctl disable ais-rx.service
Arrancar el servicio (Comprobar que estan los servicios parados)
- sudo systemctl start ais-rx.service
Parar el servicio
- sudo systemctl stop ais-rx.service
Borrar los ficheros creados para el servicio
- sudo rm /usr/local/bin/ais-rx.service.sh
- sudo systemctl daemon-reload
Mata todos los procesos asociados al servicio
- sudo killall AIS-catcher 2>/dev/null
- sudo killall -9 AIS-catcher rtl_fm
Reiniciar la raspberry pi cuando nada va como queremos
- sudo reboot
Ver todos los servicios activos
- systemctl list-units --type=service --state=running
Diagnóstico de cómo funciona el servicio
- sudo systemctl status ais-rx.service --no-pager -l
● ais-rx.service - Receptor AIS EA5JTT - Puerto de Valencia Loaded: loaded (;;file://pi-star/etc/systemd/system/ais-rx.service/etc/systemd/system/ais-rx.service;;; enabled; vendor preset: enabled)
Active: active (running) since Fri 2026-04-17 21:14:42 CEST; 13s ago
Main PID: 7514 (AIS-catcher)
Tasks: 4 (limit: 1716)
CPU: 6.766s
CGroup: /system.slice/ais-rx.service
└─7514 /usr/local/bin/AIS-catcher -v -d 00000001 -gr TUNER 45 -s 15
36k -P 0.0.0.0 8081 -u 5.9.108.159 10632
Apr 17 21:14:52 pi-star AIS-catcher[7514]: !AIVDM,1,1,,A,13EieTP000wvS4dFTK`KT6O
V0HNV,0*32 ( MSG: 1, REPEAT: 0, MMSI: 224161170, signalpower: -16.1145, ppm: 1.1
5741, timestamp: 20260417191452)
Active: active (running) since Fri 2026-04-17 21:14:42 CEST; 13s ago
Main PID: 7514 (AIS-catcher)
Tasks: 4 (limit: 1716)
CPU: 6.766s
CGroup: /system.slice/ais-rx.service
└─7514 /usr/local/bin/AIS-catcher -v -d 00000001 -gr TUNER 45 -s 15
36k -P 0.0.0.0 8081 -u 5.9.108.159 10632
Apr 17 21:14:52 pi-star AIS-catcher[7514]: !AIVDM,1,1,,A,13EieTP000wvS4dFTK`KT6O
V0HNV,0*32 ( MSG: 1, REPEAT: 0, MMSI: 224161170, signalpower: -16.1145, ppm: 1.1
5741, timestamp: 20260417191452)
Quién usa un puerto p.e. 8081
- sudo netstat -tulpn | grep 8081
Quién usa el USB
- sudo fuser -k /dev/bus/usb/001/*
Qué se arranca
- ps -ef | grep AIS-catcher
pi-star 12887 12337 0 16:49 pts/0 00:00:00 grep --color=auto AIS-catcher
Comprobar un servidor web en local
- curl -I http://127.0.0.1:8081
Comprobar con navegador
- http://[LA_IP_DE_TU_PI]:8081
- sudo iptables -I INPUT 1 -p tcp --dport 8081 -j ACCEPT
- sudo /sbin/iptables -I INPUT -p tcp --dport 8081 -j ACCEPT
- sudo /sbin/iptables -I INPUT 1 -p tcp --dport 8081 -j ACCEPT
Compatibilidad con otros servicios con los que se comparten recursos (p.e.SDR-USB)
- APRS-igate tendrá: Conflicts=autorx.service rtl-ais.service
- Autorx tendrá: Conflicts=aprs-igate.service rtl-ais.service
- rtl-ais tendrá: Conflicts=aprs-igate.service autorx.service
Referencias
Advertencia importante
Las modificaciones, configuraciones y procedimientos descritos en este sitio pueden implicar riesgos técnicos, legales o de seguridad. El autor no se responsabiliza del mal funcionamiento de los equipos, daños permanentes, pérdida de garantía ni de posibles infracciones legales derivadas del uso de esta información.
El lector asume plena responsabilidad por cualquier acción que decida realizar basándose en el contenido de este blog.
© 2026 EA5JTT. Queda prohibida la reproducción total o parcial sin autorización expresa del autor.






No hay comentarios:
Publicar un comentario