Documentation/driver-api/tty/moxa-smartio.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

MOXA Smartio/Industio Family Device Driver Installation Guide

MOXA Smartio/Industio 다중 포트 보드의 지원 모델, 설치·IRQ 공유, ttyM 장치 이름, 유틸리티, setserial 및 문제 해결을 다루는 한국어 전문 번역입니다.

Source pathDocumentation/driver-api/tty/moxa-smartio.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

moxa-smartio.rst:1-197

이 안내서는 지원되는 2·4·8포트 Moxa 보드를 열거하고, 최대 4개 보드의 PCI IRQ 공유와 `ttyM0`-`ttyM31` 이름 할당을 설명합니다. 세 관리 유틸리티와 `setserial` 옵션, 4개 초과 설치 오류의 해결책도 포함합니다.

문서 구성
원문 줄핵심 내용
1-18문서 목차
19-77지원 보드, 유틸리티, 배포 형태
78-104시스템 요구 사항과 IRQ 공유
105-123`ttyMxx` 이름 규칙
124-159세 유틸리티의 동작
160-182`setserial` 매개변수
183-1974개 초과 보드 문제 해결

2. 영어 원문 전체

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

원문 전체 펼치기
1 =============================================================
2 MOXA Smartio/Industio Family Device Driver Installation Guide
3 =============================================================
4
5 Copyright (C) 2008, Moxa Inc.
6 Copyright (C) 2021, Jiri Slaby
7
8 .. Content
9
10 1. Introduction
11 2. System Requirement
12 3. Installation
13 3.1 Hardware installation
14 3.2 Device naming convention
15 4. Utilities
16 5. Setserial
17 6. Troubleshooting
18
19 1. Introduction
20 ^^^^^^^^^^^^^^^
21
22 The Smartio/Industio/UPCI family Linux driver supports following multiport
23 boards:
24
25 - 2 ports multiport board
26 CP-102U, CP-102UL, CP-102UF
27 CP-132U-I, CP-132UL,
28 CP-132, CP-132I, CP132S, CP-132IS,
29 (CP-102, CP-102S)
30
31 - 4 ports multiport board
32 CP-104EL,
33 CP-104UL, CP-104JU,
34 CP-134U, CP-134U-I,
35 C104H/PCI, C104HS/PCI,
36 CP-114, CP-114I, CP-114S, CP-114IS, CP-114UL,
37 (C114HI, CT-114I),
38 POS-104UL,
39 CB-114,
40 CB-134I
41
42 - 8 ports multiport board
43 CP-118EL, CP-168EL,
44 CP-118U, CP-168U,
45 C168H/PCI,
46 CB-108
47
48 If a compatibility problem occurs, please contact Moxa at
49 support@moxa.com.tw.
50
51 In addition to device driver, useful utilities are also provided in this
52 version. They are:
53
54 - msdiag
55 Diagnostic program for displaying installed Moxa
56 Smartio/Industio boards.
57 - msmon
58 Monitor program to observe data count and line status signals.
59 - msterm A simple terminal program which is useful in testing serial
60 ports.
61
62 All the drivers and utilities are published in form of source code under
63 GNU General Public License in this version. Please refer to GNU General
64 Public License announcement in each source code file for more detail.
65
66 In Moxa's Web sites, you may always find the latest driver at
67 https://www.moxa.com/.
68
69 This version of driver can be installed as a Loadable Module (Module driver)
70 or built-in into kernel (Static driver). Before you install the driver,
71 please refer to hardware installation procedure in the User's Manual.
72
73 We assume the user should be familiar with following documents:
74
75 - Serial-HOWTO
76 - Kernel-HOWTO
77
78 2. System Requirement
79 ^^^^^^^^^^^^^^^^^^^^^
80
81 - Maximum 4 boards can be installed in combination
82
83 3. Installation
84 ^^^^^^^^^^^^^^^
85
86 3.1 Hardware installation
87 =========================
88
89 PCI/UPCI board
90 --------------
91
92 You may need to adjust IRQ usage in BIOS to avoid IRQ conflict with other
93 ISA devices. Please refer to hardware installation procedure in User's
94 Manual in advance.
95
96 PCI IRQ Sharing
97 ---------------
98
99 Each port within the same multiport board shares the same IRQ. Up to
100 4 Moxa Smartio/Industio PCI Family multiport boards can be installed
101 together on one system and they can share the same IRQ.
102
103
104
105 3.2 Device naming convention
106 ============================
107
108 The device node is named "ttyMxx".
109
110 Device naming when more than 2 boards installed
111 -----------------------------------------------
112
113 Naming convention for each Smartio/Industio multiport board is
114 pre-defined as below.
115
116 ============ ===============
117 Board Num. Device node
118 1st board ttyM0 - ttyM7
119 2nd board ttyM8 - ttyM15
120 3rd board ttyM16 - ttyM23
121 4th board ttyM24 - ttyM31
122 ============ ===============
123
124 4. Utilities
125 ^^^^^^^^^^^^
126
127 There are 3 utilities contained in this driver. They are msdiag, msmon and
128 msterm. These 3 utilities are released in form of source code. They should
129 be compiled into executable file and copied into /usr/bin.
130
131 msdiag - Diagnostic
132 ===================
133
134 This utility provides the function to display what Moxa Smartio/Industio
135 board was found by the driver in the system.
136
137 msmon - Port Monitoring
138 =======================
139
140 This utility gives the user a quick view about all the MOXA ports'
141 activities. One can easily learn each port's total received/transmitted
142 (Rx/Tx) character count since the time when the monitoring is started.
143
144 Rx/Tx throughputs per second are also reported in interval basis (e.g.
145 the last 5 seconds) and in average basis (since the time the monitoring
146 is started). You can reset all ports' count by <HOME> key. <+> <->
147 (plus/minus) keys to change the displaying time interval. Press <ENTER>
148 on the port, that cursor stay, to view the port's communication
149 parameters, signal status, and input/output queue.
150
151 msterm - Terminal Emulation
152 ===========================
153
154 This utility provides data sending and receiving ability of all tty ports,
155 especially for MOXA ports. It is quite useful for testing simple
156 application, for example, sending AT command to a modem connected to the
157 port or used as a terminal for login purpose. Note that this is only a
158 dumb terminal emulation without handling full screen operation.
159
160 5. Setserial
161 ^^^^^^^^^^^^
162
163 Supported Setserial parameters are listed as below.
164
165 ============== =============================================================
166 uart set UART type(16450 --> disable FIFO, 16550A --> enable FIFO)
167 close_delay set the amount of time (in 1/100 of a second) that DTR
168 should be kept low while being closed.
169 closing_wait set the amount of time (in 1/100 of a second) that the
170 serial port should wait for data to be drained while
171 being closed, before the receiver is disabled.
172 spd_hi Use 57.6kb when the application requests 38.4kb.
173 spd_vhi Use 115.2kb when the application requests 38.4kb.
174 spd_shi Use 230.4kb when the application requests 38.4kb.
175 spd_warp Use 460.8kb when the application requests 38.4kb.
176 spd_normal Use 38.4kb when the application requests 38.4kb.
177 spd_cust Use the custom divisor to set the speed when the
178 application requests 38.4kb.
179 divisor This option sets the custom division.
180 baud_base This option sets the base baud rate.
181 ============== =============================================================
182
183 6. Troubleshooting
184 ^^^^^^^^^^^^^^^^^^
185
186 The boot time error messages and solutions are stated as clearly as
187 possible. If all the possible solutions fail, please contact our technical
188 support team to get more help.
189
190
191 Error msg:
192 More than 4 Moxa Smartio/Industio family boards found. Fifth board
193 and after are ignored.
194
195 Solution:
196 To avoid this problem, please unplug fifth and after board, because Moxa
197 driver supports up to 4 boards.
198

