Raspberry Pi

Further to an ealier post about packet radio on a Raspberry Pi, I have been presuaded to give a talk to my local Amateur Radio Club on the Rasperry Pi and radio so I’m pulling my finger out and getting things sorted. If I can get it working the final demo is hoped to be using packet to pass messages to a Pi controlling an electric wheelchair that I’ve been tinkering with for far too long.

TNC-PiSomeone pointed me in the direction of the TNC-Pi project which looked superb, so I had to go and buy one. After a relatively straightforward build, it worked first time, although it was slightly uncomfortable not being able to follow my normal ‘baby steps’ approach to testing – you had to go for broke and hook up a radio and try and start decoding packets – I couldn’t find a way to get any responses from the TNC otherwise. Is this because it runs KISS rather than traditional TNC firmware as my Tiny-2 does?

Incidentally, I did almost choke when reading through the TNC-Pi instructions and came to the bit about xastir and found I’d got a namecheck for another post!

Anyway, so far it does exactly what it says on the tin, and I had my first QSO (with myself) at the weekend between two Pis – one with the TNC-Pi the other with a Tiny-2. I also managed to get a shell login over packet which was neat (too geeky for me) but that might be running before I can walk.

I have a week left to complete my presentation – will hopefully post something here when it’s done, I’m now reading up on the finer points of AX.25, and getting stuff worked out in a nice ordely progression.

I’ve just got hold of a Raspberry Pi, and my first thoughts were that it would be interesting to try to get a nice packet radio station working without the overhead of a full computer running it. I’ve experimented in the past with linux based systems but not progressed too far. I regret missing the popular period of packet, which seems to have died in the Internet age, but suspect that there might be some latent interest such as mine with a bit of encouragement.

Prepare your Raspberry

Basic setup following recipe from I used Win32DiskImager and a Kingston 16GB ultimate 100X Class 10 card I would then advise tidying things up following It’s then always good practice to update aptitude and upgrade any packages:

sudo apt-get update
sudo apt-get upgrade

The upgrade command will likely take some time as it recompiles all the upgraded packages, but you’ll be left feeling warm and fuzzy that everything is bang up to date.

Prepare the TNC

To start off with I’m using a hardware TNC and may progress to using soundmodem and a USB soundcard later.

I have a PacComm Tiny-2 Mk2, and I have previously made interface cables for a variety of radios, I also have RS232 cables to connect to PC. Google will help if you need it here.

To confirm everything is working, connect a PC to the TNC, then using a terminal emulator such as Putty check that the radio and TNC are working correctly. When the TNC is powered on you should see a stream of boot text, and you should be able to enter commands to set callsign etc. With the radio tuned to the 2m APRS frequency 144.800MHz you should hopefully see some APRS data packets coming in.

Raspeberry RS232 interface

The UART pins on the GPIO header are at TTL levels and need converting top be able to be used as an RS232 interface. The device for the job is a MAX3232CPE which is  a variant of the MAX232 serial buffer which tolerates 3.3v inputs.

I found a neat shortcut to building my own interface circuit was to buy a ready-made board from eBay – part no JY-R2T it comes complete with 9pin D connector, activity LEDs, a header connector and a short cable that allows you to plug in to the relevant pins on the Raspberry – perfect!

Connections for my interface board to the GPIO header are:

(GPIO)          (MAX3232 interface)
Pin 1 (3.3v) -> VCC
Pin 6 (0v)   -> GND
Pin 8 (TxD)  -> TXD
Pin 10 (RxD) -> RXD

The Debian image we installed will have the UART configured to provide a console on the serial port – we want to be able to use it for our own purposes. If you followed the second Drogon recipe above, we have already commented out the getty line in /etc/inittab, but we also need to change /boot/cmdline.txt – remove the parameters ‘console=ttyAMA0,115200 kgdboc=ttyAMA0,115200’ and reboot.

Finally, for testing the interface, let’s install a terminal emulator and connect to our TNC or a PC running Putty. For the PC a straight pin-pin male-female 9 pin d cable should work. Connecting the Raspberry to the TNC with my serial interface board required a crossover male – female cable where tx and rx lines cross.

sudo apt-get install minicom
minicom –b 9600 –o –D /dev/ttyAMA0

If all goes well, you should have the same console access to the TNC that you had with Putty under Windows.