Categories
amateur radio

Did it just get a little more nerdy in here?

VA3PID-eQSL-eWAS-PSK-20131014Aw yiss! After more than two years of trying, I finally got a confirmed contact in North Dakota last night. That means I’ve now worked all of the US states using the PSK digital mode. Yay me!

I’d contacted 47/50 within a few months of getting my licence, including Maine. Utah I spoke to in November 2011, South Dakota in January 2012; but the last one, North Dakota, I didn’t pick up until last night. I was just about to turn off the radio for the night when I have 40m a try, and there was Bill (ND0B) calling from Cathay, ND. Sometimes you find what you’re looking for without even trying. Happy Thanksgiving!

Categories
amateur radio

VA3PID is back on the air!

ScreenShot-2013-10-03-19.13.12Got my radio back on the air after six months off. I’d decommissioned the ancient ThinkPad that spoke to the radio, and hadn’t worked out what I’d needed to get it running with the MacBook. All it took was a FTDI-based USB to serial converter for the RigBlaster Pro’s PTT line control, and all works perfectly!

Categories
computers suck

learning to tolerate python

Python is okay, I guess, but there’s not a hint of music to it. I’m a dyed-in-the-wool Perl programmer since 4.036 days. When I think of how I’ll solve a programming problem, I think in Perl (or, more rarely, in PostScript, but I really have to be pretty off-balance to be thinking in stacks). I’m learning Python because all of the seemingly nifty open source geospatial software uses it, and if I’m to write anything for or about the Raspberry Pi, it seems that Python is the language they officially support on it.

So I’m learning Python by porting some of the simple Perl tools I use around here. It’s painful, not just dealing with the language Fortranesque space-significance, but also physically; I think I put my shoulder out picking up Mark Lutz‘s giant books on Python. The first program I chose to port matches input lines against known words in the system dictionary file. Here’s the Perl version:

#!/usr/bin/perl -w

use strict;
use constant WORDLIST => '/usr/share/dict/words';

my %words;
open(WORDS, WORDLIST);
while () {
    chomp;
    my $word  = lc($_);
    $words{$word}++;
}
close(WORDS);

# now read candidate words from stdin
while (<>) {
  chomp;
  $_=lc($_);
  print $_,"\n" if defined($words{$_});
}

exit;

I most recently used this to look for available call signs that — minus the number — were real words. The input lines from the available call sign list look like this:

VA3PHZ
VA3PIA
VA3PID
VA3PIF
VA3PIH
...

so if I strip out the 3s and run it through the program:

sed 's/3//;' va3_avail.txt | ./callsigncheck.pl

I get one hit: vapid. Which is now my call sign, VA3PID. Moohah.

The Python version is much shorter, and I’m semi-impressed with the nifty little trick in line 5 (aka ‘dictionary comprehension’) which offers some hope for the future of terse, idiomatic code. The fileinput module gives Perlish stdin-or-ARGV[] file input, without which I’m sunk.

#!/usr/bin/python
import fileinput                        # Perl-like file input

# get our wordlist
words={w.lower(): 1 for w in open('/usr/share/dict/words', 'r').read().split()}

# read through input looking for matching words
for l in fileinput.input():
    ll=l.lower().rstrip()
    if words.get(ll, 0):
        print(ll)

(So far, I’ve found the PLEAC – Programming Language Examples Alike Cookbook useful in comparing the languages.)

Categories
amateur radio

Hamvention 2012

So I went to Hamvention for the first time. I knew it was a big deal when I tried to book a hotel a couple of weeks before, and everything within 25km was full. Even my dodgy distant motel was full of hams, and the Perkins next door couldn’t handle the breakfast rush.

Hamvention is huge. Radio amateurs from all over the world come to Dayton to meet, look at the shiny new stuff, buy things they can actually afford, and paw over the junk valuable items in the fleamarket. The fleamarket’s the size of a small European country.

One obnoxious item I must get out the way is the amount of anti-government sloganeering on trucks, shirts and hats. I could do without that. For a hobby that wouldn’t exist without strong government regulation (and users sometimes go crying to government when someone doesn’t play by the rules), anti-government sentiment seems inane. Okay, that’s my rant over.

The fleamarket is basically where a lot of things that really should be snoozing away the millenia in a landfill come out every year to get aired. Sure, there’s some neat stuff in all those stalls, but you’d have to rummage and bargain. I was only there for a day and a half, and I’m trying to cut down on junk, so I was mostly in the fleamarket for the lulz. Here are some of the things I saw:

teletype

A real teletype

tesla coils

Tesla coils

geiger counters

Geiger counters, lots of ’em (all non-functioning)

line launchers

n8prk‘s line launchers. Every few minutes he’d launch a marshmallow, which disappeared into the sky with a satisfying “Foomp!”