3. 한국어 전문 번역

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

설치 안내서 구성

1-18

이 문서는 MOXA Smartio/Industio 계열 장치 드라이버 설치 안내서입니다. 저작권은 2008년 Moxa Inc.와 2021년 Jiri Slaby에게 있습니다.

안내서는 소개, 시스템 요구 사항, 설치, 유틸리티, `setserial`, 문제 해결 순서로 구성됩니다. 설치 절은 하드웨어 설치와 장치 이름 규칙으로 다시 나뉩니다.

문서 목차
내용
1Introduction
2System Requirement
3.1Hardware installation
3.2Device naming convention
4Utilities
5Setserial
6Troubleshooting

=============================================================
MOXA Smartio/Industio Family Device Driver Installation Guide
=============================================================

Copyright (C) 2008, Moxa Inc.
Copyright (C) 2021, Jiri Slaby

.. Content

   1. Introduction
   2. System Requirement
   3. Installation
      3.1 Hardware installation
      3.2 Device naming convention
   4. Utilities
   5. Setserial
   6. Troubleshooting

지원 보드와 배포 형태

19-77

Smartio/Industio/UPCI 계열 Linux 드라이버는 2포트, 4포트, 8포트 multiport board를 지원합니다. 호환성 문제가 발생하면 `support@moxa.com.tw`로 Moxa에 문의합니다.

