Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 ===============================
0004 Linux Drivers for Baycom Modems
0005 ===============================
0006 
0007 Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch>
0008 
0009 The drivers for the baycom modems have been split into
0010 separate drivers as they did not share any code, and the driver
0011 and device names have changed.
0012 
0013 This document describes the Linux Kernel Drivers for simple Baycom style
0014 amateur radio modems.
0015 
0016 The following drivers are available:
0017 ====================================
0018 
0019 baycom_ser_fdx:
0020   This driver supports the SER12 modems either full or half duplex.
0021   Its baud rate may be changed via the ``baud`` module parameter,
0022   therefore it supports just about every bit bang modem on a
0023   serial port. Its devices are called bcsf0 through bcsf3.
0024   This is the recommended driver for SER12 type modems,
0025   however if you have a broken UART clone that does not have working
0026   delta status bits, you may try baycom_ser_hdx.
0027 
0028 baycom_ser_hdx:
0029   This is an alternative driver for SER12 type modems.
0030   It only supports half duplex, and only 1200 baud. Its devices
0031   are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx
0032   does not work with your UART.
0033 
0034 baycom_par:
0035   This driver supports the par96 and picpar modems.
0036   Its devices are called bcp0 through bcp3.
0037 
0038 baycom_epp:
0039   This driver supports the EPP modem.
0040   Its devices are called bce0 through bce3.
0041   This driver is work-in-progress.
0042 
0043 The following modems are supported:
0044 
0045 ======= ========================================================================
0046 ser12   This is a very simple 1200 baud AFSK modem. The modem consists only
0047         of a modulator/demodulator chip, usually a TI TCM3105. The computer
0048         is responsible for regenerating the receiver bit clock, as well as
0049         for handling the HDLC protocol. The modem connects to a serial port,
0050         hence the name. Since the serial port is not used as an async serial
0051         port, the kernel driver for serial ports cannot be used, and this
0052         driver only supports standard serial hardware (8250, 16450, 16550)
0053 
0054 par96   This is a modem for 9600 baud FSK compatible to the G3RUH standard.
0055         The modem does all the filtering and regenerates the receiver clock.
0056         Data is transferred from and to the PC via a shift register.
0057         The shift register is filled with 16 bits and an interrupt is signalled.
0058         The PC then empties the shift register in a burst. This modem connects
0059         to the parallel port, hence the name. The modem leaves the
0060         implementation of the HDLC protocol and the scrambler polynomial to
0061         the PC.
0062 
0063 picpar  This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
0064         is protocol compatible to par96, but uses only three low power ICs
0065         and can therefore be fed from the parallel port and does not require
0066         an additional power supply. Furthermore, it incorporates a carrier
0067         detect circuitry.
0068 
0069 EPP     This is a high-speed modem adaptor that connects to an enhanced parallel
0070         port.
0071 
0072         Its target audience is users working over a high speed hub (76.8kbit/s).
0073 
0074 eppfpga This is a redesign of the EPP adaptor.
0075 ======= ========================================================================
0076 
0077 All of the above modems only support half duplex communications. However,
0078 the driver supports the KISS (see below) fullduplex command. It then simply
0079 starts to send as soon as there's a packet to transmit and does not care
0080 about DCD, i.e. it starts to send even if there's someone else on the channel.
0081 This command is required by some implementations of the DAMA channel
0082 access protocol.
0083 
0084 
0085 The Interface of the drivers
0086 ============================
0087 
0088 Unlike previous drivers, these drivers are no longer character devices,
0089 but they are now true kernel network interfaces. Installation is therefore
0090 simple. Once installed, four interfaces named bc{sf,sh,p,e}[0-3] are available.
0091 sethdlc from the ax25 utilities may be used to set driver states etc.
0092 Users of userland AX.25 stacks may use the net2kiss utility (also available
0093 in the ax25 utilities package) to convert packets of a network interface
0094 to a KISS stream on a pseudo tty. There's also a patch available from
0095 me for WAMPES which allows attaching a kernel network interface directly.
0096 
0097 
0098 Configuring the driver
0099 ======================
0100 
0101 Every time a driver is inserted into the kernel, it has to know which
0102 modems it should access at which ports. This can be done with the setbaycom
0103 utility. If you are only using one modem, you can also configure the
0104 driver from the insmod command line (or by means of an option line in
0105 ``/etc/modprobe.d/*.conf``).
0106 
0107 Examples::
0108 
0109   modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
0110   sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
0111 
0112 Both lines configure the first port to drive a ser12 modem at the first
0113 serial port (COM1 under DOS). The * in the mode parameter instructs the driver
0114 to use the software DCD algorithm (see below)::
0115 
0116   insmod baycom_par mode="picpar" iobase=0x378
0117   sethdlc -i bcp0 -p mode "picpar" io 0x378
0118 
0119 Both lines configure the first port to drive a picpar modem at the
0120 first parallel port (LPT1 under DOS). (Note: picpar implies
0121 hardware DCD, par96 implies software DCD).
0122 
0123 The channel access parameters can be set with sethdlc -a or kissparms.
0124 Note that both utilities interpret the values slightly differently.
0125 
0126 
0127 Hardware DCD versus Software DCD
0128 ================================
0129 
0130 To avoid collisions on the air, the driver must know when the channel is
0131 busy. This is the task of the DCD circuitry/software. The driver may either
0132 utilise a software DCD algorithm (options=1) or use a DCD signal from
0133 the hardware (options=0).
0134 
0135 ======= =================================================================
0136 ser12   if software DCD is utilised, the radio's squelch should always be
0137         open. It is highly recommended to use the software DCD algorithm,
0138         as it is much faster than most hardware squelch circuitry. The
0139         disadvantage is a slightly higher load on the system.
0140 
0141 par96   the software DCD algorithm for this type of modem is rather poor.
0142         The modem simply does not provide enough information to implement
0143         a reasonable DCD algorithm in software. Therefore, if your radio
0144         feeds the DCD input of the PAR96 modem, the use of the hardware
0145         DCD circuitry is recommended.
0146 
0147 picpar  the picpar modem features a builtin DCD hardware, which is highly
0148         recommended.
0149 ======= =================================================================
0150 
0151 
0152 
0153 Compatibility with the rest of the Linux kernel
0154 ===============================================
0155 
0156 The serial driver and the baycom serial drivers compete
0157 for the same hardware resources. Of course only one driver can access a given
0158 interface at a time. The serial driver grabs all interfaces it can find at
0159 startup time. Therefore the baycom drivers subsequently won't be able to
0160 access a serial port. You might therefore find it necessary to release
0161 a port owned by the serial driver with 'setserial /dev/ttyS# uart none', where
0162 # is the number of the interface. The baycom drivers do not reserve any
0163 ports at startup, unless one is specified on the 'insmod' command line. Another
0164 method to solve the problem is to compile all drivers as modules and
0165 leave it to kmod to load the correct driver depending on the application.
0166 
0167 The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem
0168 to arbitrate the ports between different client drivers.
0169 
0170 vy 73s de
0171 
0172 Tom Sailer, sailer@ife.ee.ethz.ch
0173 
0174 hb9jnx @ hb9w.ampr.org