Thursday, February 20, 2020

HF APRS with JS8Call

How to configure JS8Call to report your location into the APRS network


JS8Call is a derivative of the WSJT-X application, based on the robustness of FT8 it's primarily for keyboard-to-keyboard message passing. See the JS8Call homepage and JS8Call Groups.io site.

Among some of its features is the ability to report your position into the APRS network via other stations running JS8Call:
  1. Find your 10 character grid square, K7FRY has a great tool Find QTH or map square built in Google maps that lets you find your location, click on the map and it displays your 10 character grid square.
  2. In JS8Call, File > Settings > General, enter the grid square in the My Maidenhead Grid Locator box.
  3. In JS8Call, File > Settings > Save messages > add a new message: @APRSIS GRID <MYGRID12> and OK to save. Note: JS8Call will replace "<MYGRID12>" with the value from My Maidenhead Grid Locator set in step 2 when the saved message is selected and sent next.
  4. In the main JS8Call window right click in the Message(s) or outgoing message box > Saved Messages > select your saved @APRSIS message to send it.
When I selected the saved message to send, my location appeared on aprs.fi with-in about a minute:


(Click for larger/clearer image)

Here I am, shows it came from JS8, was on 30m band, and a SNR of -12dB. It was received by one of WB6CXC's dedicated gateway receivers.

After sending the occasional @APRSIS messages with my grid square over the several days it seems to work on 80, 40, 30 and 20m bands, even when there is no JS8Call activity it appears enough people leave it running to receive and forward the messages. Overall 40m has been the most reliable at any time, and looking at who's hearing me on the different bands on http://pskreporter.info/ shows 40m having by far the most stations receiving my APRS messages.


Taking it Mobile


This is work in progress..

Raspberry Pi Model 3 B+, Raspbian Buster with desktop.

JS8Call for Raspberry Pi from http://files.js8call.com/latest.html.


GPS for the Pi


GlobalSat BU-353-S4 USB GPS Receiver.

To get this GPS working:
  1. Plug the GPS in, open a terminal window.
  2.  sudo apt-get update
  3.  sudo apt-get install gpsd gpsd-clients python-gps
  4.  dmesg to see where the GPS was mounted, /dev/ttyUSB1 in my case. This will depend on what other USB devices are connected.
  5. Edit /etc/default/gpsd to match this post on askubuntu and where our GPS was mounted.
  6.  sudo /etc/init.d/gpsd restart
  7.  cgps -s
  8. Had a GPS fix, hit q to exit cgps.

Sync time via GPS (I got the details from here):
  1. Install Chrony: sudo apt-get install chrony python-gi-cairo
  2. Edit /etc/chrony/chrony.conf add this to end of file (one line): refclock SHM 0 offset 0.5 delay 0.2 refid NMEA
  3. Restart Chrony: sudo /etc/init.d/chrony restart
  4. Check Chrony's sources: chronyc sources -v


JS8CallUtilsGPSD


Now the magic part, some software to glue it all together and send updated positions via JS8Call.

First, enable the UDP API options in JS8Call under Settings > Reporting.

Mark M0IAX created an app written in Python called JS8CallUtilsGPSD, this can be configured to automatically start with the TX timer enabled, Auto TX Grid to APRSIS enabled, and the position precision increased to 10 character grid squares.

The first time JS8CallUtilsGPSD is run, it creates some config files, we can then edit these.

For 10 character grid squares which are fairly precise, edit gps.cfg, and under the [LOCATOR] section: precision = 5


Automated Startup


The rest of this relates to automating the startup of everything for use in a mobile, so when the vehicle is started everything turns on and sets it self going, and when the vehicle is turned off everything shuts down again. This consists of:
  • Making another config file change with JS8CallUtilsGPSD.
  • Configuring some options in JS8Call.
  • Setting up a script that starts JS8Call and JS8CallUtilsGPSD when the Pi boots.
  • Some hardware to automatically switch the rig on and off, and signal the Pi to turn on and cleanly shut down.

Edit js8call.cfg, under the [APP] section:

AutoTimePeriod = 10
AutoOnAtStart = 1 
AutoSelectedOption = 1 

AutoTimePeriod is the number of minutes between sending a new position.
AutoOnAtStart enables the timer on startup.
AutoSelectionOption sets the Auto TX Grid to APRSIS option.

Now when js8callutilsGPSD.py is run, it'll count down from 60 seconds to the first transmit, then every 10 minutes after that.

Configure JS8Call to automatically transmit messages from JS8CallUtilsGPSD:
  • Auto TX the message in JS8Call when JS8CallUtilsGPSD sends an updated position, Mode > Enable Autoreply.
  • To enable autoreply when JS8Call is started, Settings > General > Networking & Autoreply > check Turn autoreply on at startup.
  • I also enabled Settings > Radio > Rig Options > Hold PTT between frames. I don't see a use having the rig go back to receive for 2 seconds between frames.