지원 multiport board
포트 수지원 모델
2 portsCP-102U, CP-102UL, CP-102UF, CP-132U-I, CP-132UL, CP-132, CP-132I, CP132S, CP-132IS, (CP-102, CP-102S)
4 portsCP-104EL, CP-104UL, CP-104JU, CP-134U, CP-134U-I, C104H/PCI, C104HS/PCI, CP-114, CP-114I, CP-114S, CP-114IS, CP-114UL, (C114HI, CT-114I), POS-104UL, CB-114, CB-134I
8 portsCP-118EL, CP-168EL, CP-118U, CP-168U, C168H/PCI, CB-108

드라이버와 함께 `msdiag`, `msmon`, `msterm` 유틸리티도 제공됩니다. `msdiag`는 설치된 Moxa Smartio/Industio 보드를 표시하는 진단 프로그램이고, `msmon`은 데이터 수와 line status signal을 관찰합니다. `msterm`은 직렬 포트 시험에 사용하는 간단한 terminal program입니다.

제공 유틸리티
도구용도
`msdiag`설치된 Smartio/Industio 보드 표시
`msmon`데이터 수와 line status signal 감시
`msterm`직렬 포트 시험용 간단한 terminal

이 버전의 모든 드라이버와 유틸리티는 GNU General Public License에 따라 소스 코드로 공개됩니다. 자세한 사항은 각 소스 파일의 GPL 고지를 참조합니다. 최신 드라이버는 `https://www.moxa.com/`에서 찾을 수 있습니다.

드라이버는 Loadable Module인 Module driver로 설치하거나 kernel built-in인 Static driver로 구성할 수 있습니다. 설치 전에 User's Manual의 하드웨어 설치 절차를 확인해야 하며, 사용자가 `Serial-HOWTO`와 `Kernel-HOWTO`에 익숙하다고 가정합니다.

1. Introduction
^^^^^^^^^^^^^^^

   The Smartio/Industio/UPCI family Linux driver supports following multiport
   boards:

    - 2 ports multiport board
        CP-102U, CP-102UL, CP-102UF
        CP-132U-I, CP-132UL,
        CP-132, CP-132I, CP132S, CP-132IS,
        (CP-102, CP-102S)

    - 4 ports multiport board
        CP-104EL,
        CP-104UL, CP-104JU,
        CP-134U, CP-134U-I,
        C104H/PCI, C104HS/PCI,
        CP-114, CP-114I, CP-114S, CP-114IS, CP-114UL,
        (C114HI, CT-114I),
        POS-104UL,
        CB-114,
        CB-134I

    - 8 ports multiport board
        CP-118EL, CP-168EL,
        CP-118U, CP-168U,
        C168H/PCI,
        CB-108

   If a compatibility problem occurs, please contact Moxa at
   support@moxa.com.tw.

   In addition to device driver, useful utilities are also provided in this
   version. They are:

    - msdiag
                 Diagnostic program for displaying installed Moxa
                 Smartio/Industio boards.
    - msmon
                 Monitor program to observe data count and line status signals.
    - msterm     A simple terminal program which is useful in testing serial
                 ports.

   All the drivers and utilities are published in form of source code under
   GNU General Public License in this version. Please refer to GNU General
   Public License announcement in each source code file for more detail.

   In Moxa's Web sites, you may always find the latest driver at
   https://www.moxa.com/.

   This version of driver can be installed as a Loadable Module (Module driver)
   or built-in into kernel (Static driver). Before you install the driver,
   please refer to hardware installation procedure in the User's Manual.

   We assume the user should be familiar with following documents:

   - Serial-HOWTO
   - Kernel-HOWTO

시스템 요구 사항과 PCI/UPCI 설치

78-104

시스템에는 Moxa 보드를 조합하여 최대 4개까지 설치할 수 있습니다.

PCI/UPCI 보드를 설치할 때 다른 ISA 장치와 IRQ 충돌이 나지 않도록 BIOS의 IRQ 사용 설정을 조정해야 할 수 있습니다. 먼저 User's Manual의 하드웨어 설치 절차를 확인합니다.

