Saturday, June 29, 2019

Automating the Winlink

So, no big surprise, I'm lazy.  I realize at some point I'll quit checking Winlink regularly.  Of course, that is exactly the time someone will send me something interesting.

So how to make my Winlink messages visible with no effort.  Of course, put them in the email inbox.

I already have pat running on my LAN so checking Winlink is a simple matter of pointing my browser. My email client checks for email from my provider every so often, so the first step is to have pat check for inbound Winlink messages every so often.  This is no big deal, simply put a pat connect command on the cron tab and away we go.

I decided to check via telnet since from time to time I will swipe my Winlink radio for some other service. I do intend to fix that in the near future so I can be assured the RF path is available.

I decided to log the results.  Since the dialog from the RMS is usually pretty boring, I only keep the most recent.  Errors, tho, I want to see whether something happened when I wasn't looking.  So I wrote a little script:

So, now any Winlink messages are sitting on the Raspberry Pi, how to get them to the inbox.

pat puts everything of interest in the ~/.wl2k directory tree.  Received messages are put in the ~/.wl2k/mailbox/(call)/in folder.  The messages are stored in plain text, so it would be a simple matter to mail them.  Rather than try to keep track of wich messages have been mailed, I decided to move the processed messages into Winlink's archive folder.

The Linux mail command makes this pretty straightforward.  Note that your ISP or email provider may have some hoops to jump through in order to make this work. In my case, it was pretty easy.  The only slightly tricky part was fishing the subject line from the original messages so when they got to my email client I knew what I was looking at.

The Raspbian implementation of bash seemed to be a little different than those with which I am familiar, and I am not that much of a bash maestro anyway, so I decided to script it in php.  This does mean you need to install php, but that is pretty easy.

The following is my script:

  /* Send incoming Winlink to email, then move to archive
   *  jjmcd - 190628

  /* Location of Winlink mailbox */
/* Address messages will be coming from */
/* Address to send messages to */
/* Subject prefix to ease processing on receiving end */
$mail_prefix="PAT01:: ";

$list = dir($mailbox . "/in");
/* Loop through files in inbox */
while ( false !== ($file = $list->read()))
    if ( substr($file,0,1)!="." ) /* Ignore this directory */
        /* Read the file until we find the subject line */
        $f = fopen($mailbox . "/in/" . $file,"r");
        while ( $line=fgets($f,1000) )
          if ( !feof($f) )
              if ( substr($line,0,7)=="Subject" )
                if ( !$got )
                    /* Strip off the "Subject:" part */
                    /* And remember we found it */
        if ( $got )
            /* Build the mail command */
            $command = "mail -s \"" . $mail_prefix . $subj .
                     "\" " . "-r \"" . $from_address . "\" " .
                     " \"" . $to_address . "\" <" . $mailbox .
                     "/in/" . $file;
            /* Move the processed file to archive */
            $mvcommand = "mv " .  $mailbox . "/in/" . $file . " "
              . $mailbox . "/archive/";

If you are lucky, the only things you might want to change are the first few lines. After that, the script does a directory listing of the inbox (ignoring the . and .. files). It then loops through that list, opening each file and finding the Subject: line. It pulls the string Subject: off that line and adds $mail_prefix (the mailer will add Subject: back).

The mail command is formed and sent to the shell, then the mv command is also sent to the shell. The script then goes on to the next file.

This script is then scheduled on the crontab shortly after the mail was retrieved from the RMS.  I suppose it might have been better to do both in one script, but it can be easier to take a step at a time.

Wednesday, June 19, 2019

Winlink On Your Browser

Recently the profile of Winlink has increased around the Section quite a bit. The addition of the CMEN Winlink network to the existing VHF relays and the myriad of HF relays has made Winlink a significant contributor to moving text via radio.

For those not familiar with Winlink, it is basically radio email.  You compose a message in an email-like client. You then connect to a mail server and off your message goes. The interesting thing is that you can connect to the mail server by Internet, but also by radio. There are hundreds of HF servers around, but even easier, there are now dozens of VHF and UHF servers around Michigan.