Next we need a script that runs when the Pi boots that will start JS8Call and JS8CallUtilsGPSD for us, this requires an autostart file and a shell script. I put together a couple scripts to do this, see https://github.com/lonney9/JS8AprsStart which includes setup info.


So far so good!


I'm currently running this setup under test in the shack on 40m, except on a 3 hour timer. Raspberry Pi with the auto startup script, Icom IC-7300 at 10W into an OCFD at 45ft.
APRS: https://aprs.fi/#!call=a%2FKL3NO
PSK Reporter: https://www.pskreporter.info/pskmap?preset&callsign=KL3NO&txrx=tx&mode=JS8

I have tried 20, 30 and 80m on a couple of occasions, 20 and 30m bands are closed at night, hit and miss during the day partly due to the lack of other stations running JS8Call on these bands and lousy propagation during the current solar cycle minimum.

80m has had some surprises at night with my position reports being received as far away as the east coast, but is hit and miss with low number of stations running JS8Call on this band. During the daytime NVIS range is limited to a few hundred miles, and coupled lack of stations in range running JS8Call during the day no position reports make it.

40m seems to be the magic band for JS8Call, the combination of enough stations running JS8Call at any given time, longer range NVIS during the daytime and the band opening up at night results in pretty much all position reports making it. And that's only sending them once every 3 hours. In a mobile with a lower gain antenna, a bit more TX power and sending a position report every 10 minutes should result in a fairly good success rate?


Switching the rig and Pi on and off


I also want to automate the powering on of the rig and Pi when the vehicle is started, and also power the rig off, and cleanly shutdown the Pi when the vehicle is turned off.

For the rig I found this Powerwerx DC Automatic Power Switch/Timer which senses the vehicle voltage. It will switch the output off after a set amount of time when the voltage drops below 12.7V, and back on again when the vehicle is started and the voltage is above 13V.

With a 15 min power off delay and 10 minute position reporting interval we can report the finial position after stopping and turning the vehicle off.

For the Pi, I found this Boot, reboot and shutdown the Pi with ignition key project which shows how to use a relay connected to a pair of GPIO pins and a script to initiate shutdown, and signal the Pi to power on. That leaves providing an always on 5V supply for the Pi, yet to sort that out.


Antennas!


I have ordered a pair of 40m and 20m band Hamsticks (7ft versions), and a Comet HD-5-3/8-24 lip mount from my favorite outlet of hamradio equipment.

These arrived on Feb-21, out of curiosity I laid the aluminum latter I had in the shack on the floor and set up the 40m antenna and the lip mount, send an APRSIS message on 40m with 30W, two stations heard me and my position made it into the APRS system, map from https://www.pskreporter.info/:


(Click for larger/clearer image)


Backstory..


For some time I've been intrigued with APRS over HF, while the VHF APRS system is very good, and easy to use with modern rigs like my Kenwood TH-D72A you're limited to being in range of an iGate or digipeater - normally not a problem in most populated places, and even many sparsely populated places.

When I drove from Fairbanks Alaska to Seattle in May 2014, I ran VHF APRS with a 50W rig and decent antenna on the car, with a couple of exceptions (Tok AK and Whitehorse YT) once I was out of range of the digipeater in Fairbanks the coverage was non-existent until I was half way through British Columbia where the coverage was excellent all the way to Seattle. During the trip I shared the tracking link on aprs.fi with friends, and some of them got a real kick out of watching my trip progress on a map each day, including a couple goofups I made with wrong turns, one where I had to back the car with trailer back down a street the GPS "thought" looped around, but was a dead end.

APRS on HF? Seems current information on this subject is scarce. Some searching found http://www.truehamfashion.com/2017/09/hf-aprs.html which describes using 300 baud packet on the 30m band, for fun I got SoundModem and APRSIS/32 running (I disabled its internet access so the map didn't fill up with stuff, and would just show what I had heard), and over a couple days spotted some beacons, including some from WA8LMF who was reporting the location of the ISS. I took at look at Stephens website and found more info on HF APRS using PSK63, but after a couple emails with Stephen it turns out the author of the application called Cross Country Wireless APRS Messenger that does PSK63 has stopped developing it and removed it from download, but noted at the bottom of the page suggesting using JS8Call's ARPS function. So I looked into that..

At this time the JS8Call Guide nor any other info I can find tells you how to successfully send your location via JS8Call and have it show up in the APRS system, e.g. on aprs.fi. This YouTube video by OH8STN refers to an earlier version of JT8Call (later renamed to JS8Call), the message syntax has since changed. Digging around in the JS8Call Groups.io group I found this post which was the clue to adding the saved message using the @APRSIS group.