So, after a few years I’m getting back into Amateur Radio. I’m not so much interested in talking on the radio - but getting back to packet radio.
I thought I’d take a look around and see what the status of packet radio was these days. There’s things that I’ve always wanted to do - like building my own 2m radio with an interface to remote control it. Building my own packet TNC. Building some kind of portable packet system that I could use for field day or take to Dayton or something.
I don’t see much use for packet other then position reporting. I would REALLY like for someone to tell me I’m wrong and give me a use for it. I don’t see many services out there for packet radio.
So, for now - I’m just playing to see what I can get it to do. And, eventually I’ll get the bike setup with a packet system - at least a tracker. I’m thinking though that I may go all the way and do a portable i-gate.
Some things I’d like to get working with this..
- digipeater
- i-gate
- ax.25 connections from linux
- IP over ax.25
- ping and telnet to a linux box over ax.25
Current status
As of right now, I have two “nodes” setup. One is based on my old Kenwood TH-D7a radio using the built-in TNC. This is pretty weak and can’t really connect to much of anything else. The second node is based on a KCP-3+ and a Kenwood TM-251 mobile radio. This one can get out pretty well.
Both are using older Raspberry Pi B’s. I didn’t really have too many problems getting them setup. The biggest issue was figuring out how to get the TNC in the HT-D7a to operate in KISS mode.
I still have some more testing to make sure things are working as I expect them to. I think they are, but I want to amek sure. So, my plan is to use the TH-D7a node to test access and reporting through the TM-251 node. I want to test both digipeating as well as two way i-gating.
I’ve connected back and forth between them. I will post more after I do my detailed testing.
How-to
ax.25 Interface configuration
Essentailly the ax25 interface is like any other interface in your linux box. You run other protocols on top of it. I haven’t dug into how IP works - for instance, how it determines what callsign (like a MAC address) is mapped to an IP address.
We have to configure the interface and then start it. You configure it thorugh the /etc/ax25/axports file. This file describes the system parameters of the interface. We will define the physical port and settings when we attach the interface.
One thing I’m not yet clear on is the reason we need the callsign here on the system level. ax25d.conf appears to use the port specified in the /etc/ax25/axports file. However, you can specify another callsign when using broadcast or ax25_call. So, maybe my testing will help figure that out.
1 2 |
|
This configures the interface side of things. Then we need to attach the TNC to create the interface. This is done with the commands. The first does the attach - this connects the TNC on /dev/ttyUSB0 to the “2m” port in the axports file.
The params commands set different timing parameters. After some digging I found the paramters are as follows:
- -r - persist - The next byte is the persistence parameter, p, scaled to the range 0 - 255 as a percent. 100%=255.
- -s - slottime - How long it waits after detecting a busy “line” before checking the percentage chance on the persistence setting.
- -l txtail - How long do we hold up the transmitter after we send.
- -t - txdelay - How long after bringing the transmitter up do we wait before sending data.
1 2 |
|
Automated start up of the ax25 interfaces
I’ve adapted some scripts that I found out on the internet. I simplified them somewhat and got them configured to startup properly for my system. Here are my files:
This file brings up the ax25 interfaces
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Stopping the interfaces is pretty easy. Just kill off the kissattach commands.
1 2 3 |
|
You can run these scripts with their full pathnames /etc/ax25/ax25-up to start and /etc/ax25/ax25-down to stop. We need an init.d script to call them on start up and shutdown.
I then used update-rc.d ax25 defaults
to configure the rc.d links
to auto start the interfaces. One note, the name is ax25ifs. By adding
that to the Required-Start of other services (such as aprx) it will
properly order the startup/shutdown scripts in /etc/rc[0-6].d.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
axlisten Tests
Once you have the interface configured, you can start a program called axlisten to dump all the packets recieved on that interface. Here’s the command and a sample:
1 2 3 4 5 6 7 8 9 10 |
|
beacon Tests
Now we transmit. I started an ax25listen going on the 2 meter port of one packet station and then sent a beacon from the other.
1
|
|
1 2 3 |
|
mheard Logging
I’m starting the mheard daemon to collect the call signs that I hear.
I just went out and grabbed a generic Debian init script and edited it.
I then ran update-rc.d mheard defaults
and it starts automatically.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
ax25_call test
Once I got everything connected for the KCP-3 plus, I used the Raspberry Pi and TH-D7a (in KISS mode) to connect to the KPC-3. I did this through the linux command line. The KCP-3 answered in “keyboard to keyboard” mode. So, I was able to type back and forth. The connection showed up in netstat in linux as expected.
1 2 3 4 5 |
|
References
http://www.nq0m.com/2012/09/03/aprs-i-gatedigi-with-my-new-raspberry-pi/ http://k4gbb.us/docs/StartingAX25.html <- Config stuff http://k4gbb.us/docs/StartingAX25.html <- Startup scripts