← Documents Documentation/networking/device_drivers/hamradio/baycom.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

Linux Drivers for Baycom Modems

SER12·par96·picpar·EPP 아마추어 무선 modem용 Baycom 드라이버, network interface 설정, DCD 선택, serial·parallel port 자원 중재를 설명합니다.

Source pathDocumentation/networking/device_drivers/hamradio/baycom.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

baycom.rst:1-174

Baycom 드라이버는 character device가 아닌 커널 network interface로 modem을 제공합니다. modem 종류에 맞는 드라이버를 고른 뒤 I/O port와 IRQ, DCD 방식을 설정하고, 일반 serial 드라이버와의 port 소유권 충돌을 해결해야 합니다.

Baycom 빠른 선택표
modem드라이버DCD
SER12`baycom_ser_fdx`software 권장
par96`baycom_par`hardware 가능 시 권장
picpar`baycom_par`내장 hardware 권장
EPP`baycom_epp`hardware 구성에 따름

대표 modem과 권장 driver/DCD 조합입니다.

Baycom 송수신 구성
Radio와 Baycom modemserial/parallel/EPP portBaycom kernel driverbc* network interfaceAX.25 또는 KISS

무선 modem이 커널 network interface로 노출되는 경로입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ===============================
4 Linux Drivers for Baycom Modems
5 ===============================
6
7 Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch>
8
9 The drivers for the baycom modems have been split into
10 separate drivers as they did not share any code, and the driver
11 and device names have changed.
12
13 This document describes the Linux Kernel Drivers for simple Baycom style
14 amateur radio modems.
15
16 The following drivers are available:
17 ====================================
18
19 baycom_ser_fdx:
20 This driver supports the SER12 modems either full or half duplex.
21 Its baud rate may be changed via the ``baud`` module parameter,
22 therefore it supports just about every bit bang modem on a
23 serial port. Its devices are called bcsf0 through bcsf3.
24 This is the recommended driver for SER12 type modems,
25 however if you have a broken UART clone that does not have working
26 delta status bits, you may try baycom_ser_hdx.
27
28 baycom_ser_hdx:
29 This is an alternative driver for SER12 type modems.
30 It only supports half duplex, and only 1200 baud. Its devices
31 are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx
32 does not work with your UART.
33
34 baycom_par:
35 This driver supports the par96 and picpar modems.
36 Its devices are called bcp0 through bcp3.
37
38 baycom_epp:
39 This driver supports the EPP modem.
40 Its devices are called bce0 through bce3.
41 This driver is work-in-progress.
42
43 The following modems are supported:
44
45 ======= ========================================================================
46 ser12 This is a very simple 1200 baud AFSK modem. The modem consists only
47 of a modulator/demodulator chip, usually a TI TCM3105. The computer
48 is responsible for regenerating the receiver bit clock, as well as
49 for handling the HDLC protocol. The modem connects to a serial port,
50 hence the name. Since the serial port is not used as an async serial
51 port, the kernel driver for serial ports cannot be used, and this
52 driver only supports standard serial hardware (8250, 16450, 16550)
53
54 par96 This is a modem for 9600 baud FSK compatible to the G3RUH standard.
55 The modem does all the filtering and regenerates the receiver clock.
56 Data is transferred from and to the PC via a shift register.
57 The shift register is filled with 16 bits and an interrupt is signalled.
58 The PC then empties the shift register in a burst. This modem connects
59 to the parallel port, hence the name. The modem leaves the
60 implementation of the HDLC protocol and the scrambler polynomial to
61 the PC.
62
63 picpar This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
64 is protocol compatible to par96, but uses only three low power ICs
65 and can therefore be fed from the parallel port and does not require
66 an additional power supply. Furthermore, it incorporates a carrier
67 detect circuitry.
68
69 EPP This is a high-speed modem adaptor that connects to an enhanced parallel
70 port.
71
72 Its target audience is users working over a high speed hub (76.8kbit/s).
73
74 eppfpga This is a redesign of the EPP adaptor.
75 ======= ========================================================================
76
77 All of the above modems only support half duplex communications. However,
78 the driver supports the KISS (see below) fullduplex command. It then simply
79 starts to send as soon as there's a packet to transmit and does not care
80 about DCD, i.e. it starts to send even if there's someone else on the channel.
81 This command is required by some implementations of the DAMA channel
82 access protocol.
83
84
85 The Interface of the drivers
86 ============================
87
88 Unlike previous drivers, these drivers are no longer character devices,
89 but they are now true kernel network interfaces. Installation is therefore
90 simple. Once installed, four interfaces named bc{sf,sh,p,e}[0-3] are available.
91 sethdlc from the ax25 utilities may be used to set driver states etc.
92 Users of userland AX.25 stacks may use the net2kiss utility (also available
93 in the ax25 utilities package) to convert packets of a network interface
94 to a KISS stream on a pseudo tty. There's also a patch available from
95 me for WAMPES which allows attaching a kernel network interface directly.
96
97
98 Configuring the driver
99 ======================
100
101 Every time a driver is inserted into the kernel, it has to know which
102 modems it should access at which ports. This can be done with the setbaycom
103 utility. If you are only using one modem, you can also configure the
104 driver from the insmod command line (or by means of an option line in
105 ``/etc/modprobe.d/*.conf``).
106
107 Examples::
108
109 modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
110 sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
111
112 Both lines configure the first port to drive a ser12 modem at the first
113 serial port (COM1 under DOS). The * in the mode parameter instructs the driver
114 to use the software DCD algorithm (see below)::
115
116 insmod baycom_par mode="picpar" iobase=0x378
117 sethdlc -i bcp0 -p mode "picpar" io 0x378
118
119 Both lines configure the first port to drive a picpar modem at the
120 first parallel port (LPT1 under DOS). (Note: picpar implies
121 hardware DCD, par96 implies software DCD).
122
123 The channel access parameters can be set with sethdlc -a or kissparms.
124 Note that both utilities interpret the values slightly differently.
125
126
127 Hardware DCD versus Software DCD
128 ================================
129
130 To avoid collisions on the air, the driver must know when the channel is
131 busy. This is the task of the DCD circuitry/software. The driver may either
132 utilise a software DCD algorithm (options=1) or use a DCD signal from
133 the hardware (options=0).
134
135 ======= =================================================================
136 ser12 if software DCD is utilised, the radio's squelch should always be
137 open. It is highly recommended to use the software DCD algorithm,
138 as it is much faster than most hardware squelch circuitry. The
139 disadvantage is a slightly higher load on the system.
140
141 par96 the software DCD algorithm for this type of modem is rather poor.
142 The modem simply does not provide enough information to implement
143 a reasonable DCD algorithm in software. Therefore, if your radio
144 feeds the DCD input of the PAR96 modem, the use of the hardware
145 DCD circuitry is recommended.
146
147 picpar the picpar modem features a builtin DCD hardware, which is highly
148 recommended.
149 ======= =================================================================
150
151
152
153 Compatibility with the rest of the Linux kernel
154 ===============================================
155
156 The serial driver and the baycom serial drivers compete
157 for the same hardware resources. Of course only one driver can access a given
158 interface at a time. The serial driver grabs all interfaces it can find at
159 startup time. Therefore the baycom drivers subsequently won't be able to
160 access a serial port. You might therefore find it necessary to release
161 a port owned by the serial driver with 'setserial /dev/ttyS# uart none', where
162 # is the number of the interface. The baycom drivers do not reserve any
163 ports at startup, unless one is specified on the 'insmod' command line. Another
164 method to solve the problem is to compile all drivers as modules and
165 leave it to kmod to load the correct driver depending on the application.
166
167 The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem
168 to arbitrate the ports between different client drivers.
169
170 vy 73s de
171
172 Tom Sailer, sailer@ife.ee.ethz.ch
173
174 hb9jnx @ hb9w.ampr.org
175

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Baycom 드라이버 종류

1-42

이 문서는 `GPL-2.0` 라이선스를 따릅니다.

Baycom modem용 Linux 드라이버

Thomas M. Sailer, HB9JNX/AE4WA, `<sailer@ife.ee.ethz.ch>`

Baycom modem 드라이버들은 코드를 공유하지 않았기 때문에 별도 드라이버로 분리되었고, 드라이버와 장치 이름도 변경되었습니다.

이 문서는 간단한 Baycom 방식 아마추어 무선 modem을 위한 Linux 커널 드라이버를 설명합니다.

사용할 수 있는 드라이버는 다음과 같습니다.

Baycom 드라이버 선택
드라이버지원 대상장치 이름특징
`baycom_ser_fdx`SER12`bcsf0`~`bcsf3`full/half duplex, `baud` 변경 가능, 권장
`baycom_ser_hdx`SER12`bcsh0`~`bcsh3`half duplex 및 1200 baud 전용
`baycom_par`par96, picpar`bcp0`~`bcp3`parallel port
`baycom_epp`EPP`bce0`~`bce3`개발 중인 드라이버

지원 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, <sailer@ife.ee.ethz.ch>

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를 다시 설계한 모델입니다.

Baycom modem 역할 분담
modem변조/속도modem 역할PC 역할
`ser12`1200 baud AFSKTCM3105 기반 변조·복조bit clock 재생, HDLC
`par96`9600 baud FSK/G3RUHfiltering, clock 재생, 16-bit shift registerHDLC, scrambler
`picpar`par96 호환저전력 회로, carrier detectpar96과 동일
`EPP`최대 76.8 kbit/s 대상enhanced parallel port adapter고속 hub 통신
`eppfpga`EPP 계열EPP adapter 재설계EPP와 동일

각 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가 값을 약간 다르게 해석한다는 점에 유의하십시오.

Baycom 설정 경로
SER12 선택`baycom_ser_fdx`와 `bcsf0``mode="ser12*"`, `io`, `irq`
picpar 선택`baycom_par`와 `bcp0``mode="picpar"`, `io`
channel access 조정`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-174

Hardware DCD와 software DCD

무선 channel 충돌을 피하려면 드라이버가 channel 사용 중 여부를 알아야 합니다. 이것이 DCD 회로 또는 software의 역할입니다.

드라이버는 software DCD algorithm을 사용하려면 `options=1`, hardware의 DCD signal을 사용하려면 `options=0`을 지정합니다.

Baycom DCD 권장 설정
modem권장 DCD운영 조건과 이유
`ser12`software DCDradio squelch를 항상 열어 둠; hardware squelch보다 빠르지만 system load가 약간 증가
`par96`가능하면 hardware DCDsoftware 판단에 필요한 정보가 부족함; radio가 DCD input을 공급할 때 hardware 권장
`picpar`내장 hardware DCDmodem에 DCD hardware가 내장되어 있어 강력히 권장

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가 올바른 드라이버를 적재하도록 하는 방법도 있습니다.

Serial port 소유권 조정
부팅 시 일반 serial 드라이버가 port 확보`setserial /dev/ttyS# uart none`으로 해제Baycom serial 드라이버 적재
모든 드라이버를 module로 빌드application이 장치를 요청kmod가 필요한 드라이버 적재

같은 hardware를 두 드라이버가 동시에 사용할 수 없다는 제약을 보여 줍니다.

parallel port 드라이버인 `baycom_par`와 `baycom_epp`는 parport subsystem을 사용해 여러 client driver 사이에서 port 사용을 중재합니다.

73을 보내며,

Tom Sailer, `sailer@ife.ee.ethz.ch`

`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, sailer@ife.ee.ethz.ch

hb9jnx @ hb9w.ampr.org