A little drive around LA

So after all the testing, and building of the Direwolf Raspberry Pi Tracker, I took it to the US.

It performed really well in California.
I tethered to my mobile phone and discovered that I needed to sit in the personal hot spot screen for the device to actually connect every time.

Not sure why, but from the second picture, I do wonder if it was the cause of the loss of packets in Texas.

Drive to Barstow to see the DSN, Route 66 and Rail museum – Route 66 and Rail closed, as they only are run by volunteers which was a shame, but otherwise, awesome drive.
Drive around Texas..
In there, but did not capture it as I don’t think it worked correctly was the drive down Elm Street – where Kennedy was assassinated.

TCP/IP Only Direwolf Tracker


So I am about to head to the USA for a few weeks for a holiday.
I am quite keen to track my driving around Texas and LA but I am not that keen to take a large radio with me to do APRS tracking…

I have done this before and quite frankly it was just too annoying to take Radio, Tiny Track 4, Antenna, Mag Base, Cables and all the other stuff that is required to make it work.

So I decided to build a raspberry Pi with a GSM modem and GPS module in an effort to cut down on the required hardware to take for this.

So Raspberry Pi 3+ , Sierra Wireless 4G GSM Modem, GPS Module is the hardware that I needed to take with me..

I intend to 3D print a case for it all so it’s nicely presented, but that might done in the next few weeks.

But on to the setup:


WVDIAL

I setup wvdial to establish the 4G connection on the GSM network .

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0
Init3 = AT+CGDCONT=1,"IP","internet"


Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone = *99#
ISDN = 0
Password = { }
New PPPD = yes
Username = { }
Modem = /dev/ttyUSB3
Baud = 9600

I needed to make wvdial start on boot – so its really headless so had to set the following up.

On raspbian create a file /etc/network/interfaces.d/pppd
And copy the following code into that file.. this will enable the ppp0 interface on boot, and dial your internet connection, once its established OpenVPN will connect and allow you to connect to the unit with a known IP address.

auto ppp0
iface ppp0 inet wvdial

I also added ufw firewall and only allowed port 22 for SSH to be able to connect to the Raspberry Pi – this is fairly self explanatory so will not document it here, and only because its running on a public IP address, its best to keep it locked down as much as you can.


GPS Module

Because the Sierra Wireless modem take 3 tty devices, sometime the GPS module would not be /dev/ttyUSB0 at times, and not cause tracking properly.

I had to create a symlink so I always had a consistent device so chose the logical /dev/gps

I created the file : /etc/udev/rules.d/99-usbserial.rules and included details from the following.

udevadm info --query=property --name=/dev/ttyUSB0 | grep SERIAL

This will give you results similar to the following – this is full output without the grep as suggested in the previous line.

Because my GPS unit has no serial number, or a short code, I had to use the full name of the device, which I found from the following.

DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB0/tty/ttyUSB0
DEVNAME=/dev/ttyUSB0
MAJOR=188
MINOR=0
SUBSYSTEM=tty
USEC_INITIALIZED=19091176
ID_VENDOR=Prolific_Technology_Inc.
ID_VENDOR_ENC=Prolific\x20Technology\x20Inc.\x20
ID_VENDOR_ID=067b
ID_MODEL=USB-Serial_Controller_D
ID_MODEL_ENC=USB-Serial\x20Controller\x20D
ID_MODEL_ID=2303
ID_REVISION=0400
ID_SERIAL=Prolific_Technology_Inc._USB-Serial_Controller_D
ID_TYPE=generic
ID_BUS=usb
ID_USB_INTERFACES=:ff0000:
ID_USB_INTERFACE_NUM=00
ID_USB_DRIVER=pl2303
ID_VENDOR_FROM_DATABASE=Prolific Technology, Inc.
ID_MODEL_FROM_DATABASE=PL2303 Serial Port
ID_PATH=platform-3f980000.usb-usb-0:1.2:1.0
ID_PATH_TAG=platform-3f980000_usb-usb-0_1_2_1_0
DEVLINKS=/dev/gps /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 /dev/serial/by-path/platform-3f980000.usb-usb-0:1.2:1.0-port0
TAGS=:systemd:

But as I mentioned, I had no ID_SERIAL_SHORT or anything unique for my device so had to use ID_SERIAL full name – put the following with your settings into your file /etc/udev/rules.d/99-usbserial.rules

ACTION=="add",ENV{ID_BUS}=="usb",ENV{ID_SERIAL}=="Prolific_Technology_Inc._USB-Serial_Controller_D",SYMLINK+="gps"

Once that was set, every reboot makes the GPS module appear as /dev/gps which is good for Direwolf.


