162306a36Sopenharmony_ci=============================================================
262306a36Sopenharmony_ciMOXA Smartio/Industio Family Device Driver Installation Guide
362306a36Sopenharmony_ci=============================================================
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciCopyright (C) 2008, Moxa Inc.
662306a36Sopenharmony_ciCopyright (C) 2021, Jiri Slaby
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci.. Content
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci   1. Introduction
1162306a36Sopenharmony_ci   2. System Requirement
1262306a36Sopenharmony_ci   3. Installation
1362306a36Sopenharmony_ci      3.1 Hardware installation
1462306a36Sopenharmony_ci      3.2 Device naming convention
1562306a36Sopenharmony_ci   4. Utilities
1662306a36Sopenharmony_ci   5. Setserial
1762306a36Sopenharmony_ci   6. Troubleshooting
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci1. Introduction
2062306a36Sopenharmony_ci^^^^^^^^^^^^^^^
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci   The Smartio/Industio/UPCI family Linux driver supports following multiport
2362306a36Sopenharmony_ci   boards:
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci    - 2 ports multiport board
2662306a36Sopenharmony_ci	CP-102U, CP-102UL, CP-102UF
2762306a36Sopenharmony_ci	CP-132U-I, CP-132UL,
2862306a36Sopenharmony_ci	CP-132, CP-132I, CP132S, CP-132IS,
2962306a36Sopenharmony_ci	(CP-102, CP-102S)
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci    - 4 ports multiport board
3262306a36Sopenharmony_ci	CP-104EL,
3362306a36Sopenharmony_ci	CP-104UL, CP-104JU,
3462306a36Sopenharmony_ci	CP-134U, CP-134U-I,
3562306a36Sopenharmony_ci	C104H/PCI, C104HS/PCI,
3662306a36Sopenharmony_ci	CP-114, CP-114I, CP-114S, CP-114IS, CP-114UL,
3762306a36Sopenharmony_ci	(C114HI, CT-114I),
3862306a36Sopenharmony_ci	POS-104UL,
3962306a36Sopenharmony_ci	CB-114,
4062306a36Sopenharmony_ci	CB-134I
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci    - 8 ports multiport board
4362306a36Sopenharmony_ci	CP-118EL, CP-168EL,
4462306a36Sopenharmony_ci	CP-118U, CP-168U,
4562306a36Sopenharmony_ci	C168H/PCI,
4662306a36Sopenharmony_ci	CB-108
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci   If a compatibility problem occurs, please contact Moxa at
4962306a36Sopenharmony_ci   support@moxa.com.tw.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci   In addition to device driver, useful utilities are also provided in this
5262306a36Sopenharmony_ci   version. They are:
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci    - msdiag
5562306a36Sopenharmony_ci		 Diagnostic program for displaying installed Moxa
5662306a36Sopenharmony_ci                 Smartio/Industio boards.
5762306a36Sopenharmony_ci    - msmon
5862306a36Sopenharmony_ci		 Monitor program to observe data count and line status signals.
5962306a36Sopenharmony_ci    - msterm     A simple terminal program which is useful in testing serial
6062306a36Sopenharmony_ci	         ports.
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci   All the drivers and utilities are published in form of source code under
6362306a36Sopenharmony_ci   GNU General Public License in this version. Please refer to GNU General
6462306a36Sopenharmony_ci   Public License announcement in each source code file for more detail.
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci   In Moxa's Web sites, you may always find the latest driver at
6762306a36Sopenharmony_ci   https://www.moxa.com/.
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci   This version of driver can be installed as a Loadable Module (Module driver)
7062306a36Sopenharmony_ci   or built-in into kernel (Static driver). Before you install the driver,
7162306a36Sopenharmony_ci   please refer to hardware installation procedure in the User's Manual.
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci   We assume the user should be familiar with following documents:
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci   - Serial-HOWTO
7662306a36Sopenharmony_ci   - Kernel-HOWTO
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci2. System Requirement
7962306a36Sopenharmony_ci^^^^^^^^^^^^^^^^^^^^^
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci   - Maximum 4 boards can be installed in combination
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci3. Installation
8462306a36Sopenharmony_ci^^^^^^^^^^^^^^^
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci3.1 Hardware installation
8762306a36Sopenharmony_ci=========================
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ciPCI/UPCI board
9062306a36Sopenharmony_ci--------------
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ci   You may need to adjust IRQ usage in BIOS to avoid IRQ conflict with other
9362306a36Sopenharmony_ci   ISA devices. Please refer to hardware installation procedure in User's
9462306a36Sopenharmony_ci   Manual in advance.
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ciPCI IRQ Sharing
9762306a36Sopenharmony_ci---------------
9862306a36Sopenharmony_ci
9962306a36Sopenharmony_ci   Each port within the same multiport board shares the same IRQ. Up to
10062306a36Sopenharmony_ci   4 Moxa Smartio/Industio PCI Family multiport boards can be installed
10162306a36Sopenharmony_ci   together on one system and they can share the same IRQ.
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci3.2 Device naming convention
10662306a36Sopenharmony_ci============================
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci   The device node is named "ttyMxx".
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ciDevice naming when more than 2 boards installed
11162306a36Sopenharmony_ci-----------------------------------------------
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ci   Naming convention for each Smartio/Industio multiport board is
11462306a36Sopenharmony_ci   pre-defined as below.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci   ============ ===============
11762306a36Sopenharmony_ci   Board Num.	Device node
11862306a36Sopenharmony_ci   1st board	ttyM0  - ttyM7
11962306a36Sopenharmony_ci   2nd board	ttyM8  - ttyM15
12062306a36Sopenharmony_ci   3rd board	ttyM16 - ttyM23
12162306a36Sopenharmony_ci   4th board	ttyM24 - ttyM31
12262306a36Sopenharmony_ci   ============ ===============
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci4. Utilities
12562306a36Sopenharmony_ci^^^^^^^^^^^^
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ci   There are 3 utilities contained in this driver. They are msdiag, msmon and
12862306a36Sopenharmony_ci   msterm. These 3 utilities are released in form of source code. They should
12962306a36Sopenharmony_ci   be compiled into executable file and copied into /usr/bin.
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_cimsdiag - Diagnostic
13262306a36Sopenharmony_ci===================
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci   This utility provides the function to display what Moxa Smartio/Industio
13562306a36Sopenharmony_ci   board was found by the driver in the system.
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_cimsmon - Port Monitoring
13862306a36Sopenharmony_ci=======================
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci   This utility gives the user a quick view about all the MOXA ports'
14162306a36Sopenharmony_ci   activities. One can easily learn each port's total received/transmitted
14262306a36Sopenharmony_ci   (Rx/Tx) character count since the time when the monitoring is started.
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci   Rx/Tx throughputs per second are also reported in interval basis (e.g.
14562306a36Sopenharmony_ci   the last 5 seconds) and in average basis (since the time the monitoring
14662306a36Sopenharmony_ci   is started). You can reset all ports' count by <HOME> key. <+> <->
14762306a36Sopenharmony_ci   (plus/minus) keys to change the displaying time interval. Press <ENTER>
14862306a36Sopenharmony_ci   on the port, that cursor stay, to view the port's communication
14962306a36Sopenharmony_ci   parameters, signal status, and input/output queue.
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_cimsterm - Terminal Emulation
15262306a36Sopenharmony_ci===========================
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci   This utility provides data sending and receiving ability of all tty ports,
15562306a36Sopenharmony_ci   especially for MOXA ports. It is quite useful for testing simple
15662306a36Sopenharmony_ci   application, for example, sending AT command to a modem connected to the
15762306a36Sopenharmony_ci   port or used as a terminal for login purpose. Note that this is only a
15862306a36Sopenharmony_ci   dumb terminal emulation without handling full screen operation.
15962306a36Sopenharmony_ci
16062306a36Sopenharmony_ci5. Setserial
16162306a36Sopenharmony_ci^^^^^^^^^^^^
16262306a36Sopenharmony_ci
16362306a36Sopenharmony_ci   Supported Setserial parameters are listed as below.
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ci   ============== =============================================================
16662306a36Sopenharmony_ci   uart		  set UART type(16450 --> disable FIFO, 16550A --> enable FIFO)
16762306a36Sopenharmony_ci   close_delay	  set the amount of time (in 1/100 of a second) that DTR
16862306a36Sopenharmony_ci		  should be kept low while being closed.
16962306a36Sopenharmony_ci   closing_wait   set the amount of time (in 1/100 of a second) that the
17062306a36Sopenharmony_ci		  serial port should wait for data to be drained while
17162306a36Sopenharmony_ci		  being closed, before the receiver is disabled.
17262306a36Sopenharmony_ci   spd_hi	  Use 57.6kb when the application requests 38.4kb.
17362306a36Sopenharmony_ci   spd_vhi	  Use 115.2kb when the application requests 38.4kb.
17462306a36Sopenharmony_ci   spd_shi	  Use 230.4kb when the application requests 38.4kb.
17562306a36Sopenharmony_ci   spd_warp	  Use 460.8kb when the application requests 38.4kb.
17662306a36Sopenharmony_ci   spd_normal	  Use 38.4kb when the application requests 38.4kb.
17762306a36Sopenharmony_ci   spd_cust	  Use the custom divisor to set the speed when the
17862306a36Sopenharmony_ci		  application requests 38.4kb.
17962306a36Sopenharmony_ci   divisor	  This option sets the custom division.
18062306a36Sopenharmony_ci   baud_base	  This option sets the base baud rate.
18162306a36Sopenharmony_ci   ============== =============================================================
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci6. Troubleshooting
18462306a36Sopenharmony_ci^^^^^^^^^^^^^^^^^^
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci   The boot time error messages and solutions are stated as clearly as
18762306a36Sopenharmony_ci   possible. If all the possible solutions fail, please contact our technical
18862306a36Sopenharmony_ci   support team to get more help.
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ci   Error msg:
19262306a36Sopenharmony_ci	      More than 4 Moxa Smartio/Industio family boards found. Fifth board
19362306a36Sopenharmony_ci              and after are ignored.
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ci   Solution:
19662306a36Sopenharmony_ci   To avoid this problem, please unplug fifth and after board, because Moxa
19762306a36Sopenharmony_ci   driver supports up to 4 boards.
198