How to install device driver of serial communication board for linux OS. 2019.01.24 CONTEC Co.,Ltd. How to install or uninstall driver of serial communication board for linux and content of directory are as follows. Readme composition ========================================================= 0.This Device Driver of serial License 1.Supporting kernel version of linux 2.Supporting board, card 3.Directory composition 4.How to install hardware 5.How to install driver 6.How to compile driver(PCI board, Card Bus) 7.How to compile driver(COM-1(PM), COM-1D(PM), COM-2(PM)) 8.How to delete driver 9.About function's reference 10.How to compile samples 11.How to use sample programs 12.How to load driver when restarting 13.Correspond to device file and board 14.About the number of used board at the same time 15.About 'setserial' 16.Attention 17.Version information ========================================================= File had been donwloaded in home directory To explain if The files which is compressed file are expanded in home directory. --------------------------------------------------------- 0.This Device Driver of serial License All the drivers are published in form of source code under GNU General Public License. Please refer to GNU General Public License announcement in driver's source code file for detail. --------------------------------------------------------- 1.Supporting kernel version of linux The device driver supporting kernel version are 2.2.x, 2.4.x and 2.6.x. However, this driver module might not operate by "Linux Distribution" used.(Remark 1) Test distribution - CentOS release 6.6 (Final) kernel 2.6.32-504.el6.x86_64 kernel 2.6.32-504.el6.i686 - Red Hat Enterprise Linux Server Ver.6.4 kernel 2.6.32-358.el6.x86_64 kernel 2.6.32-358.el6.i686 - Red Hat Enterprise Linux Server Ver.6.2 kernel 2.6.32-220.el6.x86_64 kernel 2.6.32-220.el6.i686 - Red Hat Enterprise Linux Server Ver.6.1 kernel 2.6.32-131.0.15.el6.x86_64 kernel 2.6.32-131.0.15.el6.i686 - Red Hat Enterprise Linux Server Ver.6.0 kernel 2.6.32-71.EL6 - CentOS release 5.9 kernel 2.6.18-348.el5.x86_64 kernel 2.6.18-348.el5PAE.i686 - CentOS release 5.8 kernel 2.6.18-308.el5.x86_64 kernel 2.6.18-308.el5.i686 - Red Hat Enterprise Linux Server Ver.5.7 kernel 2.6.18-274.el5.x86_64 - Red Hat Enterprise Linux Server Ver.5.1 kernel 2.6.18-53.EL5 PAE - Red Hat Enterprise Linux Desktop Ver.5 kernel 2.6.18-8.EL5 - Red Hat Enterprise Linux WS Ver.4 kernel 2.6.9-5.EL - Red Hat Linux Professional Workstation kernel 2.4.21-4.EL - Red Hat Linux 9.0 kernel 2.4.20-8 - Red Hat Linux 8.0 kernel 2.4.18-14 - Red Hat Linux 7.3 kernel 2.4.18-3 - Red Hat Linux 7.2 kernel 2.4.7-10 - Red Hat Linux 7.1 kernel 2.4.2 - Red Hat Linux 7.0 kernel 2.2.16-22 - Red Hat Linux 6.2 kernel 2.2.14 - Red Hat Linux 6.1 kernel 2.2.12 - Turbo Linux 11 Server SP1 kernel 2.6.23-10(x86_64) - Turbo Linux 11 Sever SP1 kernel 2.6.23-10 - Turbo Linux 11 Server kernel 2.6.23-2 - Turbo Linux 11 Fuji Basic Desktop kernel 2.6.13-2 - Turbo Linux 10.0 Server kernel 2.6.8-1 - Turbo Linux 10.0 kernel 2.6.0-test5_2 - Turbo Linux 8.0 kernel 2.4.18-1 - Turbo Linux 7.0 kernel 2.4.5-3 - Turbo Linux 6.0 kernel 2.2.13 Please remark the kernel or the distribution. - The other kernel version can not be used. - 64bit distribution can not be supported. (Remark 1) Linux kernel version 2.6.11 or later changed Sucker kernel development. As a result,this driver module might not operate by "Linux Distribution" used. (Remark 2) In the kernel 2.6.18 or faster, it is the SMP uncorrespondences. And, in the distribution to Red Hat Enterprise Linux 4 and TurboLinux 10 Server, it is the SMP uncorrespondences. --------------------------------------------------------- 2.Supporting board, card The following is what these board(& card) are used. COM-2(PCI)H, COM-4(PCI)H, COM-8(PCI)H, COM-2PD(PCI)H, COM-4PD(PCI)H, COM-1(LPCI)H, COM-2(LPCI)H, COM-4(LPCI)H, COM-1PD(LPCI)H, COM-2PD(LPCI)H, COM-2P(PCI)H, COM-4P(PCI)H, COM-2(PCI), COM-4(PCI), COM-8(PCI), COM-2PD(PCI), COM-8C-LPCI, CPS-COM-1PC, CPS-COM-2PC, CPS-COM-1PD, CPS-COM-2PD (Remark 1) COM-1C-LPE, COM-2C-LPE, COM-4C-LPE, COM-8C-LPE, COM-2C-PE, COM-4C-PE, COM-8C-PE, COM-2PC-PE, COM-4PC-PE, COM-2PD-PE, COM-4PD-PE, COM-1PDH-LPE, COM-2PD-LPE COM-1(CB)H, COM-2(CB)H, COM-4(CB)H, COM-2T(CB)H, COM-1PD(CB)H COM-1(PM), COM-1D(PM), COM-2(PM) But duplex board are only supported by COM-2PD(PCI), COM-2PD(PCI)H, COM-4PD(PCI)H, COM-1PD(CB)H, COM-1D(PM), COM-2PD-PE, COM-4PD-PE, COM-1PDH-LPE, COM-2PD-LPE, CPS-COM-1PD and CPS-COM-2PD. (Remark 1) PCI-Express Products is supported from kernel 2.4. --------------------------------------------------------- 3.Directory composition The files which are downloaded are expanded,the following directory is constructed. ~/contec/comdrv/setup.sh The ShellScript of installation /readmee Readme file(English) /readmej Readme file(Japanese) /driver The directory driver source /pcmcia The directory PCMCIA information file /rc.d The directory of automatic start /samples The directory of sample --------------------------------------------------------- 4.How to install hardware Set board's Board ID. Pay attention to the board ID only be set to the one board when the more than one same type board are used. Make sure the PC power is OFF. Make sure the module is conntected with PC. Ture on the power that is connected with PC, the OS is started. PC card no need setting Board ID. --------------------------------------------------------- 5.How to install driver 5-1. Move to 'root' by using command 'su'. 5-2. Move to '~/contec/comdrv'. 5-3. Execute './setup.sh'. 5-4. Return to user. 5-5. End. (Remark 1) The ShellScript is executed at first.According to execution, the following three files are created. uninstall.sh : delete driver. addmod.sh : load driver. delmod.sh : unload driver. moreover,the device files are created at the same time. (Remark 1)If you want to use the driver, plesae execute after you see " 6.How to compile driver". (Remark 2)You don't need execute 'addmod.sh' by COM-1(PM), COM-1D(PM), COM-2(PM) used. Please refer to [6.How to compile driver(COM-1(PM), COM-1D(PM), COM-2(PM))]. --------------------------------------------------------- 6.How to compile driver(PCI board, Card Bus) 6-1. Move to '~/contec/comdrv/driver'. 6-2. Execute 'make clean'. 6-3. Execute 'make'. According to above operations, driver can be compiled. Compiling driver is done by different kernel version. (Remark 3) 6-4. Move to 'root' by using command 'su'. 6-5. Move to '~/contec/comdrv/driver'. 6-6. Execute 'make install' According to above operations, driver is copied. 6-7. Move to '~/contec/comdrv'. 6-8. Execute './addmod.sh'. According to above operations, execute 'insmod' as soon as driver get the state of preparation. If driver has been get the state of preparation,please execute './delmod.sh'. The source file of driver is still in ~/contec/comdrv/driver. (Remark 3)If error occurs when compiling driver, the reason is that some include file are not installed. Please confirm whether there is directory as '/usr/src/linux' in environment. If it is not existing, you must install it by distribution CDRom. (Redhat7) Execute 'rpm -i kernel-source-2.2.16-22.i386.rpm' at CD - RedHat directory - RPMS directory. --------------------------------------------------------- 7.How to compile driver(COM-1(PM), COM-1D(PM), COM-2(PM)) COM-1(PM), COM-1D(PM), COM-2(PM) is different from PCI board. Please execute before you see "6-1. -- 6-6.". You need execute "7-1." with kernel 2.6.8 or earlier. You need execute "7-2." from kernel 2.6.9 to kernel 2.6.13. You need execute "7-3." with kernel 2.6.12 or later. 7-1. kernel 2.4.x and kernel 2.6.8 or earlier. 7-1-1. Copy file ~/contec/comdrv/pcmcia/contec_comdrv -> /etc/pcmcia directry. 7-1-2. Refer to ~/contec/comdrv/pcmcia/config, editing /etc/pcmcia/config file. Point of editting device... 2 line insert ahead of /etc/pcmcia/config file. ex.(device "3c589_cs"... 2 line is other company information) ^^^^^^^^ ^^^^^^^^ # # Device driver definitions # device "comdrv_cs" class "contec_comdrv" module "comdrv_cs" opts "Major=123" device "3c589_cs" class "network" module "3c589_cs" ^^^^^^^^ ^^^^^^^^ card... 6 line insert behind of /etc/pcmcia/config file. ex.(card "Zonet... 3 line is other company information) ^^^^^^^^ ^^^^^^^^ card "Zonet ZEN1200 CardBus Fast Ethernet PC Card" manfid 0x0000, 0x024C bind "8139too" card "CONTEC COM(PM) Card" manfid 0xc001, 0x8001 bind "comdrv_cs" card "CONTEC COM-2(PM) Card" manfid 0xc001, 0x8011 bind "comdrv_cs" # Include configuration files for add-on drivers ^^^^^^^^ ^^^^^^^^ 7-1-3. Restart OS. Restart OS, and PC card can be used. Insert PC card, and load driver. It is OK, insert PC card after OS start. 7-2. From kernel 2.6.9 to kernel 2.6.13. 7-2-1. Copy file ~/contec/comdrv/pcmcia/contec_comdrv -> /etc/pcmcia directry. 7-2-2. Refer to ~/contec/comdrv/pcmcia/config, editing /etc/pcmcia/config file. 7-2-3. Restart OS. Restart OS, and PC card can be used. Insert PC card, and load driver. It is OK, insert PC card after OS start. 7-2-4. Move to '~/contec/comdrv'. 7-2-5. Execute './addmod_cs.sh'. 7-3. kernel 2.6.14 or later. 7-3-1. Restart OS. 7-3-2. Move to '~/contec/comdrv'. 7-3-3. Execute './addmod_cs.sh'. According to above operations, restart 'udev' daemon. As soon as driver get the state of preparation. --------------------------------------------------------- 8.How to delete driver 8-1. Move to 'root' by using command 'su'. 8-2. Execute '~/contec/comdrv/uninstall.sh'. 8-3. Return to user. 8-4. End. All the files created and copied by setup.sh will be deleted after above ShellScript is executed. --------------------------------------------------------- 9.About function's reference This driver is based on standard tty driver. The standard system call such as open(), close(), read(), write(), so please refer to the help in OS for function reference. (There is no reference with this driver.) --------------------------------------------------------- 10.How to compile samples 10-1. Move to '~/contec/comdrv/samples'. 10-2. Execute 'make'. According to above operations, All samples under ~/contec/comdrv/samples will be compiled. --------------------------------------------------------- 11.How to use sample programs The following programs are prepared as sample programs. ~/contec/comdrv/samples/comread.c .. Reading Sample comsend.c .. Sending Sample comtest.c .. Diagnosis Sample 11-1. comread.c Reading data sample program. baud rate : 38400bps data length : 8, stop bit : 1, parity : none Run program and input reading board name. (Example) CH1 of COM-2(PCI)H is used /dev/ttyCom2Pci0 And then the read data will be displayed on CRT after reading data. The program end if there is a letter "z" at the beginning of read data. 11-2. comsend.c Sending data sample program. baud rate : 38400bps data length : 8, stop bit : 1, parity : none Run program and input sending board name. (Example) CH2 of COM-4(PCI)H is used /dev/ttyCom4Pci1 And then key-in the sending data, the data will be sent. The program terminate if the data sent is prefixed with a letter "z". 11-3. comtest.c Reading and Sending data sample program. Before this program is executed, the two COM boards used must be connected by crossing cable. baud rate : 38400bps data length : 8, stop bit : 1, parity : none Run program and input two board names. (Example) CH1 and CH2 of COM-8(PCI)H is used /dev/ttyCom8Pci0 /dev/ttyCom8Pci1 And then key-in the any data you want. After the data is inputted, it will be sent via one board. The read data will be displayed on CRT after the data is read by another board. (Port A -> Port B first, then Port B -> Port A) --------------------------------------------------------- 12.How to load driver when restarting The driver must be load every time during Linux starts. Please refer to the sample that reside in ~/contec/comdrv/rc.d/rc.local. And the file addmod.sh will be used that is created when the setup.sh is executed. --------------------------------------------------------- 13.Correspond to device file and file When the driver is installed the following device files will be created. And the device files correspond to boards as follows. Board type | Board ID | Device file ---------------+----------+-------------------------- ---------------+----------+-------------------------- COM-2(PCI)H | 0 | /dev/ttyCom2Pci0 COM-2(PCI) | | -- /dev/ttyCom2Pci1 | 1 | /dev/ttyCom2Pci2 | | -- /dev/ttyCom2Pci3 | 2 | /dev/ttyCom2Pci4 | | -- /dev/ttyCom2Pci5 | 3 | /dev/ttyCom2Pci6 | | -- /dev/ttyCom2Pci7 ---------------+----------+-------------------------- COM-4(PCI)H | 0 | /dev/ttyCom4Pci0 COM-4(PCI) | | -- /dev/ttyCom4Pci3 | 1 | /dev/ttyCom4Pci4 | | -- /dev/ttyCom4Pci7 | 2 | /dev/ttyCom4Pci8 | | -- /dev/ttyCom4Pci11 | 3 | /dev/ttyCom4Pci12 | | -- /dev/ttyCom4Pci15 ---------------+----------+-------------------------- COM-8(PCI)H | 0 | /dev/ttyCom8Pci0 COM-8(PCI) | | -- /dev/ttyCom8Pci7 | 1 | /dev/ttyCom8Pci8 | | -- /dev/ttyCom8Pci15 | 2 | /dev/ttyCom8Pci16 | | -- /dev/ttyCom8Pci23 | 3 | /dev/ttyCom8Pci24 | | -- /dev/ttyCom8Pci31 ---------------+----------+-------------------------- COM-2PD(PCI)H | 0 | /dev/ttyCom2pdPci0 COM-2PD(PCI) | | -- /dev/ttyCom2pdPci1 | 1 | /dev/ttyCom2pdPci2 | | -- /dev/ttyCom2pdPci3 | 2 | /dev/ttyCom2pdPci4 | | -- /dev/ttyCom2pdPci5 | 3 | /dev/ttyCom2pdPci6 | | -- /dev/ttyCom2pdPci7 ---------------+----------+-------------------------- COM-4PD(PCI)H | 0 | /dev/ttyCom4pdPci0 | | -- /dev/ttyCom4pdPci3 | 1 | /dev/ttyCom4pdPci4 | | -- /dev/ttyCom4pdPci7 | 2 | /dev/ttyCom4pdPci8 | | -- /dev/ttyCom4pdPci11 | 3 | /dev/ttyCom4pdPci12 | | -- /dev/ttyCom4pdPci15 ---------------+----------+-------------------------- COM-1(LPCI)H | 0 | /dev/ttyCom1LPci0 | | | 1 | /dev/ttyCom1LPci1 | | | 2 | /dev/ttyCom1LPci2 | | | 3 | /dev/ttyCom1LPci3 | | ---------------+----------+-------------------------- COM-2(LPCI)H | 0 | /dev/ttyCom2LPci0 | | -- /dev/ttyCom2LPci1 | 1 | /dev/ttyCom2LPci2 | | -- /dev/ttyCom2LPci3 | 2 | /dev/ttyCom2LPci4 | | -- /dev/ttyCom2LPci5 | 3 | /dev/ttyCom2LPci6 | | -- /dev/ttyCom2LPci7 ---------------+----------+-------------------------- COM-4(LPCI)H | 0 | /dev/ttyCom4LPci0 | | -- /dev/ttyCom4LPci3 | 1 | /dev/ttyCom4LPci4 | | -- /dev/ttyCom4LPci7 | 2 | /dev/ttyCom4LPci8 | | -- /dev/ttyCom4LPci11 | 3 | /dev/ttyCom4LPci12 | | -- /dev/ttyCom4LPci15 ---------------+----------+-------------------------- COM-1PD(LPCI)H | 0 | /dev/ttyCom1pdLPci0 | | | 1 | /dev/ttyCom1pdLPci1 | | | 2 | /dev/ttyCom1pdLPci2 | | | 3 | /dev/ttyCom1pdLPci3 | | ---------------+----------+-------------------------- COM-2PD(LPCI)H | 0 | /dev/ttyCom2pdLPci0 | | -- /dev/ttyCom2pdLPci1 | 1 | /dev/ttyCom2pdLPci2 | | -- /dev/ttyCom2pdLPci3 | 2 | /dev/ttyCom2pdLPci4 | | -- /dev/ttyCom2pdLPci5 | 3 | /dev/ttyCom2pdLPci6 | | -- /dev/ttyCom2pdLPci7 ---------------+----------+-------------------------- COM-2P(PCI)H | 0 | /dev/ttyCom2pPci0 | | -- /dev/ttyCom2pPci1 | 1 | /dev/ttyCom2pPci2 | | -- /dev/ttyCom2pPci3 | 2 | /dev/ttyCom2pPci4 | | -- /dev/ttyCom2pPci5 | 3 | /dev/ttyCom2pPci6 | | -- /dev/ttyCom2pPci7 ---------------+----------+-------------------------- COM-4P(PCI)H | 0 | /dev/ttyCom4pPci0 | | -- /dev/ttyCom4pPci3 | 1 | /dev/ttyCom4pPci4 | | -- /dev/ttyCom4pPci7 | 2 | /dev/ttyCom4pPci8 | | -- /dev/ttyCom4pPci11 | 3 | /dev/ttyCom4pPci12 | | -- /dev/ttyCom4pPci15 ---------------+----------+-------------------------- COM-8C-LPCI | 0 | /dev/ttyCom8cLPci0 | | --/dev/ttyCom8cLPci7 | 1 | /dev/ttyCom8cLPci8 | | --/dev/ttyCom8cLPci15 | 2 | /dev/ttyCom8cLPci16 | | --/dev/ttyCom8cLPci23 | 3 | /dev/ttyCom8cLPci24 | | --/dev/ttyCom8cLPci31 ---------------+----------+-------------------------- CPS-COM-1PC | 0 | /dev/ttyCom1pcCps0 | | | 1 | /dev/ttyCom1pcCps1 | | | 2 | /dev/ttyCom1pcCps2 | | | 3 | /dev/ttyCom1pcCps3 | | ---------------+----------+-------------------------- CPS-COM-2PC | 0 | /dev/ttyCom2pcCps0 | | -- /dev/ttyCom2pcCps1 | 1 | /dev/ttyCom2pcCps2 | | -- /dev/ttyCom2pcCps3 | 2 | /dev/ttyCom2pcCps4 | | -- /dev/ttyCom2pcCps5 | 3 | /dev/ttyCom2pcCps6 | | -- /dev/ttyCom2pcCps7 ---------------+----------+-------------------------- CPS-COM-1PD | 0 | /dev/ttyCom1pdCps0 | | | 1 | /dev/ttyCom1pdCps1 | | | 2 | /dev/ttyCom1pdCps2 | | | 3 | /dev/ttyCom1pdCps3 | | ---------------+----------+-------------------------- CPS-COM-2PD | 0 | /dev/ttyCom2pdCps0 | | -- /dev/ttyCom2pdCps1 | 1 | /dev/ttyCom2pdCps2 | | -- /dev/ttyCom2pdCps3 | 2 | /dev/ttyCom2pdCps4 | | -- /dev/ttyCom2pdCps5 | 3 | /dev/ttyCom2pdCps6 | | -- /dev/ttyCom2pdCps7 ---------------+----------+-------------------------- COM-1C-LPE | 0 | /dev/ttyCom1cLpe0 | | | 1 | /dev/ttyCom1cLpe1 | | | 2 | /dev/ttyCom1cLpe2 | | | 3 | /dev/ttyCom1cLpe3 | | ---------------+----------+-------------------------- COM-2C-LPE | 0 | /dev/ttyCom2cLpe0 | | -- /dev/ttyCom2cLpe1 | 1 | /dev/ttyCom2cLpe2 | | -- /dev/ttyCom2cLpe3 | 2 | /dev/ttyCom2cLpe4 | | -- /dev/ttyCom2cLpe5 | 3 | /devttyCom2cLpe6 | | -- /dev/ttyCom2cLpe7 ---------------+----------+-------------------------- COM-4C-LPE | 0 | /dev/ttyCom4cLpe0 | | -- /dev/ttyCom4cLpe3 | 1 | /dev/ttyCom4cLpe4 | | -- /dev/ttyCom4cLpe7 | 2 | /dev/ttyCom4cLpe8 | | -- /dev/ttyCom4cLpe11 | 3 | /dev/ttyCom4cLpe12 | | -- /dev/ttyCom4cLpe15 ---------------+----------+-------------------------- COM-8C-LPE | 0 | /dev/ttyCom8cLpe0 | | -- /dev/ttyCom8cLpe7 | 1 | /dev/ttyCom8cLpe8 | | -- /dev/ttyCom8cLpe15 | 2 | /dev/ttyCom8cLpe16 | | -- /dev/ttyCom8cLpe23 | 3 | /dev/ttyCom8cLpe24 | | -- /dev/ttyCom8cLpe31 ---------------+----------+-------------------------- COM-2C-PE | 0 | /dev/ttyCom2cPe0 | | -- /dev/ttyCom2cPe1 | 1 | /dev/ttyCom2cPe2 | | -- /dev/ttyCom2cPe3 | 2 | /dev/ttyCom2cPe4 | | -- /dev/ttyCom2cPe5 | 3 | /devttyCom2cPe6 | | -- /dev/ttyCom2cPe7 ---------------+----------+-------------------------- COM-4C-PE | 0 | /dev/ttyCom4cPe0 | | -- /dev/ttyCom4cPe3 | 1 | /dev/ttyCom4cPe4 | | -- /dev/ttyCom4cPe7 | 2 | /dev/ttyCom4cPe8 | | -- /dev/ttyCom4cPe11 | 3 | /dev/ttyCom4cPe12 | | -- /dev/ttyCom4cPe15 ---------------+----------+-------------------------- COM-8C-PE | 0 | /dev/ttyCom8cPe0 | | -- /dev/ttyCom8cPe7 | 1 | /dev/ttyCom8cPe8 | | -- /dev/ttyCom8cPe15 | 2 | /dev/ttyCom8cPe16 | | -- /dev/ttyCom8cPe23 | 3 | /dev/ttyCom8cPe24 | | -- /dev/ttyCom8cPe31 ---------------+----------+-------------------------- COM-2PC-PE | 0 | /dev/ttyCom2pcPe0 | | -- /dev/ttyCom2pcPe1 | 1 | /dev/ttyCom2pcPe2 | | -- /dev/ttyCom2pcPe3 | 2 | /dev/ttyCom2pcPe4 | | -- /dev/ttyCom2pcPe5 | 3 | /devttyCom2pcPe6 | | -- /dev/ttyCom2pcPe7 ---------------+----------+-------------------------- COM-4PC-PE | 0 | /dev/ttyCom4pcPe0 | | -- /dev/ttyCom4pcPe3 | 1 | /dev/ttyCom4pcPe4 | | -- /dev/ttyCom4pcPe7 | 2 | /dev/ttyCom4pcPe8 | | -- /dev/ttyCom4pcPe11 | 3 | /dev/ttyCom4pcPe12 | | -- /dev/ttyCom4pcPe15 ---------------+----------+-------------------------- COM-2PD-PE | 0 | /dev/ttyCom2pdPe0 | | -- /dev/ttyCom2pdPe1 | 1 | /dev/ttyCom2pdPe2 | | -- /dev/ttyCom2pdPe3 | 2 | /dev/ttyCom2pdPe4 | | -- /dev/ttyCom2pdPe5 | 3 | /devttyCom2pdPe6 | | -- /dev/ttyCom2pdPe7 ---------------+----------+-------------------------- COM-4PD-PE | 0 | /dev/ttyCom4pdPe0 | | -- /dev/ttyCom4pdPe3 | 1 | /dev/ttyCom4pdPe4 | | -- /dev/ttyCom4pdPe7 | 2 | /dev/ttyCom4pdPe8 | | -- /dev/ttyCom4pdPe11 | 3 | /dev/ttyCom4pdPe12 | | -- /dev/ttyCom4pdPe15 ---------------+----------+-------------------------- COM-1PDH-LPE | 0 | /dev/ttyCom1pdhLpe0 | | | 1 | /dev/ttyCom1pdhLpe1 | | | 2 | /dev/ttyCom1pdhLpe2 | | | 3 | /dev/ttyCom1pdhLpe3 | | ---------------+----------+-------------------------- COM-2PD-LPE | 0 | /dev/ttyCom2pdLpe0 | | -- /dev/ttyCom2pdLpe1 | 1 | /dev/ttyCom2pdLpe2 | | -- /dev/ttyCom2pdLpe3 | 2 | /dev/ttyCom2pdLpe4 | | -- /dev/ttyCom2pdLpe5 | 3 | /dev/ttyCom2pdLpe6 | | -- /dev/ttyCom2pdLpe7 ---------------+----------+-------------------------- COM-1(CB)H | | /dev/ttyCom1Cb0 | | ---------------+----------+-------------------------- COM-2(CB)H | | /dev/ttyCom2Cb0 | | -- /dev/ttyCom2Cb1 ---------------+----------+-------------------------- COM-4(CB)H | | /dev/ttyCom4Cb0 | | -- /dev/ttyCom4Cb3 ---------------+----------+-------------------------- COM-2T(CB)H | | /dev/ttyCom2tCb0 | | -- /dev/ttyCom2tCb1 ---------------+----------+-------------------------- COM-1PD(CB)H | | /dev/ttyCom1pdCb0 | | ---------------+----------+-------------------------- COM-1(PM) | | /dev/ttyCom1Pm0 or | | COM-1D(PM) | | ---------------+----------+-------------------------- COM-2(PM) | | /dev/ttyCom2Pm0 | | -- /dev/ttyCom2Pm1 ex)If the board COM-4(PCI)H is used and the Board ID is set to 0, the following device files will be created. /dev/ttyCom4Pci0 ... CH1 of board /dev/ttyCom4Pci1 ... CH2 of board /dev/ttyCom4Pci2 ... CH3 of board /dev/ttyCom4Pci3 ... CH4 of board When making program, device is opened by device file such as [/dev/ttyCom4Pci0]. --------------------------------------------------------- 14.About the number of used board at the same time The maximum number of same board is 4 in default status. But PC card is only one. Same PC card are not used at the same time. ex)Using four COM-2(PCI)H The first board : set 0 to BoardID-- /dev/ttyCom2Pci0 /dev/ttyCom2Pci1 The second board: set 1 to BoardID-- /dev/ttyCom2Pci2 /dev/ttyCom2Pci3 The third board : set 2 to BoardID-- /dev/ttyCom2Pci4 /dev/ttyCom2Pci5 The fourth board: set 3 to BoardID-- /dev/ttyCom2Pci6 /dev/ttyCom2Pci7 Except the same of board can be combined, different boards can be used at the same time in the display range via [13.correspond to device file and file]. if five and over same board are used at the same time, please setup again after the following files are amended. (But COM-4(PCI) is 8 boards MAX. PC card is 1 card MAX.) 14-1. ~/contec/comdrv/setup.sh COM2PCI_COUNT=4 <-(1) COM4PCI_COUNT=4 <-(2) COM8PCI_COUNT=4 <-(3) COM2PDPCI_COUNT=4 <-(4) COM4PDPCI_COUNT=4 <-(5) COM1LPCI_COUNT=4 <-(6) COM2LPCI_COUNT=4 <-(7) COM4LPCI_COUNT=4 <-(8) COM2PPCI_COUNT=4 <-(9) COM4PPCI_COUNT=4 <-(10) COM1PDLPCI_COUNT=4 <-(11) COM2PDLPCI_COUNT=4 <-(12) COM8CLPCI_COUNT=4 <-(13) COM1CLPE_COUNT=4 <-(14) COM2CLPE_COUNT=4 <-(15) COM4CLPE_COUNT=4 <-(16) COM8CLPE_COUNT=4 <-(17) COM2CPE_COUNT=4 <-(18) COM4CPE_COUNT=4 <-(19) COM8CPE_COUNT=4 <-(20) COM2PCPE_COUNT=4 <-(21) COM4PCPE_COUNT=4 <-(22) COM2PDPE_COUNT=4 <-(23) COM4PDPE_COUNT=4 <-(24) COM1PDHLPE_COUNT=4 <-(25) COM2PDLPE_COUNT=4 <-(26) CPSCOM1PC_COUNT=4 <-(27) CPSCOM2PC_COUNT=4 <-(28) CPSCOM1PD_COUNT=4 <-(29) CPSCOM2PD_COUNT=4 <-(30) Form default number(4), please change the number of using board. COM-2(PCI)H,COM-2(PCI) : Change (1) place COM-4(PCI)H,COM-4(PCI) : Change (2) place COM-8(PCI)H,COM-8(PCI) : Change (3) place COM-2PD(PCI)H,COM-2PD(PCI): Change (4) place COM-4PD(PCI)H : Change (5) place COM-1(LPCI)H : Change (6) place COM-2(LPCI)H : Change (7) place COM-4(LPCI)H : Change (8) place COM-2P(PCI)H : Change (9) place COM-4P(PCI)H : Change (10) place COM-1PD(LPCI)H : Change (11) place COM-2PD(LPCI)H : Change (12) place COM-8C-LPCI : Change (13) place COM-1C-LPE : Change (14) place COM-2C-LPE : Change (15) place COM-4C-LPE : Change (16) place COM-8C-LPE : Change (17) place COM-2C-PE : Change (18) place COM-4C-PE : Change (19) place COM-8C-PE : Change (20) place COM-2PC-PE : Change (21) place COM-4PC-PE : Change (22) place COM-2PD-PE : Change (23) place COM-4PD-PE : Change (24) place COM-1PDH-LPE : Change (25) place COM-2PD-LPE : Change (26) place CPS-COM-1PC : Change (27) place CPS-COM-2PC : Change (28) place CPS-COM-1PD : Change (29) place CPS-COM-2PD : Change (30) place ex)Change COM-8(PCI)H to five COM8PCI_COUNT=5 14-2. ~/contec/comdrv/driver/comdrv.h * When PCI Board set #ifndef LINUX_PCI_EXP static CONTEC_PCI_SIO_INFO SupportedPciB.... { "COM-2(PCI)H", 0x1221,0x8131,1,4,....(1) { "COM-4(PCI)H", 0x1221,0x8111,1,4,....(2) { "COM-8(PCI)H", 0x1221,0x8151,1,4,....(3) { "COM-2PD(PCI)H", 0x1221,0x8141,1,4,....(4) { "COM-4PD(PCI)H", 0x1221,0x8161,1,4,....(5) { "COM-1(LPCI)H", 0x1221,0x8171,1,4,....(6) { "COM-2(LPCI)H", 0x1221,0x8181,1,4,....(7) { "COM-4(LPCI)H", 0x1221,0x8191,1,4,....(8) { "COM-2P(PCI)H", 0x1221,0x81A1,1,4,....(9) { "COM-4P(PCI)H", 0x1221,0x81B1,1,4,....(10) { "COM-1PD(LPCI)H",0x1221,0x81D1,1,4,....(11) { "COM-2PD(LPCI)H",0x1221,0x81E1,1,4,....(12) { "COM-8C-LPCI", 0x1221,0x9131,1,4,....(13) { "CPS-COM-1PC", 0x1221,0xE104,1,4,....(27) { "CPS-COM-2PC", 0x1221,0xE104,1,4,....(28) { "CPS-COM-1PD", 0x1221,0xE104,1,4,....(29) { "CPS-COM-2PD", 0x1221,0xE104,1,4,....(30) }; * When PCI Express Board set #else static CONTEC_PCI_SIO_INFO SupportedPciB.... { "COM-1C-LPE", 0x1221,0x8621,1,4,....(14) { "COM-2C-LPE", 0x1221,0x8611,1,4,....(15) { "COM-4C-LPE", 0x1221,0x8601,1,4,....(16) { "COM-8C-LPE", 0x1221,0x86A1,1,4,....(17) { "COM-2C-PE", 0x1221,0x8631,1,4,....(18) { "COM-4C-PE", 0x1221,0x8641,1,4,....(19) { "COM-8C-PE", 0x1221,0x8651,1,4,....(20) { "COM-2PC-PE", 0x1221,0x8661,1,4,....(21) { "COM-4PC-PE", 0x1221,0x8671,1,4,....(22) { "COM-2PD-PE", 0x1221,0x8681,1,4,....(23) { "COM-4PD-PE", 0x1221,0x8691,1,4,....(24) { "COM-1PDH-LPE", 0x1221,0x86B1,1,4,....(25) { "COM-2PD-LPE", 0x1221,0x86C1,1,4,....(26) }; Form default number(4), please change the number of using board. COM-2(PCI)H,COM-2(PCI) : Change (1) place COM-4(PCI)H,COM-4(PCI) : Change (2) place COM-8(PCI)H,COM-8(PCI) : Change (3) place COM-2PD(PCI)H,COM-2PD(PCI): Change (4) place COM-4PD(PCI)H : Change (5) place COM-1(LPCI)H : Change (6) place COM-2(LPCI)H : Change (7) place COM-4(LPCI)H : Change (8) place COM-2P(PCI)H : Change (9) place COM-4P(PCI)H : Change (10) place COM-1PD(LPCI)H : Change (11) place COM-2PD(LPCI)H : Change (12) place COM-8C-LPCI : Change (13) place COM-1C-LPE : Change (14) place COM-2C-LPE : Change (15) place COM-4C-LPE : Change (16) place COM-8C-LPE : Change (17) place COM-2C-PE : Change (18) place COM-4C-PE : Change (19) place COM-8C-PE : Change (20) place COM-2PC-PE : Change (21) place COM-4PC-PE : Change (22) place COM-2PD-PE : Change (23) place COM-4PD-PE : Change (24) place COM-1PDH-LPE : Change (25) place COM-2PD-LPE : Change (26) place CPS-COM-1PC : Change (27) place CPS-COM-2PC : Change (28) place CPS-COM-1PD : Change (29) place CPS-COM-2PD : Change (30) place ex)Change COM-8(PCI)H to five { "COM-8(PCI)H", 0x1221,0x8151,1,5,.... 14-3. Setup again Please compile the driver again. About the method of compiling. Please refer to [6.How to compile driver]. When setup.sh had been already done, please restart OS again once executing uninstall.sh. And then, Please setup by referring to [5.How to install driver]. --------------------------------------------------------- 15.About 'setserial' It is not necessary to execute the Setserial at this device driver. The I/O address and IRQ will be allocated automatically. UART is 16550A. The baud rate, data length and so on will be set when the communication program is executed. --------------------------------------------------------- 16.Attention 16-1. Hardware platform Only can be used in Intel x86 system. It can not be used in other platform(Alpha, MIPS, ...). 16-2. About supported baud rate The following baud rates is supported. COM-2(PCI)H, COM-4(PCI)H, COM-8(PCI)H, COM-2PD(PCI)H, COM-4PD(PCI)H, COM-1(LPCI)H, COM-2(LPCI)H, COM-4(LPCI)H, COM-2P(PCI)H, COM-4P(PCI)H, COM-2PD(PCI), COM-1PD(LPCI)H, COM-2PD(LPCI)H, COM-8C-LPCI, COM-1(CB)H, COM-2(CB)H, COM-4(CB)H, COM-2T(CB)H, COM-1PD(CB)H, COM-1C-LPE, COM-2C-LPE, COM-4C-LPE, COM-8C-LPE, COM-2C-PE, COM-4C-PE, COM-8C-PE, COM-2PC-PE, COM-4PC-PE, COM-2PD-PE, COM-4PD-PE, COM-1PDH-LPE, COM-2PD-LPE, CPS-COM-1PC, CPS-COM-2PC, CPS-COM-1PD, CPS-COM-2PD 921600, 460800, 230400, 115200, 57600, 38400, 28800, 19200, 9600, 4800, 2400, 2000, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, 50 COM-2(PCI), COM-4(PCI), COM-8(PCI) 230400, 115200, 57600, 38400, 28800, 19200, 9600, 4800, 2400, 2000, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, 50 COM-1(PM), COM-1D(PM), COM-2(PM) 115200, 57600, 38400, 28800, 19200, 9600, 4800, 2400, 2000, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, 50 16-3. About half duplex communication COM-2PD(PCI)H, COM-4PD(PCI)H, COM-2PD(PCI), COM-1PD(CB)H, COM-1D(PM), COM-2PD-PE, COM-4PD-PE, COM-1PDH-LPE, COM-2PD-LPE, CPS-COM-1PD and CPS-COM-2PD only support full duplex communication and do not support half duplex communication. 16-4. About IRQ is not allocated from Linux kernel version 2.6.11 or later When the Sample program operate, Linux kernel version 2.6.11 (or later) output message "[IRQ #XXX Disabled]" . It might be that IRQ is not allocated. To solve it, BootLoader's configuration file is changed. For example 1, GRUB Boot loader changed: Case 1. In the "grub.conf" addes kernel option "acpi=noirq". kernel /boot/vmlinuz-2.6.18-8.EL ro root=/dev/sda1 acpi=noirq Case 2. In the "grub.conf" addes kernel option "irqpoll". kernel /boot/vmlinuz-2.6.18-8.EL ro root=/dev/sda1 irqpoll 16-5.About the generated phenomenon for Kernel remake This driver module's operation is not warrantable for remake Kernel. --------------------------------------------------------- 17.Version information Ver.2.96->Ver.2.97 2019/01/24 - The following boards stacked on CPS-BXC200 are added and supported. CPS-COM-1PC, CPS-COM-2PC, CPS-COM-1PD, CPS-COM-2PD Ver.2.95->Ver.2.96 2018/11/30 - The following boards are added and supported. COM-1PDH-LPE, COM-2PD-LPE Ver.2.94->Ver.2.95 2016/06/14 - Checking was made on the following distributions CentOS release 5.9 2.6.18-348.el5.x86_64, 2.6.18-348.el5PAE.i686 - Fixed an issue that can not send data for 10 seconds during the continuous transmission data in the Kernel 2.6.18 or later. Ver.2.93->Ver.2.94 2016/03/28 - Checking was made on the following distributions CentOS release 5.8 2.6.18-308.el5.x86_64, 2.6.18-308.el5.i686 - Fixed an issue that may be 4096byte sent regardless of the transmission data in the Kernel 2.6.18 or later. Ver.2.92->Ver.2.93 2015/01/16 - Checking was made on the following distributions CentOS release 6.6 (Final) 2.6.32-504.el6.x86_64, 2.6.32-504.el6.i686 - The following boards are added and supported. COM-8C-LPCI, COM-8C-LPE Ver.2.91->Ver.2.92 2013/08/01 - Fixed the problem that the module name of PCI board is the same as PCI Express board when executing addmod.sh on RedHat Enterprise Linux 6.2 or later. - Fixed the problem that kernel Panic occurs in the case of continuous communication on Enterprise Linux 6.x on SMP PC. Ver.2.90->Ver.2.91 2013/05/07 - Fixed the problem that a kernel panic occurs when executing uninstall.sh on RedHat Enterprise Linux 6.2 or later. - Fixed the problem that the driver used for PCI Express board cannot be installed after performed setup.sh on RedHat Enterprise Linux 6.2 or later. - Fixed the problem that compile errors occurred when building on kernel 2.4. This problem occurred on Ver.2.84 or later. - Checking was made on the following distributions Red Hat Enterprise Linux Server Ver.6.2 2.6.32-220.el6.x86_64, 2.6.32-220.el6.i686 Red Hat Enterprise Linux Server Ver.6.4 2.6.32-358.el6.x86_64, 2.6.32-358.el6.i686 Red Hat Enterprise Linux Server Ver.5.7 2.6.18-274.el5.x86_64 Ver.2.85->Ver.2.90 2013/03/07 - Checking 64bit was introduced in the following distributions Red Hat Enterprise Linux Server Ver.6.1 2.6.32-131.0.15.el6.x86_64 Turbo Linux 11 server 2.6.23-10(x86_64) Ver.2.84->Ver.2.85 2012/09/06 - Be checked SMP-kenrel with 2.6.18 or later. - Checking SMP-kernel was introduced in the following distributions Red Hat Enterprise Linux5 2.6.18-8.el5 Red Hat Enterprise Linux6 2.6.32-71.el6.i686 Turbo Linux 11 server 2.6.23-2 Turbo Linux 11 server SP1 2.6.23-10 Ver.2.83->Ver.2.84 2012/05/28 - Be supported at Red Hat Enterprise Linux Ver.6 kernel 2.6.32-71.EL6. - Be supported at TurboLinux 11 Server kernel 2.6.23-2. - Be supported at TurboLinux 11 Server SP1 kernel 2.6.23-10. - When many COM-4(PCI)H are used Redhat Enterprise Ver.5, all port cannot be communicate. It is corrected. - When Serialport continued opening port and closing port, it wasn't return the open. It is corrected. Ver.2.82->Ver.2.83 2010/07/21 - The problem that occurs when the COM port is closed in the specific order after it opens more than two ports is corrected. (with kernel 2.6.18) It is corrected. Ver.2.81->Ver.2.82 2009/12/28 - Ver2.81 PCMCIA driver make error with Redhat Enterprise Linux Ver.4. It is corrected. - gcc make error with VineLinux 2.6r4(kernel 2.4.22-0vl2.10). It is corrected. Ver.2.80->Ver.2.81 2009/04/28 - PCMCIA products does not recognize TurboLinux 11 Fuji. It is corrected. - CardBus products does not recognize Specific CardBus adaptor with kernel 2.6. It is corrected. - Changes ldisc structure with kernel 2.6.27 or later, because gcc fails to make driver's files. It is corrected. - Be supported at Red Hat Enterprise Linux Server Ver.5.1 kernel 2.6.18-53.EL5PAE. Ver.2.74->Ver.2.80 2009/01/15 - Be supported at Red Hat Enterprise Linux Desktop Ver.5 kernel 2.6.18-8.EL5. - Be supported at TurboLinux Fuji Basic kernel 2.6.13-2. Ver.2.73->Ver.2.74 2008/12/04 - Changes from termios to ktermios kernel 2.6.19 or later, because gcc fails to make driver's files. It is corrected. Ver.2.72->Ver.2.73 2008/11/10 - Insmod Driver module , /var/log/messages output when port's initialization successes. Ver.2.71->Ver.2.72 2008/08/10 - Support COM-4(PCI)H with SVA-8851-LVA. Ver.2.70->Ver.2.71 2008/06/19 - Changes tty_driver method filp_buffer kernel 2.6.13 or later, because gcc fails to make driver's files. It is corrected. Ver.2.61->Ver.2.70 2007/08/24 - The following PCI Express boards are added and supported. COM-2C-PE, COM-4C-PE, COM-8C-PE, COM-2PC-PE, COM-4PC-PE, COM-2PD-PE, COM-4PD-PE Ver.2.60->Ver.2.61 2006/10/31 - gcc fails to make driver's files.[A part of kernel 2.6 only.] It is corrected. Ver.2.52->Ver.2.60 2005/11/1 - Be supported at Red Hat Enterprise Linux WS Ver.4 kernel 2.6.9-5.EL. - When addmod.sh is executed cannot create device ttyCom1pdLPci and ttyCom2pdLPci. This problem was solved. - The following PCI Express boards are added and supported. COM-1C-LPE, COM-2C-LPE, COM-4C-LPE Ver.2.51->Ver.2.52 2005/10/12 - Modem status cannot get(or set) with Kernel 2.6 only. This problem was solved. Ver.2.50->Ver.2.51 2005/9/15 - When addmod.sh is executed when logging it in in the cereal log in and the getty command, it is not possible to log it in in standard COM port. Afterwards, when delmod.sh is done, it is not possible to communicate even with the board. This problem was solved. Ver.2.40->Ver.2.50 2005/5/19 - Be supported at Turbo Linux 10.0 Server kernel 2.6.8-1. - Be supported at Turbo Linux 10.0 kernel 2.6.0-test5_2. - The following boards are added and supported. COM-1PD(LPCI)H, COM-2PD(LPCI)H Ver.2.30->Ver.2.40 2004/11/30 - The following PC cards(Card Bus) are added and supported. COM-1PD(CB)H (It is only supports full duplex) Ver.2.20->Ver.2.30 2004/8/24 - The following PC cards(Card Bus) are added and supported. COM-1(CB)H, COM-2(CB)H, COM-2T(CB)H Ver.2.10->Ver.2.20 2004/1/30 - Be supported at Redhat Linux Professional Workstation. - The problem that addmod.sh error when not using board is solved. - The problem that compile error when using PC card is solved. Ver.2.00->Ver.2.10 2003/7/17 - Be supported at Redhat Linux 9. - Be supported at Redhat Linux 8. - The following PC cards(PCMCIA) are added and supported. COM-1(PM), COM-1D(PM), COM-2(PM) Ver.1.51->Ver.2.00 2002/12/26 - Be supported at Redhat Linux 7.3. - Be supported at Turbo Linux 8 WorkStation. Ver.1.50->Ver.1.51 2002/8/8 - The problem that open error when using COM-4(CB)H is solved. Ver.1.40->Ver.1.50 2002/4/25 - The following boards are added and supported. COM-1(LPCI)H, COM-2(LPCI)H, COM-4(LPCI)H, COM-2P(PCI)H, COM-4P(PCI)H, COM-4(CB)H Ver.1.32->Ver.1.40 2002/4/5 - Be supported at Turbo Linux 7 WorkStation. Ver.1.31->Ver.1.32 2002/3/28 - The problem that board can be received when opening the board in receiving data from other computer is solved. Ver.1.30->Ver.1.31 2002/3/26 - The problem that correct baud rate is not set when using COM-2PD(PCI) is solved. (Have not the problem when using COM-2PD(PCI)H) Ver.1.20->Ver.1.30 2001/8/22 - The following boards are added and supported. COM-2(PCI)H, COM-4(PCI)H, COM-8(PCI)H, COM-2PD(PCI)H, COM-4PD(PCI)H (It is only supports full duplex with COM-2PD(PCI)H, COM-4PD(PCI)H) - Be Supported at ART-Linux. (But driver need to be compiled again in ART-Linux.) (About the method of compiling, please refer to [6.How to compile driver].) - When more than one same board are used at the same time, the problem of correspondence beween device file and board is solved. - The problem that the following message is occurred is solved. "Bad boy : Contec Sio Driver (at 0xXXXXXXXX) called us without a dev_id !" Ver.1.10->Ver.1.20 2001/6/27 - Support LINUX kernel 2.4. Ver. 1.00 -> Ver. 1.10 2001/5/30 - PCI IRQ share supported. - The problems of using it with IO-LIB(LNX), segmentation error or mount floppy fault,are to be solved. Ver. 1.00 - The following boards are to be supported. COM-2(PCI),COM-4(PCI),COM-8(PCI),COM-2PD(PCI) (It is only supports full duplex with COM-2PD(PCI))