VCOM 2.0 Driver for Linux
Installation Guide
Revision Date Revision Description Author
2019/2/11 V1.2 Third Edition
Jay Wu
2020/5/5 V1.3 4
th
Edition With SerialCom Tool Example
Calvin Lin
2021/12/28 V1.4 5
th
Edition With DKMS & OpenSSL Information
Calvin Lin
ICG.Support@advantech.com.tw
VCOM 2.0 Driver Feature List
Features Enhancement
VCOM
TCP Redundancy
Manual Mapping for Basic Debug Message
Devices Support List
ADAM-4570-BE/CE
ADAM-4570L-CE/DE
ADAM-4571-BE/CE
ADAM-4571L-CE/DE
EKI-1521/2/4/8/6(I)(CI)-AE/BE/CE
VCOM Driver Version Comparison
Comparison Table
Driver Version VCOM Driver Ver. 1.0 VCOM Driver Ver. 2.0
Driver Name
iCom_Linux_Pseudo_TTY_Driver_v1.4.1 vcom_linux_2.2.1
Pre-
built Binary
Support List
Red Hat 9 (Kernel 2.4.20-8)
Red Hat Enterprise 5.4 (Kernel 2.6.18-164.el5)
Fedora Core 13 (64bit) (Kernel 2.6.33.3-85.fc13)
Fedora Core 14 (Kernel 2.6.35.6-45.fc14)
Fedora Core 16 (Kernel 3.1.0-7.fc16)
OpenSUSE 10.1 (Kernel 2.6.16.13-4-default)
OpenSUSE 11.2 (Kernel 2.6.31.5-0.1-desktop)
Mandriva 2010 (Kernel 2.6.31.5-desktop-1mnb)
Debian 5.0.4 (Kernel 2.6.26-2-686)
Ubuntu 8.04 (Kernel 2.6.24-19-generic)
Ubuntu 11.10 (Kernel 3.0.0-12-generic)
Ubuntu 14.04 LTS (64bit) (Kernel 3.13.0-48-generic)
Ubuntu 16.04 LTS (64bit) (Kernel 4.04.0-21-generic)
Ubuntu 18.04 LTS (64bit) (Kernel 4.15.0-23-generic)
OpenSUSE 13.2 (32bit) (Kernel 13.16)
Linux-Mint 18.3 (64bit) (Kernel 4.10)
CentOS 7.2 1511 (64bit) (Kernel 3.10.0-327)
CentOS 7.4 1708 (64bit) (Kernel 3.10.0-693)
CentOS 7.6 1810 (64bit) (Kernel 3.10.0-957)
Before installing, please double check these points...
1. IP address
To configure the IP address of device server, and make sure that the
communication is working
2. VCOM mode
Launch browser and check the operation mode that is configured to VCOM
mode on Web GUI
Before installing, please double check these points...
3. Identify the HW version
The BE ver. is different naming rule from AE in our Linux driver. If you are using
EKI-1522(I)-AE, please fill the name of 1522 to advttyd.conf.
EKI-1522(I)-BE, please fill the name of b522 to advttyd.conf
EKI-1522(I)-CE, please fill the name of c522 to advttyd.conf
EKI-1524(I)-AE, please fill the name of 1524 to advttyd.conf.
EKI-1524(I)-BE, please fill the name of b524 to advttyd.conf
EKI-1524(I)-CE, please fill the name of c524 to advttyd.conf
EKI-1512-AE, please fill the name of 1512 to advttyd.conf
For example:
If you are using the EKI-1522-AE
[Minor]
[Device
-
Type]
[Device
-
IP]
[Port
-Idx
]
0 1522 10.0.0.1 1
If you are using the EKI-1522-BE
[Minor]
[Device
-
Type]
[Device
-
IP]
[Port
-Idx
]
0 B522 10.0.0.1 1
Installation Procedure
*Note: For detailed information for latest version, please refer to the
Readme.txt file with the driver.
Installation Step
Log in as
“Root Privilege”
Copy and Extract
the VCOM Driver
Install the
Development Kit for
Kernel
Compile the VCOM
Driver
Configure the
VCOM Setting
Install the
VCOM Driver and
Setting
Load the Driver into
the Kernel
Enable the VCOM
Stop the VCOM
enabling
1. Open the terminal of Linux.
2. Key in “sudo suto get the root privilege.
3. Fill in the Root’s password “
xxxxxxx
that you created
Log in as “Root Privilege"
Key in “sudo su
Fill in the Root’s password
1. Key in “cd Desktopto change the direction to the desktop.
2. Key in “tar jxv f vcom_linux_2.2.0.tar.bz2to extract the
VCOM file to the desktop.
3. Make sure internet is available.
Copy and Extract the VCOM Driver
Key in “cd Desktop
*Please note the uppercase letters.*
Key in “tar jxv f vcom_linux_2.2.0.tar.bz2
*Please note the uppercase letters.*
The VCOM folder has been extracted
For Ubuntu/Linux-Mint family ,
Key in: “#sudo apt-get install build-essential linux-headers-generic
For CentOS/RHEL/Fedora,
Key in: “# dnf install kernel-devel kernel-headers gcc make
or “# yum install kernel-devel kernel-headers gcc make(for Early RedHat
systems (before CentOS 7/RHEL 7/Fedora 21))
Install the Development Kit for Kernel
Please make sure that you are connecting with internet.
*If you are already installing it at before, please ignore it.*
Click “y” to continue the process
If your Linux is CentOS/RHEL/Fedora, kernel is under 3.10. Please modify below
file //vcom_linux_2.2.1/driver/adv_uart.c to remark flow control function and then
save the file.
For more information, please reference readme.txt file.
Install the Development Kit for Kernel
For Ubuntu/Linux-Mint family ,
Key in:
“#sudo apt-get install dkms
“#sudo apt-get install openssl libssl-dev
For CentOS/RHEL/Fedora,
Key in:
“# dnf install openssl-devel
“# dnf install openssl
“# dnf install dkms
* On CentOS 7, DKMS is included in the “EPEL”(Extended Packages for Enterpirse Linux).
One would need to enable EPEL with the following command:
“# yum install -y epel-release”
“# yum install openssl-devel
“# yum install openssl
“# yum install dkms
Install the DKMS & OpenSSL (v2.2.3 or later)
*Note: Important- Once you upgrade and install finished, please reboot your Linux OS.
For detailed information for latest version, please refer to the Readme.txt file with the driver.
(Started with “yum” for Early RedHat systems
(before CentOS 7/RHEL 7/Fedora 21))
1. Key in “cd vcom_linux_2.2.1to get into the driver folder.
(Change the folder path according to where you extract the files.)
2. Key in “maketo compile the VCOM driver.
Compile the VCOM Driver
Key in “cd vcom_linux_2.x.x
*Please note the uppercase letters.*
Key in “make
*Please note the uppercase letters.*
1. Key in “vi config/advttyd.confto edit the VCOM setting.
2. To edit the setting.
Configure the VCOM Setting
Key in “vi config/advttyd.conf
Or “vim config/advttyd.conf
according to the editor used.
*Please note the uppercase letters.*
Press “i” to enter the “Editor Mode”
Press “ESC” back to the “Normal Mode”
After returning to “Normal mode”, please using “:wq to save the setting.
You can edit the setting in this file
Set VCOM number from 0 to 1
Device is using the EKI-1522-BE
IP address is 192.168.250.119
COM port are using Port 1 and Port 2
Example
Key in “sudo make install
*Please note the uppercase letters.*
Install the VCOM Driver and Setting
Load the Driver into the Kernel
Key in sudo advman -o insertto Load the driver into the
kernel.
Enable the VCOM
Key in sudo advman -o start” to enable the VCOM.
Note that start this is like enabling the service of VCOM. You still
need other serial communication tool to establish the communication.
Also, you can use the “sudo ls /proc/vcom/” command to
confirm the VCOM is enabling.
Stop the VCOM enabling
Key in sudo advman -o stopto close the VCOM.
Serial Communication Tool Example
- PuTTY
- minicom
Installing Serial Communication Tool (1/2)
PuTTY may more feasible to Desktop version of Ubuntu.
Key in “sudo apt-get install puttyto install.
Check the user group that authorized to access the VCOM device.
In this sample, the accessible user groups are root and dialout.
Key in “sudo adduser username usergroupto add the user to
specific user group. Reboot after adding.
Without correct privilege, PuTTY may not able to work with the VCOM device.
Installing Serial Communication Tool (2/2)
minicom may more feasible to Server version of Ubuntu. Its UI is
text only.
Key in “sudo apt-get install minicomto install.
minicom does not need to modify the user group.
Activating Serial Communication Tool (1/2)
Key in “putty” with terminal or run PuTTY directly.
Select the connection type as Serial and change the device name,
for example, “/dev/ttyADV0”. Set the Baud rate.
Click Open to actually activate the VCOM connection.
Key in “minicom -s” with terminal to configure minicom, or key in
minicomto run minicom directly.
You can change the Serial port setup with enabled serial device, for
example, “/dev/ttyADV0”. Set the Baud rate, parity and stop bit.
Save setup as dfl, and exit to run minicom.
Activating Serial Communication Tool (2/2)
Exit
Serial port setup
Run minicom directlyRun minicom -s
Frequently Asked Questions
Questions list
1. How many VCOM ports that I can create?
2. Why can’t read the data from “/dev/vttyAP0” ?
3. Do I need to remove the VCOM driver before I
remapping the VCOM?
4. How can I see the debug message on the console?
Question 1
How many VCOM ports that I can create?
Ans: The maximum numbers of VCOM ports are up to 2 powers
of 20.
Default value of ports is 255. Or you can revise it by yourself
key in “vim driver/advconf.h
The default setting is 255 ports
Question 2
Why can’t read the data from /dev/vttyAP0”?
Ans: We have changed the VCOM naming from vttyAP” to
ttyADV”. You can read the data from path “/dev/ttyADV0.
VCOM 2.0 driver has changed the naming to /dev/ttyADV0.
You can also read data through other tool like PuTTY or minicom.
Please refer to the previous chapter Serial Communication Tool
Example.
Question 3
Do I need to remove the VCOM driver before I
remapping the VCOM after configuration modified?
Ans: No, you can use below command to remapping your VCOM
without removing it.
Tow methods offer now: Key in “advman o restartto restart all
VCOM services and remapping the VCOM, or key in “advman o
startto compare and restart only modified parts.
Question 4
How can I see the debug message on the console?
Ans: You can manually apply a single VCOM mapping and see
the debug message by using the vcomd command.
Key in “/usr/local/advtty/vcomd t 3 d 1522 a 10.0.0.1 p 1
VCOM Port
Device Name IP Address
Physical Port on EKI
Meaning: /dev/ttyADV0 EKI-4571L-DE (IP: 192.168.1.100; COM 1)
For example, you can see the error if the IP is not correct.