jvde-github / AIS-catcher

AIS receiver for RTL SDR dongles, Airspy R2, Airspy Mini, Airspy HF+, HackRF, SDRplay and SoapySDR

Home Page:https://aiscatcher.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble with serial baud rate

p2rjp0 opened this issue · comments

commented

I am having inconsistent startup of AIS-catcher.
Seems to work when I use stty to set baud rate before starting.
I have dAISy HAT constant 38400 with attached ublox M8N GPS 9600.
AIS-catcher
Minicom would show data but when tried using -e 38400 /dev/ttyAMA0 would just see garbage.
eventually after netcat socat .... had working then re-booted to check,,,, until I issued stty -F /dev/ttyAMA0 38400 was getting nowhere.

I have made a small tweak to the serial code. Before diving into this issue, can you check if this has resolved it (v0.55-146)?

commented

That appears to have fixed it. - see below.

Thank you.

● aiscatcher.service - AIS-catcher
Loaded: loaded (/lib/systemd/system/aiscatcher.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-01-01 09:40:25 NZDT; 7min ago
Main PID: 532 (bash)
Tasks: 4 (limit: 4915)
CPU: 1.103s
CGroup: /system.slice/aiscatcher.service
├─532 /bin/bash /usr/share/aiscatcher/start-ais.sh
└─538 /usr/local/bin/AIS-catcher -e 38400 /dev/ttyAMA0 -ge PRINT off -n -v 10 -M DT -N 8100 -N STATION Oamaru -N SHARE_LOC on -N PLUGIN_DIR /usr/share/aiscatcher/my-plugins -v 10 -u localhost 10110 -u 127.0.0.1 5000

Startup from journalctl...

-- Boot 0e54212382b04cbfad6bbe63f118cf8b --
Jan 01 09:40:25 OamaruPi systemd[1]: Started AIS-catcher.
Jan 01 09:40:25 OamaruPi aiscatcher[538]: AIS-catcher (build Jan 1 2024) v0.55-148-gc8c5c454
Jan 01 09:40:25 OamaruPi aiscatcher[538]: (C) Copyright 2021-2023 jvde-github and other contributors
Jan 01 09:40:25 OamaruPi aiscatcher[538]: This is free software; see the source for copying conditions.There is NO
Jan 01 09:40:25 OamaruPi aiscatcher[538]: warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Jan 01 09:40:26 OamaruPi aiscatcher[538]: Server: adding plugin (JS): /usr/share/aiscatcher/my-plugins/marinetraffic_option.pjs
Jan 01 09:40:26 OamaruPi aiscatcher[538]: Server: adding plugin (JS): /usr/share/aiscatcher/my-plugins/google_option.pjs
Jan 01 09:40:26 OamaruPi aiscatcher[538]: Server: adding plugin (JS): /usr/share/aiscatcher/my-plugins/shipxplorer_option.pjs
Jan 01 09:40:26 OamaruPi aiscatcher[538]: Server: adding plugin (JS): /usr/share/aiscatcher/my-plugins/vesselfinder_option.pjs
Jan 01 09:40:26 OamaruPi aiscatcher[538]: UDP: open socket for host: localhost, port: 10110, filter: OFF, JSON: OFF
Jan 01 09:40:26 OamaruPi aiscatcher[538]: UDP: open socket for host: 127.0.0.1, port: 5000, filter: OFF, JSON: OFF
Jan 01 09:40:26 OamaruPi aiscatcher[538]: TCP Server: start thread at port 8100
Jan 01 09:40:26 OamaruPi aiscatcher[538]: HTML Server running at port 8100
Jan 01 09:40:26 OamaruPi aiscatcher[538]: Device : Serial Port
Jan 01 09:40:26 OamaruPi aiscatcher[538]: Settings : rate 288K format TXT baudrate 38400 port /dev/ttyAMA0 print OFF
Jan 01 09:40:26 OamaruPi aiscatcher[538]: Model #0 -> (Src: 1, Grp: 1): [NMEA input] nmea_refresh OFF uuid stamp ON crc_check OFF VDO ON
Jan 01 09:40:26 OamaruPi aiscatcher[538]: $GNGLL,4024.58475,S,17535.53438,E,204026.00,A,D68
Jan 01 09:40:26 OamaruPi aiscatcher[538]: $GNRMC,204027.00,A,4024.58473,S,17535.53438,E,0.129,,311223,,,D
7C
Jan 01 09:40:26 OamaruPi aiscatcher[538]: $GNGGA,204027.00,4024.58473,S,17535.53438,E,2,12,0.68,24.0,M,18.7,M,,000069
Jan 01 09:40:27 OamaruPi aiscatcher[538]: $GNGLL,4024.58473,S,17535.53438,E,204027.00,A,D
6F
Jan 01 09:40:27 OamaruPi aiscatcher[538]: $GNRMC,204028.00,A,4024.58474,S,17535.53436,E,0.098,,311223,,,D71
Jan 01 09:40:27 OamaruPi aiscatcher[538]: $GNGGA,204028.00,4024.58474,S,17535.53436,E,2,12,0.68,23.9,M,18.7,M,,0000
61
Jan 01 09:40:28 OamaruPi aiscatcher[538]: $GNGLL,4024.58474,S,17535.53436,E,204028.00,A,D*69

Thanks for flagging and testing. Kind regards, Jasper