You connect your computer to the radio using a TNC. Most modern programs don't require a lot of smarts in the TNC, so there is little advantage to an expensive TNC over a cheap one.

The most common program is Winlink Express.  But this requires leaving your computer connected to the TNC, which may or may not be convenient, or switching to a dedicated computer. Again, not as convenient as it might be.

Of course, these days, everything we do seems to involve a Raspberry Pi. This is a really cheap computer we can dedicate to a task.  Better yet, there is a cheap TNC available for the Raspberry Pi called a TNC-Pi.  And to top it off, there is a Winlink client called pat that will present itself as a web page.  So if you put a Pi with a TNC-Pi on  your LAN, you can send and receive Winlink messages over VHF or UHF from any web browser on your LAN.

I will detail below how to make this work for you.  You will need a Pi, and a TNC-Pi.  I am using a Raspberry Pi model 3B+ and a TNC-Pi 2.  Older TNC-Pi models will be the same, and older Pi models should be virtually identical. You will also need a keyboard, mouse and display, but once the system is configured these are no longer needed. I am assuming that you will connect the Pi into your LAN ver a normal Ethernet, so you will also need an Ethernet cable. For newer Pi models you could also use WiFi, but I won't go into setting up WiFi.

I tend to find an unusual keyboard annoying, so once the first few setup steps are done, I use SSH from my regular computer.  Linux and Mac have built in SSH clients. I found that MobaXterm is a very nice SSH client for Windows. You could also use PuTTY, but it is somewhat limited. I understand that the PowerShell in Windows 10 has an SSH client, but have not tried that.

So, start by getting your TNC-Pi built and tested. Go through the steps outlined in the TNC-Pi manual to set up and test ax25-tools on your Pi.

One change I made to W2FS's instructions; I named my port wl2k instead of 1. I find that I tend to overlook 1 on some commands, and that field is a text field, so if you have named your TNC-Pi Suzie, then you could call the port Suzie.

Of course, your kissattach command will look slightly different:

kissattach command

You should now be able to do the axcall command outlined in the TNC-Pi documents replacing 1 with your preferred name.


Now that you have your TNC-Pi installed and tested, time to get on with making the Winlink client work.  Download and install the .deb package from
 following the instructions at

You are going to want your web interface to be available all the time. To make that happen, you are going to want to have a dedicated user on the Raspberry Pi. I chose the creative user name winlink.  You will not want to log on to this user once pat is set up.

Log on to the user and type
        pat config
You will enter the editor with the configuration file.  Once you have run pat for the first time, you may instead prefer to edit ~/.wl2k/config.json with your favorite editor.

You need to tell pat what relays you will be connecting to.

Part of config.json
You will obviously need to enter your call.  If you got your Winlink account a while ago, the call and password will need to be in upper case even if you originally provided it in mixed or lower case.

The "http_addr" is significant. In most cases you will probably be using an IP address assigned by your router. You can use ifconfig to determine this number.

In this example, your "http_addr" line might look like:
    "http_addr": "",
Depending on your router, you maybe able to cause the router to assign a specific address to the Pi's MAC address, shown as "ether" above. This number is unique to every device.

Depending on your LAN, you might be able to assign a friendlier name to that address.  In my case, I called it "pat01".  This name or address must match what address you give your browser.  In this case, you might expect I could connect with but in fact, pat won't answer to that address, even though it is the Pi's address.

The aliases are optional, but they will appear in the (select alias)  menu when you connect.  For an RMS you can reach directly, the format is:
If you need to use a digipeater
You may add multiple digipeaters, but you are likely to get timeouts with more than one.

Once you have saved the config file, type
    pat http
and return to your "normal" computer, leaving pat running on the Pi.

Using pat

Open your web browser, and type the address in the "http_addr" line into the web browser's address bar.  You should see something like:

pat - nothing in inbox

If you do not have a Winlink account, leave the password blank, and then simply connect and not send a message. Then connect again and you will receive a message with your Winlink password. Put that password in your configuration.

Now, to prove we have a working pat, let's send ourselves a Winmail message using the Internet.  Click on Action, then Compose...