cavities and repeaters

Duplex cavities and repeaters. The big tanks at the back are for the 10m band.

too many antennas

Too many antennas, sorry.

enigma machines

Real wartime enigma machines. I think the price sticker said $90,000.

old apple tech

Old apple tech.

compact UHF cavities

Tiny UHF repeater cavities from Paladin RF (aka Honest Bob Morton of Maple Leaf Communications)

nixies!

Nixies!

good stuff, or junk?

Good stuff, or junk?

WB4APR's old school mono solar

WB4APR’s old school monocrystalline solar modules

WB4APR's solar spinny thing

WB4APR’s solar spinny thing

WB4APR's charge socket

WB4APR’s charge socket on his Prius.

WB4APR's prius

Bob WB4APR’s prius. Bob’s quite well known for creating APRS: Automatic Packet Reporting System.

WB4APR's prius

WB4APR’s prius, from the rear.

wire recorder

A wire recorder. Julian Koster would be proud!

old ataris

Old Ataris.

KX-3 is the new hotness

The Elecraft KX3 is the new hotness (if you wear a cap). I had to fight to even get a glance at this thing.

various bugs

Various morse bugs. I ended up buying a Code Warrior Junior.

a very purple Hilberling radio

A very purple (and very expensive) Hilberling radio.

Begali testbed

Begali testbed.

London, Gerry from the Unseen Bean's helper

London, Gerry from the Unseen Bean’s helper. It is good coffee.

tubes

Tubes, or valves.

more tubes

More valves, or tubes.

petrol engine from a Maytag washing machine

Petrol engine from a Maytag washing machine from pre-REA days.

hams dream in heathkit green

Hams dream in Heathkit green.

you couldn't afford a hallicrafters

You couldn’t afford a Hallicrafters then, and you probably still can’t.

too big, and too many solar panels

Too big, and too many solar panels.

civil defence radio

Civil defence radio, basically a 2m AM(?) HT. If anyone says that tubes are better than solid state, show them this.

edison cylinder

An edison cylinder, playing “Blue Ridge Mountains of Virginia”. It sounded good.

yaseu green

Yaesu green

more enigma

More Enigma.

russian data burst encoders

Russian data burst encoders. I remember a news piece on these around 1974; was there a spy bust in the UK then?

two nagras

Two Nagras for Nesey. You might not be able to see the tiny one inside the big one’s case.

too too many antennas

Too too many antennas — don’t be that guy.

QRPme kit

A QRPme kit. I sat in on the QRP session. Interesting, but clutter-inducing. MUST SHUN!!!

QRPme kit 2

QRPme kit 2

QRPme PIC kit

QRPme PIC kit

too many APRS users

Too many APRS users. Seriously, 144.39 sounded like the frog chorus being sick all the time.

I only met one ham I’d worked; Joe (KJ8O) of the Feld Hell Club. I’ve only had my licence for a year, so not really a big surprise. Mad props to Russ of Linux in the Ham Shack for correctly guessing my accent, possibly a first.

I have to say that the event was extremely well organized. They’d teamed up with Dayton Transit to have buses from the free parking to the event. I didn’t have to wait once, though it was clear that most hams aren’t habitual bus riders. I enjoyed my time in the sorrowful midwest; I might go back every other year.

Categories
amateur radio

QRM Cat

Was having a nice chat with Gary, WB0RUR, this morning on 40m PSK-31. His signal was clear, he’s a very experienced operator — yet he was jumping all over the waterfall with every transmission. I couldn’t understand why, but after his signal jumped, stopped, started, moved again, I caught a very brief TX: “QRM … cat

Gary explained:

“Sorry about that … he stepped on the keyboard and stopped my transmission and also bumped the VFO … so I’m probably moving all over frequency.”

QRM would be a great name for a cat.

Categories
amateur radio computers suck

Creating secure digital QSL cards with your LoTW certificate

Hams have sent out QSL cards since the hobby began. It may be less popular than it used to be, because mail seems slow now (especially when QSL bureaux are used), and there are online alternatives like eQSL, QRZ.com, and the ARRL‘s Logbook of the World (LoTW).

LoTW has been criticized for being too complex. It uses an X.509 public key signature to verify your submitted log entries, and a QSL is confirmed when the other party sends in a matching entry. In a way, it’s rather elegant, as the LoTW server does the work of matching the entries, so QSLs “magically” appear in your log. You don’t get a fancy QSL card in the mail or on your screen, and I think a lot of users miss that.

X.509 might be a bit unweildy, but props to ARRL for setting up a industry standard, robust (-ish; X.509 has its flaws), general purpose signing infrastructure. Since other file formats — notably PDF — support X.509 signing, you can use your LoTW certificate to make other data tamper-evident.

