@@ -140,3 +140,43 @@ If it cannot be displayed, please open:
140140
141141- deploy.sh: This script is used to generate new release version numbers and tag.
142142 Used only by the program publisher.
143+
144+ #### Test
145+
146+ - Ubuntu
147+ - Install socat
148+
149+ $ sudo apt update
150+ $ sudo apt install socat
151+
152+ - Create a pair of virtual serial ports
153+
154+ $ sudo socat -d -d pty,raw,echo=0 pty,raw,echo=0
155+
156+ - After running, it will display:
157+
158+ 2025/12/03 14:09:27 socat[31902] N PTY is /dev/pts/5
159+ 2025/12/03 14:09:27 socat[31902] N PTY is /dev/pts/6
160+ 2025/12/03 14:09:27 socat[31902] N starting data transfer loop with FDs [5,5] and [7,7]
161+
162+ - Create symbolic links (optional, for better naming).
163+
164+ $ sudo ln -sf /dev/pts/2 /dev/ttyVCOM0
165+ $ sudo ln -sf /dev/pts/3 /dev/ttyVCOM1
166+
167+ - The above two steps can be combined into the following command.
168+
169+ $ sudo socat -d -d pty,link=/dev/ttyVCOM0,raw,echo=0 pty,link=/dev/ttyVCOM1,raw,echo=0
170+
171+ - You can now use this program to open the serial port. ` /dev/pts/5 ` (/dev/ttyVCOM0) and ` /dev/pts/6 ` (/dev/ttyVCOM1).
172+ Because these serial port names are non-standard, this program cannot find them.
173+ You can enter the following in the "Serial Port" field: ` /dev/pts/5 `
174+ Because the virtual serial port was created with root privileges, this program also needs to be run with root privileges.
175+
176+ $ sudo serialportassistant
177+
178+ Alternatively, authorize the serial port to the current user:
179+
180+ $ sudo chown $USER:tty /dev/pts/5
181+ $ sudo chown $USER:tty /dev/pts/6
182+ $ serialportassistant
0 commit comments