Table 3. Serial device nodes mapping table.
Port Type
RS232
RS422_485
RS485
RS485
Execute the #sudo chmod 777 /dev/ttyS# command on two systems, where # is port number corresponding to ports being
used.
•
On one of the systems, execute the #cat < /dev/ttyS# command, this will put system A waiting for transmission.
•
On the other system, execute the #echo "test" > /dev/ttyS# command, this will let system B send out transmission.
Minicom
Minicom is a terminal emulation program which allows the host machine to communicate with and debug the serial port on headless
systems, such as the Edge Gateway. The following steps help you to setup Minicom.
1.
Install Minicom.
$ sudo snap install classic --devmode --beta
$ sudo classic.create
$ sudo classic
$ (classic) sudo apt-get update
$ (classic) sudo apt-get install minicom
2.
Set Minicom.
$ sudo minicom -s
3.
Select Serial port setup.
4.
Press A to edit the Serial Device to ttyUSB0. This can be any other value if there is more than one USB serial cable attached.
Then, press Enter to exit:
A - Serial Device : /dev/ttyUSB0
5.
Press F to disable Hardware Flow Control to No.
6.
Press E to edit Baud rate/Parity/Bits.
7.
Press E to configure Baud rate as 115200.
a.
Press Q to configure Stopbits as 8-N-1. Press Enter to exit.
Table 4. Comm parameters
+---------[Comm Parameters]---------+
|
Current: 115200 8N1
|
Speed
|
A: <next>
|
B: <prev>
|
C: 9600
|
D: 38400
E: 115200
|
|
Stopbits
Connector
DB9
5 pin terminal
3 pin terminal
3 pin terminal
Parity
L: None
M: Even
N: Odd
O: Mark
P: Space
Device Node
/dev/ttyS6
/dev/ttyS4
/dev/ttyS5
/dev/ttyS2
|
Data
S: 5
|
T: 6
|
U: 7
|
V: 8
|
|
41