You will see the compose a message dialog:

 Put your call into the To: box and formulate a dummy message.  Click on Post to post the message to the Outbox.

Next, select Connect... from the Action menu. The sending dialog will appear:

Choose telnet from the (select alias) menu then click Connect. You will see some activity in the black area at the bottom of the window. It should end up something like:

Any messages in your Outbox will be sent to the server.

Now connect again, and your message should be seen in the Inbox.

Setting pat to start automatically

Now that we have it working, we would like it to start on boot so that we never have to actually log in to the Pi.

If you haven't already, stop pat (with Cntl-C).

Then add the following two lines to the bottom of ~/.bashrc:

    sudo kissattach /dev/serial0 wl2k
    /usr/bin/pat http 

where wl2k is your port name.  If you have an assigned 44.x IP address you may choose that instead of, but since it isn't used in the case, it won't matter. It could be handy, tho, if you log on to the Pi and want to work with a node that supports the Internet Protocol.

At this point you may wish to log off and log back on again to be sure pat starts automatically.  You will need to stop pat in order to log off.

Assuming you installed the default Raspbian distribution, you can do the next steps logged on as the pi user, which is logged on the the graphical console by default.

Edit /etc/systemd/logind.conf. Uncomment the first two lines after [Login] and change both 6 to 5:



Now, cd to /lib/systemd/system/

Copy getty@.service to  pat-winlink.service

    sudo cp getty@.service pat-winlink.service

Edit pat-winlink.service as follows:

     Description=Getty on %I
     Description=Winlink client on tty6

     ExecStart=-/sbin/agetty --noclear %I $TERM
     ExecStart=-/sbin/agetty --noclear tty6 38400 -a winlink
where winlink is the user code you chose to run pat.

At the bottom of the file change


Now you need to let the system know you have messed with these files:
    systemctl daemon-reload

If you have logged off your winlink user, you should now be able to start pat by typing:
    sudo systemctl start pat-winlink
and cause it to start automatically with:
    sudo systemctl enable pat-winlink

You can (and should) check the status of pat with:
     sudo systemctl status pat-winlink

the result should be something like:
pat service status

pat should now start whenever the Pi is rebooted.

Finding an RMS

If you go to you will get a map of RMSs. With the TNC-Pi you will only be able to connect to packet RMSs, so click on the Packet button and zoom the map to the appropriate area:

If you then click on one of the markers, you can see detail about that RMS:

Turn your radio to the desired frequency, put the callsign into the target: box on the connect dialog, and you should be able to send and receive messages over the radio.

If you use an ordinary email address instead of just a callsign, the message will be delivered over email.  You can be reached by email at (your call) if the sender has received a Winlink message from you in the past few months.

Saturday, December 30, 2017

Two Thousand Seventeen

To All ECs adn DECs
Please Forward

As we plummet headlong into 2018, I thought it might be worthwhile to recollect what an amazing 2017 we had, and I am looking forward to an even more exciting 2018.

All our ARES members, and especially our ECs, did yeoman duty this year. We began the year with the news that our Section reported more volunteer hours than any section in the country. I don't know how it will turn out for 2017, but certainly there was a lot of reporting.

A few years back, FEMA asked us for a database on what capabilities we
had at public facilities, and our ECs updated that database this year. In addition, ECs reported how many folks they thought they could
muster in various circumstances and with specific skills. These
reporting tasks may seem mundane, but they are important to understand
so we can plan effectively.

I would like to ask each EC to take on another task immediately. Thank each of your members for their generous service. Those folks often come out for rather boring, but necessary duties. But each and every one is important, and each deserves recognition.

In March and April and again in June we had a number of severe weather events, including flooding in the U.P. and flooding in Central Michigan. In July and August we had additional, but localized, severe weather events.

Folks came out to support numerous walks, runs and other public service events, perhaps most notably the Labor Day Bridge Walk, where members from Luce to Antrim impressed the professionals with the kind of accountability APRS offers.