같은 multiport board 안의 모든 포트는 동일한 IRQ를 공유합니다. 한 시스템에 Moxa Smartio/Industio PCI 계열 multiport board를 최대 4개 함께 설치할 수 있으며, 이들 보드도 같은 IRQ를 공유할 수 있습니다.

PCI IRQ 공유 구조
각 Smartio/Industio boardboard 내부 모든 port가 같은 IRQ 공유
최대 4개 PCI board한 시스템에 함께 설치
설치된 PCI board들동일 IRQ 공유 가능
IRQ conflict 발생 가능성BIOS IRQ 설정과 User's Manual 확인

포트 내부 공유와 여러 보드 사이의 공유 가능성을 함께 나타냅니다.

2. System Requirement
^^^^^^^^^^^^^^^^^^^^^

   - Maximum 4 boards can be installed in combination

3. Installation
^^^^^^^^^^^^^^^

3.1 Hardware installation
=========================

PCI/UPCI board
--------------

   You may need to adjust IRQ usage in BIOS to avoid IRQ conflict with other
   ISA devices. Please refer to hardware installation procedure in User's
   Manual in advance.

PCI IRQ Sharing
---------------

   Each port within the same multiport board shares the same IRQ. Up to
   4 Moxa Smartio/Industio PCI Family multiport boards can be installed
   together on one system and they can share the same IRQ.


`ttyMxx` 장치 이름 규칙

105-123

장치 노드 이름은 `ttyMxx` 형식입니다. 각 Smartio/Industio multiport board의 번호 범위는 미리 정해져 있습니다.

보드별 device node 범위
Board Num.Device node
1st board`ttyM0` - `ttyM7`
2nd board`ttyM8` - `ttyM15`
3rd board`ttyM16` - `ttyM23`
4th board`ttyM24` - `ttyM31`

3.2 Device naming convention
============================

   The device node is named "ttyMxx".

Device naming when more than 2 boards installed
-----------------------------------------------

   Naming convention for each Smartio/Industio multiport board is
   pre-defined as below.

   ============ ===============
   Board Num.        Device node
   1st board        ttyM0  - ttyM7
   2nd board        ttyM8  - ttyM15
   3rd board        ttyM16 - ttyM23
   4th board        ttyM24 - ttyM31
   ============ ===============

`msdiag`, `msmon`, `msterm`

124-159

드라이버에는 `msdiag`, `msmon`, `msterm` 세 유틸리티가 소스 코드로 포함됩니다. 각각 실행 파일로 컴파일한 뒤 `/usr/bin`에 복사해야 합니다.

`msdiag`는 시스템에서 드라이버가 발견한 Moxa Smartio/Industio 보드를 표시합니다.

`msmon`은 모든 MOXA 포트의 활동을 빠르게 보여 줍니다. 감시 시작 이후 포트별 전체 수신·송신(Rx/Tx) 문자 수, 최근 5초 같은 interval 기준 초당 throughput, 시작 이후 average throughput을 보고합니다.

`msmon`에서 `<HOME>`은 모든 포트의 count를 초기화하고, `<+>`와 `<->`는 표시 시간 간격을 바꿉니다. cursor가 놓인 포트에서 `<ENTER>`를 누르면 통신 매개변수, signal status, input/output queue를 볼 수 있습니다.

`msterm`은 모든 tty port, 특히 MOXA 포트에서 데이터를 송수신합니다. 포트에 연결된 modem으로 AT command를 보내거나 login terminal로 사용하는 간단한 시험에 유용합니다. full-screen operation을 처리하지 않는 dumb terminal emulation이라는 점에 유의해야 합니다.

유틸리티 설치와 주요 조작
항목동작
설치소스를 실행 파일로 컴파일한 뒤 `/usr/bin`에 복사
`msdiag`드라이버가 찾은 보드 표시
`msmon` `<HOME>`모든 포트 count 초기화
`msmon` `<+>` / `<->`표시 interval 변경
`msmon` `<ENTER>`선택 포트의 parameter, signal, queue 표시
`msterm`송수신·AT command·login terminal 시험

4. Utilities
^^^^^^^^^^^^

   There are 3 utilities contained in this driver. They are msdiag, msmon and
   msterm. These 3 utilities are released in form of source code. They should
   be compiled into executable file and copied into /usr/bin.

