Skip to content

Commit 133ba93

Browse files
committed
Describe how the simulator's TCP connection can be relayed to a serial interface.
1 parent 53c7fc4 commit 133ba93

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,30 @@ Since version 2.1.0 it uses VS Code's built-in terminal instead.
7171
That terminal does not provide a prompt for entering, reviewing and modifying a message before sending it.
7272
See also [this issue report](https://github.com/wokwi/wokwi-features/issues/698).
7373

74-
Serial port forwarding is enabled for the simulator.
75-
Thus a Telnet client can be used to connect to the serial port of the simulator.
74+
The simulator also [provides a RFC2217 TCP server](https://docs.wokwi.com/vscode/project-config#serial-port-forwarding) as an alternative.
75+
Serial port forwarding is enabled for the simulator per configuration.
76+
This can be used to connect via a Telnet client to the serial port of the simulated device.
7677

77-
For example one can use the [PuTTY](https://www.putty.org/) SSH Client in Telnet mode with `localhost` as host and `4000` as port.
78+
For example one may use a [PuTTY](https://www.putty.org/) SSH Client with the following settings:
79+
80+
- Host Name: `localhost`
81+
- Port: `4000`
82+
- Connection type: Telnet
83+
84+
For testing with the Task Tracker App (or any other programm which supports a serial interface),
85+
one can forward the RFC2217 TCP connection to a pseudo terminal.
86+
For example using [socat](http://www.dest-unreach.org/socat/):
87+
88+
socat -d -d pty,raw,echo=0,link=/tmp/tcp_tty tcp:localhost:4000
89+
90+
Now you can connect to the serial terminal using these settings:
91+
92+
- path to serial line: `/tmp/tcp_tty`
93+
- speed: `115200` baud
94+
- data bits: `8`
95+
- stop bits: `1`
96+
- parity: none
97+
- flow control: none
7898

7999
### Debugging
80100

0 commit comments

Comments
 (0)