Besides actual activations, we participated in a large number of drills and exercises. As a Section, we participated in the "Statewide 2017" exercise as well as our annual SET. The SEOC crew additionally activated for three radiological exercises and the 100th anniversary special event station.

We had our first, in-state AUXCOMM class this year, and another planned for the end of January. We also had the first, amateur radio focused MI-CIMS training, and expect to have more in the coming year.

We had an amazing Division convention at MIS, which I hope we can repeat in coming years. Rick Roderick was an amazing speaker, and it was great to see so many folks that we don't get to see so often.

Your SEC followed a number of SEOC activations that ended up not requiring communications assistance, as well as three tabletop exercises.

The Auxcomm Working Group is finishing up the volunteer radio portion of the Michigan Emergency Communications Plan, and will shortly be turning to the Michigan Emergency Management Plan. In addition, we hope to update the rather stale "Michigan ARPSC Guidelines" in the coming year. Further, we will be providing input to the State Communications Interoperability Plan, so we are well entrenched in that state's communications planning. With all this planning in the works, the state is offering the assistance of their planners.

The FEMA Region V Auxcomm Committee has established a region wide frequency plan, and will be documenting activation procedures shortly. If you need assistance from outside the state, look to 60 meters channel 4, if busy, try 5, 1 2, 3 in that order. If conditions warrant, go to 40 meters, 7.180 and up. If Internet is available, look to REF024A on D-STAR (we hope to have a dedicated reflector before too long) or R5AUXCOMM on DMR. Of course, in most cases you will go to the SEOC first and they will make the out of state contact, but you should at least be aware of the frequencies.

So what will the new year bring? We have heard that changes will be coming to ARES, and we will hear more about that at Interop in February. From what we can tell so far, it looks as if those changes will be positive.

As mentioned, we have a number of plans to work on. We will essentially re-run our SET on April 28. We will be working with the state's Training and Exercise Section to include us more meaningfully into the state exercises.

We will be asking the ECs to provide us details of their primary repeater. We have had a questionnaire ready for some time, but we were hitting the ECs with one request after another, so felt it best to hold off. Meanwhile, KE8CRV will be providing us with MI-CIMS boards for that purpose, which should be a lot easier to use.

At the SEOC, we still need to get the Pactor station on the air. The packet station is up, but I hear not working properly, so that is something to investigate. We still need to identify and acquire a new tuner so we can get a power amp on the air. We also plan to have an intercom system so that the place won't be quite so noisy when there are multiple stations on the air, get additional Internet connections into the station, and perhaps move some of the positions a little so the VHF/UHF seats aren't so crowded.

We have some really good presentations planned for Interop. Looking forward to hearing from Mike Horn, Chuck Cribley, Dale Williams, Mike Corey, Ron Peterka and others. it promises to be a very ham-heavy conference.

We had some good success providing a training video on voice communications, and plan to prepare more videos in the future. We have been offered assistance from both the League as well as the state's Training and Exercise Section. We may well incorporate those videos into Mi-Train so that folks can track the videos along with other courses they have taken.

So a lot happened in 2017, and we expect a lot more to happen in 2018.  Again, thanks to all of you for your service and dedication. I may get to schmooze with the bureaucrats, but the folks in the field do all the heavy lifting. Thank you all so much.

73 and Happy New Year

Thursday, September 15, 2016

2016 ARRL Simulated Emergency Test

Over the past few SETs, we have exercised NBEMS, Packet, HF Phone and CW, in one case, even D-STAR.  But it has been quite a while since we tested our bread and butter; VHF/UHF radiotelephone. Indeed, the ability to effectively use phone relays is really key to our ability to respond.

For SET 2016, we will rely on VHF and UHF relays.  We might still use repeaters, providing those repeaters have backup power, but no Internet or telephone linking.  RF linking is OK.

SET 2016 will use a very large Coronal Mass Ejection as the scenario.  A fairly large CME was blamed for a 1989 outage across much of Quebec.  Much larger CMEs occur about once every 100 years, and we are overdue.  A CME similar to one recorded in 1859 would be devastating with today's dependence on technology.