msdiag - Diagnostic
===================

   This utility provides the function to display what Moxa Smartio/Industio
   board was found by the driver in the system.

msmon - Port Monitoring
=======================

   This utility gives the user a quick view about all the MOXA ports'
   activities. One can easily learn each port's total received/transmitted
   (Rx/Tx) character count since the time when the monitoring is started.

   Rx/Tx throughputs per second are also reported in interval basis (e.g.
   the last 5 seconds) and in average basis (since the time the monitoring
   is started). You can reset all ports' count by <HOME> key. <+> <->
   (plus/minus) keys to change the displaying time interval. Press <ENTER>
   on the port, that cursor stay, to view the port's communication
   parameters, signal status, and input/output queue.

msterm - Terminal Emulation
===========================

   This utility provides data sending and receiving ability of all tty ports,
   especially for MOXA ports. It is quite useful for testing simple
   application, for example, sending AT command to a modem connected to the
   port or used as a terminal for login purpose. Note that this is only a
   dumb terminal emulation without handling full screen operation.

지원 `setserial` 매개변수

160-182

드라이버는 다음 `setserial` 매개변수를 지원합니다. 시간 값은 `close_delay`와 `closing_wait`에서 1/100초 단위를 사용하며, `spd_*` 옵션은 응용 프로그램이 38.4kb를 요청했을 때 적용할 실제 속도를 선택합니다.

지원 setserial 매개변수
매개변수의미
`uart`UART type 설정: 16450은 FIFO 비활성화, 16550A는 FIFO 활성화
`close_delay`close 중 DTR을 low로 유지하는 시간, 1/100초 단위
`closing_wait`receiver 비활성화 전에 송신 데이터가 비워지기를 기다리는 시간, 1/100초 단위
`spd_hi`38.4kb 요청 시 57.6kb 사용
`spd_vhi`38.4kb 요청 시 115.2kb 사용
`spd_shi`38.4kb 요청 시 230.4kb 사용
`spd_warp`38.4kb 요청 시 460.8kb 사용
`spd_normal`38.4kb 요청 시 38.4kb 사용
`spd_cust`38.4kb 요청 시 custom divisor로 속도 설정
`divisor`custom division 설정
`baud_base`base baud rate 설정

5. Setserial
^^^^^^^^^^^^

   Supported Setserial parameters are listed as below.

   ============== =============================================================
   uart                  set UART type(16450 --> disable FIFO, 16550A --> enable FIFO)
   close_delay          set the amount of time (in 1/100 of a second) that DTR
                  should be kept low while being closed.
   closing_wait   set the amount of time (in 1/100 of a second) that the
                  serial port should wait for data to be drained while
                  being closed, before the receiver is disabled.
   spd_hi          Use 57.6kb when the application requests 38.4kb.
   spd_vhi          Use 115.2kb when the application requests 38.4kb.
   spd_shi          Use 230.4kb when the application requests 38.4kb.
   spd_warp          Use 460.8kb when the application requests 38.4kb.
   spd_normal          Use 38.4kb when the application requests 38.4kb.
   spd_cust          Use the custom divisor to set the speed when the
                  application requests 38.4kb.
   divisor          This option sets the custom division.
   baud_base          This option sets the base baud rate.
   ============== =============================================================

4개 초과 보드 문제 해결

183-197

부팅 시 오류 메시지와 해결 방법이 이 절에 제시됩니다. 가능한 해결책이 모두 실패하면 기술 지원 팀에 추가 도움을 요청합니다.

`More than 4 Moxa Smartio/Industio family boards found. Fifth board and after are ignored.` 메시지는 계열 보드가 4개보다 많이 발견되어 다섯 번째 이후 보드를 무시했음을 뜻합니다.

Moxa 드라이버가 최대 4개 보드만 지원하므로, 이 문제를 피하려면 다섯 번째 이후 보드를 분리해야 합니다.

부팅 오류 대응
오류원인해결
4개 초과 보드 발견드라이버의 최대 지원 수 초과다섯 번째 이후 보드를 분리

6. Troubleshooting
^^^^^^^^^^^^^^^^^^

   The boot time error messages and solutions are stated as clearly as
   possible. If all the possible solutions fail, please contact our technical
   support team to get more help.


   Error msg:
              More than 4 Moxa Smartio/Industio family boards found. Fifth board
              and after are ignored.

   Solution:
   To avoid this problem, please unplug fifth and after board, because Moxa
   driver supports up to 4 boards.