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.
Further information about the modems themselves may be obtained from the
Baycom Web site.
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:
Prompt for development and/or incomplete code/drivers [Y/n]
Radio network interfaces (CONFIG_NET_RADIO) [N/y/?]
BAYCOM ser12 and par96 kiss emulation driver for AX.25 (CONFIG_BAYCOM) [N/y/m/?]
A configuration utility is available available from Thomas Sailer's home page. The setbaycom utility allows you to configure multiple Baycom devices. If you intend to do this then you should obtain it and install it.
To compile and install, do the following:
# cd /usr/src
# tar xvfz baycom.tar.gz
# cd baycom
# make
# make install
/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 51 0
# mknod /dev/bc1 c 51 1
# mknod /dev/bc2 c 51 2
# mknod /dev/bc3 c 51 3
You will use these later. If you installed the setbaycom utility then
this will have been done for you.
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-51 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. The setbaycom utility allows you to configure multiple Baycom devices.
The command line arguments needed are identical to those you'd supply to the module if you were configuring just a single device. For example, to configure both of the devices presented above you would use the commands:
# setbaycom -i /dev/bc0 -p ser12 0x3f8 4 1
# setbaycom -i /dev/bc1 -p par96 0x378 7 0
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
/etc/ax25/axports
file. The only difference is that you would
use the device /dev/bc0
instead of /dev/ttyS0
.