Direwolf Tracker

So I built a minimal Direwolf config as previously documented here, and many places, for gpsd support and enabled Smart Beaconing and GPS with a Custom Beacon advising of my Mobile number and the fact I was on Holiday in the US.

ADEVICE - default 
ACHANNELS 1
CHANNEL 0
MYCALL *** Your Call Sign ***
MODEM 1200
GPSNMEA /dev/gps
TBEACON SENDTO="IG" COMPRESS=1 VIA=WIDE1-1,WIDE2-1 SYMBOL=car
SMARTBEACONING 48 0:45 5  0:90 0:05 15 25
CBEACON SENDTO="IG" COMPRESS=1 info="> Some Text telling you what I am up to"
IGSERVER noam.aprs2.net
IGLOGIN *** Your Call Sign *** *** APRS Password ***

As you can see it is a fairly basic config, no digipeating and only a TBeacon for Tracker and a CBeacon for custom note sent every 30 minutes.

Because Direwolf expects to find a Sound card, and the raspberry Pi does not have an input one, and I don’t need one anyway, I had to run Direwolf with some funny shell code to make it start on boot, with no standard in existing when no user is logged in.

This is the code I found to run some software with standard in with temporary nothingness.

#!/bin/bash
fifo=$(mktemp -u) &&
  mkfifo "$fifo" &&
  (rm "$fifo" && direwolf -c /etc/direwolf/direwolf.conf -  <&3 3<&- &) 3<> "$fifo"

I can’t think of much more to put here for this config.
Just modify your smartbeaconing settings, I am still playing with it over the next while before holiday, so I would not recommend using them, but they work, just not sure if they are ‘the best’.

Once I have printed the 3D case, I will take some photos but am looking forward to only having to take the Pi with me as my intention it to build a case with the printout for the GPS puck to sit in – so will only need to take a power cable to power the pi and have no excess wires hanging around.

NZART Branch 28 Equipment Sale 2019 Post Drive Debrief


Well, it was a bit of an interesting experience, and experiment to be honest.


Here is a track of my drive, as you can see, I had two little oddities with leaving home till just before Whangaparaoa and heading home till just before Waipu.
Not sure what’s going on there but restarting Direwolf seemed to have corrected it for both issues – so it might have been an issue with it swapping Wireless networks or something else, but there was nothing to indicate an error – perhaps the iGate servers do not like a change of IP address without a disconnection – but I am sure I can work it out over time.

I did not Digipeat any traffic on the drive north, and just to put that into perspective,
the last packet on the drive north to be pick up by an RF station was:

2019-07-27 07:55:56 NZST: ZL1CLH-12>APDW15,WIDE1-1,WIDE2-1,qAR,ZL1AOX:!/`uGSzZun>+TG/A=000549

And the first packet to be re-aquired by an RF station on the drive north was:
2019-07-27 09:02:01 NZST: ZL1CLH-12>APDW15,WIDE1-1,WIDE2-1,qAR,ZL1BSW-10:!/`c,xzU_u>&RG/A=000982

Total time of 01:06:05 when I was in TCP/IP land only – and in that time no other stations were heard.

But as you can see from the following, there were not too many APRS users attending the sale – but the sale was well represented – and some very good equipment was brought by everyone.

The Cars with APRS at the sale:

The tracks they made to attend the sale:

The pink line was mine in both directions, with me going wild through the water on my return leg home.

Worthwhile I have to say – but also a little disappointing.
In a few weeks there is a sale on in Hamilton (South of Auckland) so might try this again then, and see if I get better performance on the south bouth destination.

But I had so much fun attending this sale (my first one in this region) and will attend again next year.

The day of the Sale, Drive and portable iGate


Let us just keep a record of the map as it is at 06:30am NZTime.

I will be driving from the little red car at the bottom of the screen grab, oddly to the red car ZL1DMA-9 in Whangarei – but between Wellsford and Marsden Point there is not a lot of digipeaters, so that is why I decided to do this little experiment.

From the rag chewing I heard on the local 2meter repeaters, there are quite a few people heading north today – so fingers crossed this little experiment will be successful – and I will consider any packet that is not mine captured via RF and iGated and Digipeaters between those areas as a success.

See you in 15 hours or so.

APRS in Wellington


Managed finally to locate the cigarette lighter in the rental car, it was very well hidden behind another panel that you slide over, so was able to briefly fire up the FT-7900 for a bit of APRS before I headed to the airport to fly out.
Lots of Object packet activity around Wellington but not a lot of ‘mobile’ traffic .
This is what I managed to get driving around Wellington – and that was selected for the last 8 hours on aprs.fi – so not much traffic, and I would have caught the morning commute in the time frame when I selected this screen shot.

