This document describes how to reuse an old computer with a serial Baycom modem or PC-Com modem for a simple console-based Packet Radio Station.
This is a guide for the Radio Amateur trying to find a useful application for some of the old, but not quite obsolete equipment collecting dust in the basement.
This HowTo assumes that its reader has a good deal of knowledge about using and installing Linux software, or at least knows how and where to get help. Basics like how to compile a kernel or how to edit config files are a must and not the scope of this document.
Since the intended hardware may be too slow for a GUI application, this HowTo describes a purely console-based packet terminal.
This document EXCLUSIVELY describes the setup of a PR terminal with the prerequisites outlined in Prerequisites, it does NOT strive to give general information.
This is NOT a replacement for the AX25-HOWTO.
Most of the information in this HOWTO has been tested with the
devices to which I have access and have proven useable.
This document is copyright © 2004 Michael Hofmann.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation. The full text of the license can be found at http://www.gnu.org/copyleft/fdl.html
What you need to start. Note that if you want to use different components, like a different OS, kernel, modem or even a different PC or serial port, you are on your own.
No other components than outlined here have been tested.
I have used the 2.2.25 kernel, which is the latest to date (Jan. 2004) and probably will be forever, since the 2.2 branch has been abandoned in favour of the 2.4 and 2.6 kernels.
If you are using the RH stock 2.2.14-5.0 kernel and something doesn't work, you are on your own.
The most relevant options for our AX.25 configuration are:
Loadable module support --->
[*] Set version information on all module symbols
...
Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
...
General setup --->
...
[*] Networking support
...
Networking options --->
<*> UNIX domain sockets
...
[*] TCP/IP networking
...
Amateur Radio Support --->
--- Packet Radio protocols
<M> Amateur Radio AX.25 Level 2 protocol
...
--- AX.25 network device drivers
<M> BAYCOM ser12 fullduplex driver for AX.25
<M> BAYCOM ser12 halfduplex driver for AX.25
|
While the kernel compiles, install the RPMs listed under
Software, starting with libax25 to provide dependencies.
Note that we are using these RPMs even though newer tarballs are available because some of those tarballs do not compile on stock
Edit /etc/conf.modules so that kmod, the kernel module loader, knows which modules are required:
alias bcsf baycom_ser_fdx alias net-pf-3 ax25 |
# port callsign speed paclen window description 1 <YOUR_CALLSIGN> 1200 255 3 Baycom_modem |
portname - is a text name that you will refer to the port by. callsign - this is obvious. baudrate - is the speed at which you wish the port to communicate with your modem. paclen - is the maximum packet length you want to configure the port to use for AX.25 connections. window - is the AX.25 window (K) parameter. This is the same as the MAXFRAME setting of many TNC's. description - is a free-form description of the port.
Now copy the "startbaycom" script to /usr/local/bin and make it executable. You need to modify the script by adding your callsign.
#! /bin/bash # setserial /dev/ttyS0 uart none # this frees the serial port for the packet driver sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4 # load the driver and set parameters sethdlc -i bcsf0 -a txd 200 slot 100 ppersist 40 # set the channel access parameters ifconfig bcsf0 hw ax25 <YOUR_CALLSIGN> up # assign your callsign ifconfig bcsf0 192.168.13.13 # assign an arbitrary IP address echo 100 > /proc/sys/net/ax25/bcsf0/t2_timeout # set T2 |
Not yet written.
Back to IndexIf everything went well, your system is now already capable of receiving packet traffic. Just execute "sethdlc -i bcsf0" and watch what is going on. Abort with Ctrl-C.
The ax25-apps provide two very basic test tools that are ideally suited to get a quick insight.
From the ax25-tools package, there is
| Start LinPac as root or you may not have access permission to the baycom driver. |
| Make sure to read the LinPac manual, for you have to edit several files before you can use it, at least station.data, init.mac and info.mac. Also note that you have to restart linpacd after editing the files so that the config files are effective. |
Information on Baycom hardware is available at the Baycom web site.
If you get bad connection quality with lots of rejected packets, you may need to set the modulation level (on the mic line) on your modem. John Ackermann has a web site describing various ways how to get good results.
You may also need to finetune some of the parameters in /proc/sys/net/ax25/bcsf0. These are run-time configurable kernel parameters that you can write to with the "echo" command. See next chapter.
You may also need to change some channel access parameters, see below. The sethdlc man page is a good source of information for this.
Don't forget to do a "depmod -a" if you want to use newly compiled modules without rebooting.
Check your path settings ("echo $PATH") if programmes are not found.
If you need further help, you may want to check the archives of the rec.radio.amateur.digital.misc Newsgroup or post your question there.
The kernel allows you to change many parameters at run time. The contents of the files in the /proc/sys/net/ax25/bcsf0 directory each represent one configured parameter. Here is a brief description:
| Filename | Values | Default | Meaning |
|---|---|---|---|
| ip_default_mode | 0=DG 1=VC | 0 | IP Default Mode |
| ax25_default_mode | 0=Normal 1=Extended | 0 | AX.25 Default Mode |
| backoff_type | 0=Linear 1=Exponential | 1 | Backoff |
| connect_mode | 0=No 1=Yes | 1 | Connected Mode |
| standard_window_size | 1 .. 7 | 2 | Standard Window. The maximum number of unacknowledged transmitted frames. |
| extended_window_size | 1 .. 63 | 32 | Extended Window |
| t1_timeout | 1s .. 30s | 1000 (10s*100) | T1 Timeout. How long to wait before retransmitting an unacknowledged frame. |
| t2_timeout | 1s .. 20s | 300 (3s*100) | T2 Timeout. The minimum amount of time to wait for another frame to be received before transmitting an acknowledgement. |
| t3_timeout | 0s .. 3600s | 30000 (300s*100) | T3 Timeout. The period of time to wait between sending a check that the link is still active. |
| idle_timeout | 0m or greater | 20m | Idle Timeout. The period of time a connection can be idle before we close it down. |
| maximum_retry_count | 1 .. 31 | 10 | N2. How many times to retransmit a frame before assuming the connection has failed. |
| maximum_packet_length | 1 .. 512 | 256 | AX.25 Frame Length |
# cat /proc/sys/net/ax25/bcsf0/t2_timeout 300 # echo 100 >/proc/sys/net/ax25/bcsf0/t2_timeout # cat /proc/sys/net/ax25/bcsf0/t2_timeout 100 |
Shortening the max packet length gives better results in flaky conditions because there is less time for the packet to be corrupted in. I'd accept the default settings as they appear in the proc filesystem, set standard_window_size at 1 and thats it.
The txdelay (txd) sets the transmitter keyup delay time. This is the time the transmitter needs to switch its PA on and for its frequency synthesizer to settle. Typical values for a handheld transceiver are 200ms (i.e. 20), and for a good crystal driven transceiver 20ms (i.e. 2). The txtail sets the time PTT is held after the last packet. Do not set this value to 0. Most modems need some extra time to actually clock the last bits out to the transmitter. The slottime (slot) parameter specifies how often the channel access algorithm is executed. Unless you have very specific requirements, set this to 100ms. The ppersist sets how "eagerly" the station starts to transmit as soon as the channel gets free. The optimum value is 256 divided by the number of stations on the channel. Default is 40.
Ensuring that the TXDelay and TXtail is both long enough and short enough is also important. I remember setting my TXD by changing the number dynamically as a ping job was in progress, then adding about 10% when errors occurred.
My old IC2A used to run at around 30mS but an older relay based XTAL clunker needed 400mS. If you think it maybe a problem (and remember that the time also helps the other guy's squelch open) set it to something ridiculous like 1 second and see if the throughput improves.
Check out the AX25-HowTo for more information. But beware and take a good deal of scepticism with you when reading it, because some of the information therein is outdated or not applicable to our setup.
For more ham radio or packet software, point your browser to http://radio.linux.org.au. The Hamsoft Linux Ham Radio Applications and Utilities Database attempts to maintain a complete list of amateur radio related
applications for Linux.