요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
===============================
Linux Drivers for Baycom Modems
===============================
Thomas M. Sailer, HB9JNX/AE4WA, <[email protected]>
The drivers for the baycom modems have been split into
separate drivers as they did not share any code, and the driver
and device names have changed.
This document describes the Linux Kernel Drivers for simple Baycom style
amateur radio modems.
The following drivers are available:
====================================
baycom_ser_fdx:
This driver supports the SER12 modems either full or half duplex.
Its baud rate may be changed via the ``baud`` module parameter,
therefore it supports just about every bit bang modem on a
serial port. Its devices are called bcsf0 through bcsf3.
This is the recommended driver for SER12 type modems,
however if you have a broken UART clone that does not have working
delta status bits, you may try baycom_ser_hdx.
baycom_ser_hdx:
This is an alternative driver for SER12 type modems.
It only supports half duplex, and only 1200 baud. Its devices
are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx
does not work with your UART.
baycom_par:
This driver supports the par96 and picpar modems.
Its devices are called bcp0 through bcp3.
baycom_epp:
This driver supports the EPP modem.
Its devices are called bce0 through bce3.
This driver is work-in-progress.
The following modems are supported:
======= ========================================================================
ser12 This is a very simple 1200 baud AFSK modem. The modem consists only
of a modulator/demodulator chip, usually a TI TCM3105. The computer
is responsible for regenerating the receiver bit clock, as well as
for handling the HDLC protocol. The modem connects to a serial port,
hence the name. Since the serial port is not used as an async serial
port, the kernel driver for serial ports cannot be used, and this
driver only supports standard serial hardware (8250, 16450, 16550)
par96 This is a modem for 9600 baud FSK compatible to the G3RUH standard.
The modem does all the filtering and regenerates the receiver clock.
Data is transferred from and to the PC via a shift register.
The shift register is filled with 16 bits and an interrupt is signalled.
The PC then empties the shift register in a burst. This modem connects
to the parallel port, hence the name. The modem leaves the
implementation of the HDLC protocol and the scrambler polynomial to
the PC.
picpar This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
is protocol compatible to par96, but uses only three low power ICs
and can therefore be fed from the parallel port and does not require
an additional power supply. Furthermore, it incorporates a carrier
detect circuitry.
EPP This is a high-speed modem adaptor that connects to an enhanced parallel
port.
Its target audience is users working over a high speed hub (76.8kbit/s).
eppfpga This is a redesign of the EPP adaptor.
======= ========================================================================
All of the above modems only support half duplex communications. However,
the driver supports the KISS (see below) fullduplex command. It then simply
starts to send as soon as there's a packet to transmit and does not care
about DCD, i.e. it starts to send even if there's someone else on the channel.
This command is required by some implementations of the DAMA channel
access protocol.
The Interface of the drivers
============================
Unlike previous drivers, these drivers are no longer character devices,
but they are now true kernel network interfaces. Installation is therefore
simple. Once installed, four interfaces named bc{sf,sh,p,e}[0-3] are available.
sethdlc from the ax25 utilities may be used to set driver states etc.
Users of userland AX.25 stacks may use the net2kiss utility (also available
in the ax25 utilities package) to convert packets of a network interface
to a KISS stream on a pseudo tty. There's also a patch available from
me for WAMPES which allows attaching a kernel network interface directly.
Configuring the driver
======================
Every time a driver is inserted into the kernel, it has to know which
modems it should access at which ports. This can be done with the setbaycom
utility. If you are only using one modem, you can also configure the
driver from the insmod command line (or by means of an option line in
``/etc/modprobe.d/*.conf``).
Examples::
modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
Both lines configure the first port to drive a ser12 modem at the first
serial port (COM1 under DOS). The * in the mode parameter instructs the driver
to use the software DCD algorithm (see below)::
insmod baycom_par mode="picpar" iobase=0x378
sethdlc -i bcp0 -p mode "picpar" io 0x378
Both lines configure the first port to drive a picpar modem at the
first parallel port (LPT1 under DOS). (Note: picpar implies
hardware DCD, par96 implies software DCD).
The channel access parameters can be set with sethdlc -a or kissparms.
Note that both utilities interpret the values slightly differently.
Hardware DCD versus Software DCD
================================
To avoid collisions on the air, the driver must know when the channel is
busy. This is the task of the DCD circuitry/software. The driver may either
utilise a software DCD algorithm (options=1) or use a DCD signal from
the hardware (options=0).
======= =================================================================
ser12 if software DCD is utilised, the radio's squelch should always be
open. It is highly recommended to use the software DCD algorithm,
as it is much faster than most hardware squelch circuitry. The
disadvantage is a slightly higher load on the system.
par96 the software DCD algorithm for this type of modem is rather poor.
The modem simply does not provide enough information to implement
a reasonable DCD algorithm in software. Therefore, if your radio
feeds the DCD input of the PAR96 modem, the use of the hardware
DCD circuitry is recommended.
picpar the picpar modem features a builtin DCD hardware, which is highly
recommended.
======= =================================================================
Compatibility with the rest of the Linux kernel
===============================================
The serial driver and the baycom serial drivers compete
for the same hardware resources. Of course only one driver can access a given
interface at a time. The serial driver grabs all interfaces it can find at
startup time. Therefore the baycom drivers subsequently won't be able to
access a serial port. You might therefore find it necessary to release
a port owned by the serial driver with 'setserial /dev/ttyS# uart none', where
# is the number of the interface. The baycom drivers do not reserve any
ports at startup, unless one is specified on the 'insmod' command line. Another
method to solve the problem is to compile all drivers as modules and
leave it to kmod to load the correct driver depending on the application.
The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem
to arbitrate the ports between different client drivers.
vy 73s de
Tom Sailer, [email protected]
hb9jnx @ hb9w.ampr.org
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Baycom 드라이버 종류
1-42이 문서는 `GPL-2.0` 라이선스를 따릅니다.
Baycom modem용 Linux 드라이버
Thomas M. Sailer, HB9JNX/AE4WA, `<[email protected]>`
Baycom modem 드라이버들은 코드를 공유하지 않았기 때문에 별도 드라이버로 분리되었고, 드라이버와 장치 이름도 변경되었습니다.
이 문서는 간단한 Baycom 방식 아마추어 무선 modem을 위한 Linux 커널 드라이버를 설명합니다.
사용할 수 있는 드라이버는 다음과 같습니다.
지원 modem, 장치 이름, 중요한 제약을 함께 정리했습니다.
`baycom_ser_fdx`는 SER12 modem을 full duplex 또는 half duplex로 지원합니다. `baud` module parameter로 baud rate를 바꿀 수 있으므로 serial port에 연결하는 거의 모든 bit-bang modem을 지원합니다.
SER12에는 `baycom_ser_fdx`가 권장됩니다. 다만 delta status bit가 제대로 동작하지 않는 고장 난 UART 호환 칩이라면 `baycom_ser_hdx`를 시도할 수 있습니다.
`baycom_ser_hdx`는 SER12용 대체 드라이버이며 half duplex와 1200 baud만 지원합니다. UART에서 `baycom_ser_fdx`가 동작하지 않을 때만 사용하십시오.
`baycom_par`는 par96과 picpar를 지원합니다. `baycom_epp`는 EPP modem을 지원하지만 원문 작성 시점에는 개발 중이었습니다.
.. SPDX-License-Identifier: GPL-2.0
===============================
Linux Drivers for Baycom Modems
===============================
Thomas M. Sailer, HB9JNX/AE4WA, <[email protected]>
The drivers for the baycom modems have been split into
separate drivers as they did not share any code, and the driver
and device names have changed.
This document describes the Linux Kernel Drivers for simple Baycom style
amateur radio modems.
The following drivers are available:
====================================
baycom_ser_fdx:
This driver supports the SER12 modems either full or half duplex.
Its baud rate may be changed via the ``baud`` module parameter,
therefore it supports just about every bit bang modem on a
serial port. Its devices are called bcsf0 through bcsf3.
This is the recommended driver for SER12 type modems,
however if you have a broken UART clone that does not have working
delta status bits, you may try baycom_ser_hdx.
baycom_ser_hdx:
This is an alternative driver for SER12 type modems.
It only supports half duplex, and only 1200 baud. Its devices
are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx
does not work with your UART.
baycom_par:
This driver supports the par96 and picpar modems.
Its devices are called bcp0 through bcp3.
baycom_epp:
This driver supports the EPP modem.
Its devices are called bce0 through bce3.
This driver is work-in-progress.
지원 modem과 half-duplex 동작
43-84지원 modem은 다음과 같습니다.
`ser12`는 매우 단순한 1200 baud AFSK modem입니다. 보통 TI TCM3105인 modulator/demodulator chip만으로 구성됩니다. 컴퓨터가 수신 bit clock을 재생하고 HDLC protocol도 처리합니다.
이름처럼 serial port에 연결하지만 async serial port로 쓰는 것은 아니므로 일반 커널 serial port 드라이버를 사용할 수 없습니다. 이 드라이버는 표준 serial hardware인 8250, 16450, 16550만 지원합니다.
`par96`은 G3RUH 표준과 호환되는 9600 baud FSK modem입니다. modem이 filtering과 수신 clock 재생을 맡습니다. PC와의 데이터 전송은 shift register를 통합니다.
shift register가 16 bit로 채워지면 interrupt가 발생하고 PC가 데이터를 burst로 비웁니다. parallel port에 연결하지만 HDLC protocol과 scrambler polynomial 구현은 PC가 담당합니다.
`picpar`는 Henning Rech(DF9IC)가 par96을 다시 설계한 모델입니다. par96과 protocol 호환이며 저전력 IC 세 개만 사용하므로 parallel port에서 전원을 공급받아 별도 전원 공급 장치가 필요 없습니다. carrier detect 회로도 내장합니다.
`EPP`는 enhanced parallel port에 연결하는 고속 modem adapter로, 76.8 kbit/s 고속 hub 사용자를 대상으로 합니다. `eppfpga`는 EPP adapter를 다시 설계한 모델입니다.
각 modem에서 hardware와 PC가 맡는 기능입니다.
위 modem은 모두 물리적으로 half duplex 통신만 지원합니다. 그러나 드라이버는 KISS `fullduplex` 명령을 지원합니다.
이 명령을 사용하면 보낼 packet이 생기는 즉시 DCD를 무시하고 송신합니다. 즉 다른 사용자가 channel을 쓰는 중이어도 송신을 시작합니다. 일부 DAMA channel access protocol 구현에는 이 동작이 필요합니다.
The following modems are supported:
======= ========================================================================
ser12 This is a very simple 1200 baud AFSK modem. The modem consists only
of a modulator/demodulator chip, usually a TI TCM3105. The computer
is responsible for regenerating the receiver bit clock, as well as
for handling the HDLC protocol. The modem connects to a serial port,
hence the name. Since the serial port is not used as an async serial
port, the kernel driver for serial ports cannot be used, and this
driver only supports standard serial hardware (8250, 16450, 16550)
par96 This is a modem for 9600 baud FSK compatible to the G3RUH standard.
The modem does all the filtering and regenerates the receiver clock.
Data is transferred from and to the PC via a shift register.
The shift register is filled with 16 bits and an interrupt is signalled.
The PC then empties the shift register in a burst. This modem connects
to the parallel port, hence the name. The modem leaves the
implementation of the HDLC protocol and the scrambler polynomial to
the PC.
picpar This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
is protocol compatible to par96, but uses only three low power ICs
and can therefore be fed from the parallel port and does not require
an additional power supply. Furthermore, it incorporates a carrier
detect circuitry.
EPP This is a high-speed modem adaptor that connects to an enhanced parallel
port.
Its target audience is users working over a high speed hub (76.8kbit/s).
eppfpga This is a redesign of the EPP adaptor.
======= ========================================================================
All of the above modems only support half duplex communications. However,
the driver supports the KISS (see below) fullduplex command. It then simply
starts to send as soon as there's a packet to transmit and does not care
about DCD, i.e. it starts to send even if there's someone else on the channel.
This command is required by some implementations of the DAMA channel
access protocol.
네트워크 interface와 설정
85-126드라이버 interface
이 드라이버는 이전 구현과 달리 character device가 아니라 실제 커널 network interface입니다. 설치하면 `bc{sf,sh,p,e}[0-3]` 형식의 interface 네 개가 생깁니다.
AX.25 utility의 `sethdlc`로 드라이버 상태 등을 설정할 수 있습니다. user space AX.25 stack 사용자는 같은 package의 `net2kiss`로 network interface packet을 pseudo tty의 KISS stream으로 변환할 수 있습니다.
커널 network interface를 WAMPES에 직접 연결하는 patch도 작성자에게서 제공되었습니다.
드라이버 설정
드라이버를 커널에 넣을 때마다 어느 port의 어떤 modem을 사용할지 지정해야 합니다. `setbaycom` utility로 설정할 수 있습니다.
modem 하나만 쓴다면 `insmod` 명령줄이나 `/etc/modprobe.d/*.conf`의 option line으로도 설정할 수 있습니다.
modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
두 명령은 첫 번째 port가 첫 serial port(DOS의 COM1)에 연결된 ser12 modem을 구동하도록 설정합니다. `mode`의 `*`는 software DCD algorithm을 사용하라는 뜻입니다.
insmod baycom_par mode="picpar" iobase=0x378
sethdlc -i bcp0 -p mode "picpar" io 0x378
이 두 명령은 첫 번째 port가 첫 parallel port(DOS의 LPT1)에 연결된 picpar modem을 구동하도록 설정합니다. `picpar`는 hardware DCD를, `par96`은 software DCD를 암시합니다.
channel access parameter는 `sethdlc -a` 또는 `kissparms`로 설정합니다. 두 utility가 값을 약간 다르게 해석한다는 점에 유의하십시오.
장치 종류를 고른 뒤 port 자원과 DCD 방식을 연결합니다.
The Interface of the drivers
============================
Unlike previous drivers, these drivers are no longer character devices,
but they are now true kernel network interfaces. Installation is therefore
simple. Once installed, four interfaces named bc{sf,sh,p,e}[0-3] are available.
sethdlc from the ax25 utilities may be used to set driver states etc.
Users of userland AX.25 stacks may use the net2kiss utility (also available
in the ax25 utilities package) to convert packets of a network interface
to a KISS stream on a pseudo tty. There's also a patch available from
me for WAMPES which allows attaching a kernel network interface directly.
Configuring the driver
======================
Every time a driver is inserted into the kernel, it has to know which
modems it should access at which ports. This can be done with the setbaycom
utility. If you are only using one modem, you can also configure the
driver from the insmod command line (or by means of an option line in
``/etc/modprobe.d/*.conf``).
Examples::
modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
Both lines configure the first port to drive a ser12 modem at the first
serial port (COM1 under DOS). The * in the mode parameter instructs the driver
to use the software DCD algorithm (see below)::
insmod baycom_par mode="picpar" iobase=0x378
sethdlc -i bcp0 -p mode "picpar" io 0x378
Both lines configure the first port to drive a picpar modem at the
first parallel port (LPT1 under DOS). (Note: picpar implies
hardware DCD, par96 implies software DCD).
The channel access parameters can be set with sethdlc -a or kissparms.
Note that both utilities interpret the values slightly differently.
DCD 선택과 커널 자원 호환성
127-174Hardware DCD와 software DCD
무선 channel 충돌을 피하려면 드라이버가 channel 사용 중 여부를 알아야 합니다. 이것이 DCD 회로 또는 software의 역할입니다.
드라이버는 software DCD algorithm을 사용하려면 `options=1`, hardware의 DCD signal을 사용하려면 `options=0`을 지정합니다.
modem이 제공하는 신호 품질에 따라 DCD 방식을 고릅니다.
나머지 Linux 커널과의 호환성
일반 serial 드라이버와 Baycom serial 드라이버는 같은 hardware resource를 두고 경쟁합니다. 한 interface에는 한 번에 한 드라이버만 접근할 수 있습니다.
일반 serial 드라이버는 시작할 때 찾을 수 있는 모든 interface를 확보하므로 이후 Baycom 드라이버가 serial port에 접근하지 못할 수 있습니다.
이 경우 `'setserial /dev/ttyS# uart none'`으로 일반 serial 드라이버가 소유한 port를 해제할 수 있습니다. `#`은 interface 번호입니다.
Baycom 드라이버는 `insmod` 명령줄에서 port를 지정하지 않는 한 시작할 때 port를 예약하지 않습니다. 모든 드라이버를 module로 빌드하고 application에 따라 kmod가 올바른 드라이버를 적재하도록 하는 방법도 있습니다.
같은 hardware를 두 드라이버가 동시에 사용할 수 없다는 제약을 보여 줍니다.
parallel port 드라이버인 `baycom_par`와 `baycom_epp`는 parport subsystem을 사용해 여러 client driver 사이에서 port 사용을 중재합니다.
73을 보내며,
Tom Sailer, `[email protected]`
`hb9jnx @ hb9w.ampr.org`
Hardware DCD versus Software DCD
================================
To avoid collisions on the air, the driver must know when the channel is
busy. This is the task of the DCD circuitry/software. The driver may either
utilise a software DCD algorithm (options=1) or use a DCD signal from
the hardware (options=0).
======= =================================================================
ser12 if software DCD is utilised, the radio's squelch should always be
open. It is highly recommended to use the software DCD algorithm,
as it is much faster than most hardware squelch circuitry. The
disadvantage is a slightly higher load on the system.
par96 the software DCD algorithm for this type of modem is rather poor.
The modem simply does not provide enough information to implement
a reasonable DCD algorithm in software. Therefore, if your radio
feeds the DCD input of the PAR96 modem, the use of the hardware
DCD circuitry is recommended.
picpar the picpar modem features a builtin DCD hardware, which is highly
recommended.
======= =================================================================
Compatibility with the rest of the Linux kernel
===============================================
The serial driver and the baycom serial drivers compete
for the same hardware resources. Of course only one driver can access a given
interface at a time. The serial driver grabs all interfaces it can find at
startup time. Therefore the baycom drivers subsequently won't be able to
access a serial port. You might therefore find it necessary to release
a port owned by the serial driver with 'setserial /dev/ttyS# uart none', where
# is the number of the interface. The baycom drivers do not reserve any
ports at startup, unless one is specified on the 'insmod' command line. Another
method to solve the problem is to compile all drivers as modules and
leave it to kmod to load the correct driver depending on the application.
The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem
to arbitrate the ports between different client drivers.
vy 73s de
Tom Sailer, [email protected]
hb9jnx @ hb9w.ampr.org
요약·해설
baycom.rst:1-174Baycom 드라이버는 character device가 아닌 커널 network interface로 modem을 제공합니다. modem 종류에 맞는 드라이버를 고른 뒤 I/O port와 IRQ, DCD 방식을 설정하고, 일반 serial 드라이버와의 port 소유권 충돌을 해결해야 합니다.
대표 modem과 권장 driver/DCD 조합입니다.
무선 modem이 커널 network interface로 노출되는 경로입니다.