Remote serial

RFC 2217 server

Share this machine's physical port, with the client able to change baud rate, framing and DTR/RTS.

On this page

RFC 2217 server (share this machine's serial port)

An RFC 2217 server exposes this machine's physical serial port over TCP. A remote client can not only exchange data but also change baud rate, framing, flow control and DTR/RTS — that control travels over the same connection as the data.

Plain TCP forwarding only carries bytes. If the remote side must change baud rate, parity or control lines, both ends must use RFC 2217.

The client must be able to reach this machine's IP address and listening port directly. This usually means the same LAN or an already connected VPN. For the trade-off between the three remote paths, see Choosing a remote access path.

The site needs two connections: one opens the physical serial port and one listens as a TCP Server. An RFC 2217 bridge joins them.

  1. Configure the first connection for the device's physical serial port and match the parameters in its manual.
  2. Choose Edit → Add Port for the second connection; pick TCP/UDP, then choose TCP Server.
  3. For another machine, listen on AnyIPv4 or the site's LAN address and enter a port such as 6000. A server bound to 127.0.0.1 cannot be reached remotely.
  4. Open Tools → Bridges… → New, choose the serial port and TCP Server as the two ends, and select A ⇄ B (both ways).
  5. Enable the bridge and Open both ends automatically. On Protocol, choose RFC 2217 server and keep Forward immediately framing.
  6. Keep One client at a time.
Multi-port workspace: the left connection has usbmodem11303 open and shows the device's reply, the right connection is TCP/UDP with Mode set to TCP Server, Bind Any and Port 6000, and the status bar reports waiting for connections on 0.0.0.0:6000
Both connections are ready before the bridge exists: the physical serial port is open and the TCP Server is listening.
Bridge dialog Connection tab named Bridge 1, with End A set to 1: cu.usbmodem11303, Direction A to B both ways, End B set to 2: 0.0.0.0:6000, Enabled and Open both ends automatically ticked, and an Access section whose Allowed clients box takes one address or subnet per line
A bridge joins two connections that already exist; it is not a separate port mode.
Bridge dialog Protocol tab with Mode set to RFC 2217 server (remote client sets the serial parameters), noting that clients connect with rfc2217://host:port or a virtual COM driver, Framing set to Forward immediately, and TCP server clients set to One client at a time
The protocol must be RFC 2217 server, not the default Transparent mode.

Access control and security

An empty Allowed clients list does not restrict the source. To restrict access, enter trusted IP addresses or CIDR subnets there, one per line.

RFC 2217 provides no encryption or authentication. Do not expose it directly to an untrusted public network. Prefer a LAN or trusted VPN, and allow the selected port through the host firewall.

Server-side checks

Confirm this end is ready before telling the remote to connect:

  1. The TCP Server connection shows that it is waiting or connected, on the same address and port you will give the client.
  2. The bridge manager reports Running, with dropped staying at 0 in both A→B and B→A directions.
  3. The physical serial port is open and the device answers a known command.
Bridge manager showing RFC2217-Server as Running, with traffic and dropped counters for both directions
A running bridge with no drops in either direction is the server-side baseline.

For the end that connects to this port, see RFC 2217 client. For end-to-end acceptance and layered troubleshooting across both ends, see Connect directly to a remote serial port with RFC 2217.

Was this document helpful?