Setup Script for GPS and aprs

curl -sSL https://raw.githubusercontent.com/hardenedpenguin/asl-misc-scripts/refs/heads/main/setup-asl3-gps.rb | sudo ruby

Interactive setup for gpsd, shared GPS on 127.0.0.1:2947, and APRS via app_gps on an ASL3 node. gpsd owns the USB receiver (for saytime, SkywarnPlus, cgps, and similar clients). A gpsd-nmea-bridge systemd unit replays NMEA to /dev/rptgps because app_gps only reads a serial-style stream.

The script installs gpsd, gpsd-clients, and socat; writes /etc/default/gpsd and /etc/asterisk/gps.conf (APRS passcode from callsign); enables app_gps.so in modules.conf; and restarts gpsd and Asterisk. Defaults target Shari PiHat-class low-power Pi nodes (~5W HT, rubber duck, omni): 180s beacon interval, car icon (>), and PHG power/height/gain of 2/1/1. Run as root and answer prompts for callsign, SSID, USB device (/dev/ttyACM0 default), RF frequency, tone, beacon comment, and interval.

Updated: setup-asl3-gps.rb β€” ASL3 APRS setup (fixed, mobile, and radioless)

We’ve updated the interactive APRS setup script in hardenedpenguin/asl-misc-scripts. Same curl one-liner as before:

curl -sSL https://raw.githubusercontent.com/hardenedpenguin/asl-misc-scripts/refs/heads/main/setup-asl3-gps.rb | sudo ruby

Run from an SSH session or console with sudo. The script walks you through setup and shows a summary before writing anything.

What’s new

The script is no longer mobile-only. It now covers three common setups:

Fixed repeater or base

No GPS dongle
Does not install gpsd
APRS position comes from fixed lat/lon/elev in gps.conf

Mobile node

USB GPS dongle
Installs gpsd (and socat) if not already present
Live GPS position via gpsd; fallback lat/lon when there is no satellite lock
Radioless node (hubs, links, or GPS-only trackers)

No RF frequency or tone to advertise
Skips freq/tone prompts and uses a plain map comment
Sets freq = 0.0 and tone = 0.0 in gps.conf
Fixed + radioless: fixed coordinates only, no gpsd
Mobile + radioless: still uses a GPS dongle for live position, without pretending the node has RF
Clearer prompts

PHG fields (power, height, gain, direction) β€” shows the full 0–9 digit tables and what each value means on APRS maps. Enter a digit or a real-world value (watts, feet HAAT, dBi, degrees). The script picks the nearest APRS encoding and tells you what will actually show on the map.
Elevation vs HAAT β€” elev is meters above sea level, not HAAT. HAAT is the separate PHG height digit.
Decimal precision β€” prompts tell you how many decimal places to use for lat/lon, elevation, MHz, and tone.
APRS passcode β€” computed from your callsign but shown as ***** on screen (still written correctly to gps.conf).
Confirm before write β€” full summary at the end. Answer n to abort with no changes.
Re-run safety β€” backs up existing gps.conf to gps.conf.bak.
What it configures

On every run:

/etc/asterisk/gps.conf
app_gps.so enabled in modules.conf if still set to noload
Asterisk restart
Mobile only:

gpsd, gpsd-clients, socat
/etc/default/gpsd
gpsd-nmea-bridge service (NMEA to /dev/rptgps)
Shared GPS on 127.0.0.1:2947 for saytime-weather-rb, SkywarnPlus-NG, cgps, and similar clients
Not changed: rpt.conf β€” standard APRS-IS beacons do not need it. APRSStt (touch-tone) is still a separate manual step if you want that.

After setup

asterisk -rx 'gps show status'

On mobile nodes, also try cgps -s -u i or ls -l /dev/rptgps . Then watch for your beacon on aprs.fi.

Full details in the repo README: GitHub - hardenedpenguin/asl-misc-scripts: AllStarLink setup and maintenance scripts. Run with curl; shell, Perl, Ruby. No clone needed. Β· GitHub

Feedback welcome β€” especially from fixed repeaters, radioless hubs, and mobile nodes.

73

Trying to setup SkywarnPlus-NG as wall as a physical GPS receiver today, and it appears your script is broken, at least under Trixie ASL3 image following a clean install several times.

curl -sSL https://raw.githubusercontent.com/hardenedpenguin/asl-misc-scripts/refs/heads/main/setup-asl3-gps.rb | sudo ruby

Reports "ERROR: asterisk not found in PATH"

I was able to complete the install of SkywarnPlug-NG and configure it, but for the life of me, I cannot get the GPS taking. I've set the gps.conf and service manually, using the one script you have on your repo, I can see I have the APRS side and aforementioned gps.conf correct (at least I think), but the script returns the following:

=== ASL3 APRS / GPS diagnostic ===

[OK] /etc/asterisk/gps.conf present
[OK] app_gps.so enabled in modules.conf

gps.conf:
call: W2GLD-10 Change this!
server: rotate.aprs2.net
interval: 600
comport: /dev/ttyS0 Serial port for GPS receiver (specify this only if using GPS receiver)
baudrate: 9600 Baud rate for GPS receiver (specify this only if using GPS receiver), default 4800
[WARN] baudrate is 9600 Baud rate for GPS receiver (specify this only if using GPS receiver), default 4800; app_gps typically needs 4800 on the NMEA bridge

Asterisk gps show status:
GPS: Connected, Signal: Unlocked
[WARN] GPS serial open but no fix (check sky view / antenna)

Mobile / gpsd path:
[FAIL] gpsd.service not active
[WARN] gpsd-nmea-bridge.service unit file missing
[WARN] /usr/local/sbin/gpsd-nmea-bridge missing or not executable
[WARN] /etc/systemd/system/asterisk.service.d/gps-bridge.conf missing (Asterisk may start before /dev/rptgps exists)
[FAIL] /dev/rptgps missing

Summary: 2 issue(s), 5 warning(s)

Any thoughts or suggestions?

Gonna have to give me a few days, I am in middle of debugging in app_rpt at moment. Once I finish with it I will make time to revisit this. Sorry for the failure I have not kept up with the script since introducing gpsd support into asterisk.

Script has been updated, please run it again.

W5GLE, scripted worked like a champ this time, thank you so much for looking into this and making the updates. Now to see about getting my specific GPS module installed and working off the Pi header pins. 73 and thanks again sir!