I did however, see some traffic further up the coast, but they were iGating and not using RF at all – so much infrastructure down here in Wellington, as I was hearing my packets digipeated even in areas behind hills, but very little radio activity 🙁 – many ZL1’s thought it was because they were ZL1’s – but it appears even APRS traffic is kept hidden from people.

Anyway, had a wonderful time down here, and it won’t be too long before I come back down – so will get some awesome tracks on the next trip.

Simple Python Script to shutdown your Raspberry Pi.

Connect a button to GPIO-21 and press it and the Pi shuts down cleanly…

#!/usr/bin/python
#Simple script for shutting down the Raspberry Pi at the press of a button.
#by Inderpreet Singh

import RPi.GPIO as GPIO
import time
import os

# Use the Broadcom SOC Pin numbers
# Setup the pin with internal pullups enabled and pin in reading mode.

GPIO.setmode(GPIO.BCM)
GPIO.setup(21, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Our function on what to do when the button is pressed

def Shutdown(channel):
    print("Shutting Down")
    time.sleep(5)
    os.system("sudo shutdown -h now")

# Add our function to execute when the button pressed event happens

GPIO.add_event_detect(21, GPIO.FALLING, callback=Shutdown, bouncetime=2000)

# Now wait!
while 1:
    time.sleep(1)

My Byonics Tiny Track 4 settings


This are the settings that I have found work perfectly for my Tiny Track 4.
Just change to your callsign and you should be good to go 🙂
This has been an ‘export’ which should give you the ability to save this in a text file, and upload to the TinyTrack4 via their software.

 BANK 0
 P300 FALSE
 TXTDISP TRUE
 NODISP FALSE
 PPATHING FALSE
 DMSDISP TRUE
 MICETMV TRUE
 ENTS FALSE
 TELHIRES TRUE
 TELVOLT TRUE
 TELTEMP TRUE
 PREEMPT FALSE
 DIGIID TRUE
 WXPOS TRUE
 TELREAD TRUE
 FRAWDISP FALSE
 HRAWDISP FALSE
 WYPTXT FALSE
 PKTICOM FALSE
 PKTOCOM FALSE
 RPATHDISP FALSE
 LEDS TRUE
 PAVPEN FALSE
 DEC96 FALSE
 DDIST TRUE
 HEADERLN TRUE
 DMETRIC TRUE
 SOFTRST TRUE
 MSGCMD TRUE
 MSGCAP TRUE
 LRNTPS FALSE
 GPSCHK TRUE
 INTCLK FALSE
 DECSTAT TRUE
 DIGIMY FALSE
 TOSV TRUE
 TALT TRUE
 TSPEED TRUE
 TIMESTAMP TRUE
 TIMEHMS TRUE
 SBEN TRUE
 TSWPT TRUE
 AMODE GPS
 BMODE GPS
 ABAUD 4800
 BBAUD 4800
 BNKMODE 0
 SSIDROUTE 0
 ALTNET APTT4
 MYCALL ***YOUR CALL SIGN***
 PATH1 WIDE1-1
 PATH2 WIDE2-1
 PATH3 %
 TSTAT %
 BTEXT %
 BPERIOD 0
 TXD 40
 MTXD 10
 PERSIST 65
 SLOTTIME 15
 QUIET 10
 TRNKMODE 0
 CDMODE TONES
 CDLEVEL 20
 TXLEVEL 97
 TXTWIST 23
 RXAMP 37
 GWAYLEN 9
 GWAYMODE NMEA
 GRELAYBITS 1
 GRELAYRATE 0
 GKRELAY 0
 LOCATION 1234.5678N 12345.6789W
 GALT 1000
 TSYMCODE >
 TSYMTABLE /
 STATUSRATE 3
 PPERIOD 0
 MPPERIOD 0
 SBSSPEED 5
 SBFSPEED 48
 SBSPERIOD 90
 SBFPERIOD 45
 SBTANGLE 15
 SBTSLOPE 25
 SBTTIME 10
 MMSG 1
 TSOFFSET 17
 TDAO 0
 TPROTOCOL MIC-E
 TPSWITCH 0
 TPERIOD 0
 TVOLTTWK 128
 TTEMPTWK 90
 WPERIOD 0
 ALIAS1 %
 ALIAS2 WIDE2
 ALIAS3 %
 DUPETIME 30
 FILTERCALL %
 TXFREQ 144.390
 RXFREQ 144.390
 RXSQUELCH 0
 BANK 1
 P300 FALSE
 TXTDISP TRUE
 NODISP FALSE
 PPATHING FALSE
 DMSDISP TRUE
 MICETMV TRUE
 ENTS FALSE
 TELHIRES TRUE
 TELVOLT TRUE
 TELTEMP TRUE
 PREEMPT FALSE
 DIGIID TRUE
 WXPOS TRUE
 TELREAD TRUE
 FRAWDISP FALSE
 HRAWDISP FALSE
 WYPTXT FALSE
 PKTICOM FALSE
 PKTOCOM FALSE
 RPATHDISP FALSE
 LEDS TRUE
 PAVPEN FALSE
 DEC96 FALSE
 DDIST TRUE
 HEADERLN TRUE
 DMETRIC TRUE
 SOFTRST TRUE
 MSGCMD TRUE
 MSGCAP TRUE
 LRNTPS FALSE
 GPSCHK TRUE
 INTCLK FALSE
 DECSTAT TRUE
 DIGIMY FALSE
 TOSV TRUE
 TALT TRUE
 TSPEED TRUE
 TIMESTAMP TRUE
 TIMEHMS TRUE
 SBEN TRUE
 TSWPT TRUE
 AMODE GPS
 BMODE GPS
 ABAUD 4800
 BBAUD 4800
 BNKMODE 0
 SSIDROUTE 0
 ALTNET APTT4
 MYCALL ***YOUR CALL SIGN***
 PATH1 WIDE1-1
 PATH2 WIDE2-1
 PATH3 %
 TSTAT %
 BTEXT %
 BPERIOD 0
 TXD 40
 MTXD 10
 PERSIST 65
 SLOTTIME 15
 QUIET 10
 TRNKMODE 0
 CDMODE TONES
 CDLEVEL 20
 TXLEVEL 97
 TXTWIST 23
 RXAMP 37
 GWAYLEN 9
 GWAYMODE NMEA
 GRELAYBITS 1
 GRELAYRATE 0
 GKRELAY 0
 LOCATION 1234.5678N 12345.6789W
 GALT 1000
 TSYMCODE >
 TSYMTABLE /
 STATUSRATE 3
 PPERIOD 0
 MPPERIOD 0
 SBSSPEED 5
 SBFSPEED 48
 SBSPERIOD 90
 SBFPERIOD 45
 SBTANGLE 15
 SBTSLOPE 25
 SBTTIME 10
 MMSG 1
 TSOFFSET 17
 TDAO 0
 TPROTOCOL MIC-E
 TPSWITCH 0
 TPERIOD 0
 TVOLTTWK 128
 TTEMPTWK 90
 WPERIOD 0
 ALIAS1 %
 ALIAS2 WIDE2
 ALIAS3 %
 DUPETIME 30
 FILTERCALL %
 TXFREQ 144.390
 RXFREQ 144.390
 RXSQUELCH 0 

If you see anything that looks wrong, or can recommend a change, please let me know, but in Auckland, these seem to be a really good settings.

We have setup audio levels and twist on an HP 8921A and this was set for an Yaesu FT-7900.

Portable APRS iGate, Digipeater and GPS tracker build

So this weekend, 27th July 2019, the Whangarei radio sale is on, and looking at the arps.fi map there is a rather large area north of Auckland that has no APRS coverage..

With a bunch of Hams travelling to this sale from the Auckland region, I decided I would build a portable APRS iGate and tracker out of a Raspberry Pi, GPS and a CM108 audio sound card – which I have had working for various other projects – that have not been blogged here just yet but will shortly.

I am going to document the process I have gone through to build this unit, which will be built from fresh on a Raspberry Pi.

My Instructions for installing:
Please note: I will let you do your own security / password / username changes – this is just what I have done excluding those settings.

Load the latest version of Raspbian onto your sd card.
I prefer to use dd for this – in my case

dd if=./2019-06-20-raspbian-buster-lite.img of=/dev/rdisk1 bs=1m

I like to make my Raspberry Pi’s headless so after writing the Raspbian OS to the card, you should have a boot folder visible from the SD Card – there create a plain text file called ssh to enable the SSH server on first boot and a file called wpa_supplicant.conf that contains the following details to enable your WiFi to connect on first boot up.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=*TWO-LETTER COUNTRY-CODE-IN-UPPER-CASE*
network={
   ssid="YOUR-WIFI-NAME-HERE"
   psk="YOUR-WIFI-PASSWORD-HERE"
}


This will enable ssh on boot, and it should connect to your nominated WiFi access point on first power up – in my case, I will be connecting it to my Cellphone’s hotspot, so I can push the packets I receive to an iGate.

Once its booted up, ssh to in and Update to get the latest available packages list for raspbian, then the upgrade command to upgrade to the latest packages, then install the following new packages…

sudo su -
apt-get update
apt-get upgrade
apt-get install vim gpsd gpsd-clients git build-essential libasound2-dev libudev-dev alsa-utils rsyslog logrotate libgps-dev

Explanation as to why I am installing each of these packages :

vim – because I like vim
gpsd – because I am going to be running this as a tracker, and have a USB gps module

gpsd-clients – to see if the GPS is working.
git – to download from git because the raspbian version of direwolf is pretty old.
build-essential – will enable you to build packages
libasound2-dev – used for the cm108 sound card to allow direwolf to use the ptt GPI/O
libudev-dev – needed for developing applications that use libudev.
alsa-utils – needed for alsamixer and the like.
rsyslog – to log stuff 😉
logrotate – so your logged stuff does not fill the SD card too much
libgps-dev- gpsd development packages you can build direwolf against.

Once you have done all that,

git clone https://www.github.com/wb2osz/direwolf
cd direwolf
make
make install

Then quickly run direwolf you should get the following error:

Dire Wolf version 1.5
Includes optional support for:  gpsd cm108-ptt
Reading config file direwolf.conf
Audio device for both receive and transmit: default  (channel 0)
Could not open audio device default for input
No such file or directoryPointless to continue without audio device.

What I am looking for is gpsd and cm108-ptt support, which I can see is there.. thats a good thing.

Now to get on to configure direwolf.


Configuring Direwolf

These are my current (23/July/2019) settings, I am going to go for a drive tomorrow to work and see how they perform.

Basically I am beaconing to both an iGate and to RF – this is for both my GPS coordinates and for my Info beacons.

 ADEVICE  plughw:1,0
 ACHANNELS 1
 GPSNMEA /dev/ttyUSB0
 LOGDIR  /var/log/direwolf/
 CHANNEL 0
 MYCALL **CHANGE TO YOUR CALL SIGN**
 MODEM 1200
 PTT CM108 /dev/hidraw0
 TBEACON sendto="IG" symbol="igate" overlay=T VIA=WIDE1-1,WIDE2-1
 TBEACON sendto="0"  symbol="igate" overlay=T VIA=WIDE1-1,WIDE2-1
 SMARTBEACONING
 CBEACON sendto="IG" info="> Testing Portable iGate and Digipeater via iGate"
 CBEACON info="> Testing Portable iGate and Digipeater via RF"
 DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE 
 IGSERVER **USE APPROPRIATE IGATE SERVER**
 IGLOGIN **YOURCALLSIGN** **YOURPASSWORD**
 IGTXVIA 0 WIDE1-1
 FILTER IG 0 t/m
 IGTXLIMIT 6 10 

These settings seem to work correctly, I am sending the CBEACON out via iGate and RF based on those settings, and I am seeing a Digipeated packet when I receive a packet.

My GPS Coordinates are transmitted via RF and directly via TCP/IP to the iGate – which I know is not ideal, but there is going to be a large part of this drive that will not have any RF coverage, so I am looking forward to getting the trip logged and I am not able to digipeat my own packets and I would also like to see how useful this is to Digipeat the fellow Hams driving to the sale – if there are any.

The only settings I think I will try and take from my TinyTrack 4 is my SmartBeacon settings, which I think I will need to confirm from Knotts to MPH as that is what Direwolf seems to use.

As always, if you see any problems, or comments and suggestions would love to hear from you.

5 December 2013 – New Zealand Amateurs get 6meters (50mhz) returned to them.

In the early hours of December 5th 2013, with Analogue television switched off, the Amateurs in New Zealand had the 6 meter (50Mhz) band exclusively returned to them after 53 years.

Sure there were licenses allocated to amateurs to use the band during this time, but they were limited to where they could use it, how much power they could transmit with, and how far away from some TV transmission towers they could be.

I had worked in TV for 13 years at this stage, starting back in late 1999.
And never did I believe, I would have been one of the first (if not the first) to use the 50mhz band after analogue switch off, and exclusive access returned, but here you go – me, calling the first CQ on the national calling frequency 50.110Mhz in just over 53 years.

https://www.youtube.com/watch?v=OLtwsvXbR1E

– honoured, privileged, and a little chuffed is all I can say –

My friend Jeremy would have been proud of me, but he passed away 6 weeks before, never seeing a day where the QRM annoyance of Waiatarua (Auckland’s TV Transmission tower) would no longer affect his radio listening pleasure.

Since getting my Ham license, I have always been interested in 6 meters – mainly because it was the TV transmission band, but I will always have a love for this band, and discovering this video on Youtube, has made me fall in love with it all over again.