Thomas Sailer, <sailer@ife.ee.ethz.ch>
, despite the popularly
held belief that it would not work very well, has developed Linux support for
Baycom modems. His driver supports the Ser12
serial port,
Par96
and the enhanced Par97
parallel port modems.
When the driver is running it follows the standard of looking like a KISS interface, so you treat it in much the same way as you would the PI card, PacketTwin or SCC driver ports.
The driver is only available as a module, so you must have compiled module
support into your kernel, and also selected the appopriate options to support
the Baycom driver during the make config
stage when compiling your
kernel.
The relevant options that you must answer `Y
' for are:
Radio network interfaces (CONFIG_NET_RADIO) [N/y/?]
BAYCOM ser12 and par96 kiss emulation driver for AX.25 (CONFIG_BAYCOM) [N/y/m/?]
/dev
device files.The Baycom driver uses special device files in the /dev
directory.
You need to create these manually. The following commands should work ok
for you:
# mknod /dev/bc0 c 60 0
# mknod /dev/bc1 c 60 1
# mknod /dev/bc2 c 60 2
# mknod /dev/bc3 c 60 3
You will use these later.
When the kernel compilation is complete and you have installed the module
baycom.o
wherever you normally keep your modules (conventionally
they are stored in /lib/modules/2.0.0/
), you must start the module.
The module takes configuration paramters from the insmod command
line, so you must start it manually from an rc file or if you use
the kerneld program you must configure it with the relevant paramters
so that it supplies them when it loads the module.
If you use kerneld you will need to add the following line to your
/etc/conf.modules
file:
alias char-major-60 baycom
There are four main items to specify when loading the module, they are:
the baycom modem type you are configuring it for.
the i/o address of the serial or parallel port you will use.
COM1:
COM2:
LPT1:
LPT2:
the Interrupt Request (IRQ) line your port will use.
COM1:
COM2:
LPT1:
LPT2:
some baycom specific options.
use hardware generated DCD signal.
use software DCD signal.
Because the Baycom driver uses the serial and parallel ports of your machines,
and because it is a low level driver for these, it competes with the existing
serial and parallel drivers in the kernel. There are some ways of working
around this problem. The first way is to make sure that you load the Baycom
module first so that it takes the hardware it needs before the serial or
parallel device driver modules load and search for their own. With the serial
driver you have the luxury of being able to disable it for a single port
using the setserial command, this will be demonstrated in the
examples. If you are using the parallel port modems then beware of the
lp.o
Line Printer and plip.o
Parallel Line IP modules.
These examples are for the two most common configurations.
Disable the serial driver for COM1: then configure the Baycom driver for a Ser12 serial port modem on COM1: with the software DCD option enabled:
# setserial /dev/ttyS0 uart none
# insmod baycom modem=1 iobase=0x3f8 irq=4 options=1
Par96 parallel port type modem on LPT1: using hardware DCD detection:
# insmod baycom modem=2 iobase=0x378 irq=7 options=0
The first device created is /dev/bc0
, the second is /dev/bc1
etc.
Using the insmod program and its command line arguments you can only configure one Baycom modem. There is a setbaycom utility which I have not yet located that will allow you to configure others. If you happen to find it please let me know where it is kept so that I can include details for it here.
This device driver when loaded looks like a serial tty driver with a KISS
TNC attached. This means that configuration of the AX.25 software for this
driver is identical to the configuration for a KISS TNC presented earlier.
You need to use the axattach program and add the port to your
/usr/local/etc/axports
file. The only difference is that you would
use the device /dev/bc0
instead of /dev/ttyS0
.