Over a million developers have joined DZone.

Amateur Radio Homebrew [Snippet]

DZone's Guide to

Amateur Radio Homebrew [Snippet]

What's better than a radio? A radio with social networking integrated. Make it yourself with a Raspberry Pi and a bit of JavaScript courtesy of Node.js.

· IoT Zone ·
Free Resource

I’m putting something together for our River City Amateur Radio Comms Society homebrew show 'n' tell later this year. Here are my ingredients so far:

I’m thinking of building a bridge between Amateur Radio Packet and social networking, like Twitter.

So far I’ve roughed out Node.js-to-Twitter integration using node-oauth, and I’ve put together a simple prototype using the node-ax25 library to connect to the KISS virtual TNC on Direwolf. It receives packets and writes callsigns and messages to the console.

Right now, I’m testing this on a PC running Debian, with a Rigblaster Plug n Play connected to an Icom 880h. Later when my TNC-Pi arrives, I’ll migrate this to the Pi.

So far, using the node-ax25 library looks pretty easy. Here’s some code so far to dump received callsigns to the console:

var ax25 = require("ax25");

var tnc = new ax25.kissTNC(
    {   serialPort : "/dev/pts/1",
        baudRate : 9600

    function(frame) {
        //console.log("Received AX.25 frame: " + frame);
        var packet = new ax25.Packet({ 'frame' : frame });
        console.log(new Date() + "From "
            + formatCallsign(packet.sourceCallsign, packet.sourceSSID)
            + " to "
            + formatCallsign(packet.destinationCallsign, packet.destinationSSID));

        if(packet.infoString !=""){
            console.log(">  " + packet.infoString);

 * Formats a callsign optionally including the ssid if present
function formatCallsign(callsign, ssid){
    var formattedCallsign = "";
    if(ssid == "" || ssid == "0"){
         formattedCallsign = callsign;
        formattedCallsign = callsign + "-" + ssid;

   return formattedCallsign;

The output for  received messages so far looks like this:

Wed Apr 19 2017 23:10:00 GMT-0700 (PDT)From KBERR  to KJ6NKR

Wed Apr 19 2017 23:12:05 GMT-0700 (PDT)From AE6OR  to BEACON

>  ¤¤@à¤@@`¤¤@`²@`¨@`¨@aðHello from 5W Garage packet node AUBURN 73's Steli !

Wed Apr 19 2017 23:12:08 GMT-0700 (PDT)From AE6OR  to BEACON

>  ¤¤@à¤@@त@à²@`¨@`¨@aðHello from 5W Garage packet node AUBURN 73's Steli !

Wed Apr 19 2017 23:16:49 GMT-0700 (PDT)From K6JAC -6 to ID    


Wed Apr 19 2017 23:19:31 GMT-0700 (PDT)From K6WLS -4 to ID    

>  Network Node (KWDLD)

Wed Apr 19 2017 23:19:50 GMT-0700 (PDT)From NM3S   to BEACON

>  Mike in South Sac.  Please feel free to leave a message. 73's

iot ,raspberry pi ,node.js ,social network integration

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}