Here I document a method of creating a digital QSL card that can be e-mailed, and subsequently verified by the recipient as being legitimate. Any alterations to the file will break the signature, and the file will just appear as a regular PDF (or not display properly). The process can be used to sign any other Acrobat file. There are probably more streamlined ways to do this, but I only came up with it last night as the beginning of a scriptable solution.

You will need:

  • Your ARRL LoTW electronic certificate file. This is called callsign.p12; mine is VA3PID.P12
  • A means of making a QSL card as a PDF fill-in form. I used Scribus; it’s a free but powerful DTP system.
  • Pdftk, “the” PDF toolkit, to apply the QSL details to the PDF form. If you’re on Windows, you might want the Pdftk GUI.
  • PortableSigner, a java application for signing Acrobat files using an X.509 certificate.

(Quite a bit of what follows was learnt from the two pages Your first PDF form with Scribus – Scribus Wiki and filling in forms with pdftk, so thanks to the authors of those for the guidance.)

First, make your QSL card. Since you’re not going to print this, it can be any size you want, but postcard size is standard. At the very least, create spaces for the recipient callsign, the date, the time, frequency, mode used, and signal report.

Under these headings, I’ve made six PDF text form fields. Scribus creates form fields like text frames/boxes. I used plain text fields (which are selected by this icon: ), centred text, and with the name of the field set from the PDF Options → Field Properties context menu. Each field needs a different name. I used callsign, date, utc, mhz, mode, and report.

Save your QSL card as PDF. It might be an idea to check it to see if the form fields are really there and editable:

Now it starts to get really nerdy. Adobe specified the Forms Data Format (FDF) to allow PDF form data to be slung around. FDF looks a bit like PostScript or raw PDF:

%FDF-1.2

1 0 obj
<<
/FDF << /Fields 2 0 R>>
>>
endobj
2 0 obj
[<< /T (callsign) /V (VE3KPK) >>
<< /T (date) /V (2011-10-02) >>
<< /T (mhz) /V (7.03581) >>
<< /T (mode) /V (CW) >>
<< /T (report) /V (499) >>
<< /T (utc) /V (2341) >>
]
endobj
trailer
<< /Root 1 0 R >>
%%EOF

If you think of the T & V values above as Tag and Value, you can see that the file defines callsign=VE3KPK, date=2011-10-02, mode=CW, and so on. This step can be easily scripted. If you’re not sure what the fields are called, pdftk has a “dump_data_fields” option that spits out the field names as plain text.

pdftk is also used to put the data from the FDF file into the PDF template. It’s a slightly hairy command line:

pdftk QSL-blank.pdf fill_form VE3KPK.fdf output QSL-VE3KPK.pdf flatten

Here the source file is QSL-blank.pdf, the FDF data is VE3KPK.fdf, and the output is to QSL-VE3KPK.pdf. The flatten option turns the pdf form into regular, uneditable PDF. (These details are from a real QSO, by the way, and by utter coincidence I’m writing this in a hotel in Ken VE3KPK’s home town in Northern Ontario.)

Checking that this worked in Adobe Reader:

For many people this is probably enough (or perhaps, too much already!) but I really want to have a digital QSL card that will stand up to some scrutiny. This is where your LoTW certificate file comes in.

PortableSigner is a java application for signing PDF files. It seems quite happy signing the files made in this workflow. It can run from the command line, or as a windowed application:

You use your .p12 signature file and its password to sign the PDF. Once the file is signed, you can send it to your contact, and they can prove (and hopefully, any certification/contest agency will agree) that the contact was confirmed.

Viewing the signed document is deeply unimpressive:

It’s not such a big deal that Reader says that “the validity of the certification is unknown”. It’s just that Adobe doesn’t have the ARRL’s certificate loaded into everyone’s reader (what!? mock outrage!) and so it doesn’t match a certificate it knows about. You have to dig a bit deeper into the signature panel to check out who is responsible for this.

Well, that’s a start; at least it was signed by someone with my e-mail address. There’s more under Show Signature Properties:

There’s the ARRL signature in there. Buried deep in another properties tree is my callsign; can’t find it today, but I saw it in there last night. Either way, the digital QSL PDF is now signed and certified that it came from me, as an ARRL LoTW user.

Categories
amateur radio

K3NG Keyer complete

I finally build K3NG’s Arduino CW Keyer and put it in a nice box. Here’s how it looks:

K3NG Arduino keyer, complete

That’s a SparkFun Arduino Project Enclosure with two buttons (one command, one macro), a CW speed control potentiometer, and a simple 3.5mm audio jack for keying the transmitter.

Enclosure base, showing piezo and potentiometer