Since a CME produces an HF blackout, Districts that relay on HF for in-District communications will need to come up with another plan.

The SEOC cannot reach Districts 7 and 8 by VHF, so District 3 will have to relay that traffic to District 7; 7 will then relay to 8.

The DECs will act as exercise controllers, providing injects according to a schedule with they already have.  When a DEC has to play, then he will need to select an alternate to act as controller since the exercise controller may not also be an exercise player.

Even though we are simulating a total loss of traditional infrastructure, stations are still encouraged to maintain their station status in the MI-CIMS Station Status Board.

 An incident has been set up for this exercise:
TRN-2016-10-08-ARRL Simulated Emergency Test

The SEOC will send and receive traffic from the Districts on a preassigned schedule. The frequencies are outlined in the 205 on MI-CIMS.  DECs already have this information.

As usual, we have left plenty of time for individual counties to prepare activities allowing them to test those capabilities important to their local jurisdiction.

The 2016 Participant Guide is available here.  Links will be sent to all the ECs around the first of October.  Note that the Controller Guide and Master Scenario Event List are password protected.  Only the Participant Guide is freely available until after the exercise.

Monday, March 28, 2016

Update on SEOC station

(Some of this was posted on Facebook, but not everyone is on FB, and there are some details at the end that weren't in the FB post).
Pretty interesting (and tiring) day at the SEOC Saturday. A group of us were there to install the HF antennas. It was a LOT slower than expected. It took us some time to locate the color codes for the feedlines coming in from outside. We had previously dragged cables inside the Auxcomm room, but the furniture turned out to be not what was expected, so about half those cables still need to be dragged somewhere else.

But the outside cables were an experience. There are 40 cables coming into the building, 13 of which are ours. For some reason the contractors decided to use only two colors of tape on the 23 feedlines from the big tower. So, were there 14 pieces of white tape on that cable or only 13?

Just a few of the incoming cables

We had not previously located the surge protectors for the control cables for the tuners, so we had to tear up even more floor. Of course, that made every step inside something of a challenge.

Things were even worse outside. There was a couple inches of mud over frozen mud, so half the time when you picked up your foot your boot would stay put. The other half of the time you would slide on the frozen ground lubricated by quicksand, so a few times one or another of us would be unable to avoid getting horizontal. Not much fun in that mud, but at least it was soft.

Inside not a lot better. There is a LOT of equipment, most of it not where it belongs. A lot of things I didn't recognize, and things I expected to find I didn't. But we got plenty of exercise carrying heavy stuff around. Do you have any idea what a 50 amp Astron weighs? Or an 87A? There is so much stuff in the room a lot of things we couldn’t find until after we needed them. We kind of cobbled up end insulators, and Bob found a center insulator, but it turns out there was a box of insulators, baluns, pulleys, other antenna stuff hidden under boxes of power cables.

In the end we only got a single antenna up, and we're not all that happy with that one. But we have something for Wednesday, anyway.

A big thanks to WD8BCS, KE8ACA, KC8LTL, and especially K8RDN for some really hard work under very suboptimal conditions. Still plenty of work to do, but I think it is going to have to wait until it gets drier, or colder.
So, remaining work to be done:
  • Move the MARS and CAP feedlines across the room
  • Move the VHF/UHF feedlines down one slot
  • Get holes drilled in the blue workspaces
  • Finish moving the equipment to the proper slots
  • Locate CAP and Trbo radios
  • N connector on CAP feedline under floor
  • Might need connectors both ends of Trbo feedline
  • Get Fred or Jeff to program Trbo radio
  • Arrange some sort of mount for VHF heads
  • Set up packet station
  • What is the deal with the tuners?
  • Get correct wire antennas in place once the ground is firm
  • Set up Pactor station. May want to chat with WB2FTX on the best way to set up the software.
  • get power to the digital position
  • Build or acquire cabinets or shelves for storage
Lots of work to do, a few areas of concern:
  • Not real sure what power supplies are what, and if we have enough.  Seems like there is a bunch but it gets skinny when you start assigning them
  • The tuners appear to be only for long wires.  Not clear that they will work for the G5RV antennas.  We do have some 4:1 baluns that might work OK for CW (the radio has a built in tuner), but for Pactor that will limit us for the time being (will have to use a manual tuner so we won't be frequency agile unattended).
  • We need to upgrade the tuner on the loop so we can use the Alpha.
  • We probably need some lessons on the Alpha
  • We definitely need some lessons on the MotoTrbo
 In addition to this, the MARS and CAP stations are pretty much untouched.  There is a CAP VHF antenna and feedline, and feedlines and towers for MARS, but not much else has been done.

Sunday, March 6, 2016

2015 Overview

Sorry this is so long in coming.  But probably worthwhile to review 2015.

First, and most importantly, Michigan ARES members reported over 100,000 volunteer hours in 2015, with a volunteer value of almost $2MM.  Emergency Coordinators reported 202 planned incidents (walks, runs, etc.) and 119 unplanned.  Included in the unplanned were 41 SKYWARN activations, 28 Search and Rescue outings, 6 power outage and 5 fire responses.

Hours contributed in direct emergency response have fallen slowly over the past few years, but that has more than been made up for in drills, exercises and other preparedness work.

In terms of statewide exercises and preparedness, in 2015 we participated in the statewide tornado drill in April, the Northern Exposure exercise in June, an improvised nuclear device seminar also in June, a radiological awareness workshop in August, an exercise involving the alternate SEOC in September, the D.C. Cook nuclear plant series of exercises in September and October, and the annual Training and Exercise Planning Workshop (T&EPW) in November.

Last year our annual Simulated Emergency Test was built around a zombie apocalypse.  Participants made heavy use of NBEMS and some use of D-Star.  Counties sent their ICS-205 forms to the state reflecting the disruption to communications caused by a zombie outbreak, and were reminded of the importance of keeping their 217A up to date, and of the utility of the 201 and 202 when things go south.

In 2015 the SEC took the FEMA Auxcomm class, and co-authored an updated Amateur Radio Emergency Service manual.  The state's Interoperable Communications Board named the SEC and Marc Breckenridge, the EMC for Washtenaw County, as co-chairs of an Auxcomm working group.

One of the more fun bits as we headed toward the new year was wrapping up construction of a new state EOC.  The ARES/RACES station will feature a full size 160 meter loop for phone, G5RVs for CW and Pactor, and a 150 foot tower housing our VHF and UHF antennas.

All in all, a pretty good year last year.

Friday, August 29, 2014

SET 2014

Some years back we made the decision to use SET as an exercise, rather than a contest.  At that time Michigan was routinely on top of SET scores across the nation.  While the contest flavor did encourage interest, it did little to help us improve.

We moved to making SET an exercise, and while many jurisdictions submitted their Form A (or Form B for nets) to the League, the makeup of the SET did nothing to encourage high scores, instead focusing entirely on our need to improve skills and identify weaknesses.

In the wiki to collect input for the 2014 SET, there were some comments about scoring to encourage local jurisdictions to engage in some activities locally that could be useful in the event of an incident.  The idea of having our own scoring system is interesting.

This year for SET we are going to try a combined score sheet that includes the ARRL scoring categories, as well as a few categories where previous exercises have indicated a need to improve.

Michigan Form A

The above image shows a first draft.  Because some categories are somewhat population dependent, the Michigan score will be partially scaled based on the population of the jurisdiction.  Most categories, tho, are not affected.  For example, whether or not you activated based on a written plan (something that was a clear issue in the Spring tabletop), has no relationship to population.

It is not clear at this time whether the ECs will be given blank spreadsheets to report or whether we will provide a web page for input.  In either case, reporting to the League is still encouraged.

The October 4 scenario will be similar to what we actually experienced this Spring; severe cold and widespread flooding.  We will be focusing on digital and simplex, and again will encourage the use of MI-CIMS.  DECs will be getting more details shortly.

And once again, the Section component should be a small portion of your local activities.  Each EC should evaluate the needs of the jurisdiction and prepare local activities the reflect those needs, but still attempt to tie into the State scenario.