I’ve glued a cheapo piezo (UHU All Purpose glue is my piezo glue of choice; cyanoacrylate is too brittle) onto the base, and cut a hole in the side for the speed pot. The piezo gives a clear enough side tone that I can copy CW (or Hellschreiber, as before) with audio output into Fldigi. The beeper’s got a fierce third harmonic, but that’s part of its charm. K3NG has a more complex speaker circuit, but this is simple and self-contained.

Enclosure lid, with buttons and resistors

Two momentary switches ($2 from Active Surplus) make up the control interface.

Arduino+Protoboard, and the magic of a 2N2222 switch

The clever bit is an Arduino Duemilanove Uno (my oldest board; it deserves a proper useful home which doesn’t seem to have the serial startup problems my Duemilanove had) with an Adafruit Proto Shield on top. The only “clever” componentry on that is a solitary 2N2222 switching transistor.

It works pretty well. The only thing that doesn’t seem to be stable is the memory button; it seems to choose randomly from any of the first four memories, so I might accidentally send an SK when I meant a CQ. For now, until I work out what’s wrong, I’ll stick to keyboard input of the macros.

Categories
amateur radio

out of my tree

Well, the above may not be the most orthodox antenna placement, but my Maple Leaf Communications Portable J-Pole works a champ when wedged in the tree by our deck. Important reception equipment is here:

I was on two nets tonight; the SARC 2m net and The Mississauga Amateur Radio Club‘s 8:30pm 2m net. I think I’ve got the hang of squelch on the Wouxun now — thanks to Chris and Nick (VE3CLT [of the awesome PC PSU mod] and VE3EBC) for the advice basically to never use CTCSS on a repeater that you’re not 100% sure uses it.

Categories
amateur radio

an expensive hobby

Looks like this amateur radio thing is going to get expensive.

The rig I was looking at — the Yaesu FT-8900R — appeared to be considerably cheaper than all the other multi-band units. It appears that it’s FM only, which is rarely used on the HF bands. The considerably more expensive FT-857D is the cheapest unit that will do 10m/6m/2m/70cm, which I reckon is pretty much where my interest lies.

Then there’s power supplies. Yeah, these beasts need external power supplies. Great big honkin’ 13.8V DC power supplies; about $200 for a rig of this size. Yet more desk space taken up; more cables, more clutter.

If that weren’t enough, there’s the antenna issue. I appear to live in a Faraday cage surrounded by overhead TX lines. Something’s going to have to go on the roof. Well, actually two somethings, as the chance of getting an antenna to work even roughly well on HF and VHF (unless I splash on the expensive and fiddly looking Maldol HVU-8) is close to nil.

So basically, I’m looking to drop a couple of grand on this. Eep.

In better ham news, last night I received my first radiogram, welcoming me to the hobby. Thanks, Paul (VA3PB)!

Categories
amateur radio

the silence of the hams

It’s highly likely I’m doing something wrong, but I’m getting nothing on the 2m & 70cm bands in eastern Toronto of an evening. After a week of dedicated listening, I’ve stumbled upon a couple of nets (one of which I briefly participated in), heard one morning commute chat, noted a couple of dudes talking about power supplies in Portuguese, and managed to key up a repeater which said hello back to me. That’s it.

I’m not expecting the airwaves to be crackling with witty repartee all the time, but most of the time there seems to be no-one out there. Calling CQ on simplex VHF might as well be shouting into a hole.

I know I have a cheapo rig and a flimsy aerial, but I must be able to contact people within the neighbouring kilometres … must I?

Categories
goatee-stroking musing, or something

a ham i am!

I just got my amateur radio license. If you’re unlucky enough to be on the 2m and 70cm bands around Toronto, you may just find me as VA3PID. The 3 is, of course, silent …

I guess that (so far unsuccessfully) futzing around with the small digital transceivers with Arduino made me look up some radio things, then I read this article on MetaFilter. It made me realize that unless new hams get on the air, the hobby will die, and the radio spectrum will be reallocated.

Passing the test wasn’t that hard, but did take a bit of dedicated reading. No morse code is required for the Basic Amateur Radio Operator Certificate, and if you get more than 80% in the multiple choice test, you can use the HF frequencies below 30 MHz. Since the pass mark is 70%, I thought it worth the extra effort.

I slightly overbought on the study materials. I got:

While it’s possible to download the question bank from Industry Canada, or use the quaint Windows-based examiner program, I thought I’d work from a book. Both will likely do pretty well, but neither is perfect:

  • Both books need to work on their proof-reading.
  • Mathematical symbols, superscripts and subscripts are easy to typeset these days. Don’t miss them out.
  • They need to be fully metric, as trying to remember weird factors to convert fractions of a wavelength to feet is annoying. I’m a mid-career engineer, and I’ve never had to use anything but metric.

I passed the exam on Tuesday night, and had my callsign listed by Friday. I have a cheap but adequate Wouxun dual band HT. This should be fun.

Quaint, huh? Industry Canada's Windows-only examiner software