Serial server
In the serial server role, the board takes one USB serial adapter, and each of its ports becomes a TCP socket. Bytes from the line go to every connected client (up to 3 per port), and bytes from any client go out on the line.
Supported adapters
- FTDI FT232R and FT231X. The FT232H, FT2232H and FT4232H are not supported yet.
- Silicon Labs CP210x, including the dual CP2105 and quad CP2108.
- WCH CH340 and CH341.
- Class-compliant adapters: WCH CH343, CH9102, CH342 and CH344 (dual and
quad), and most others that show up as
ttyACMon Linux.
Plug the adapter straight into the board: hubs are not supported. RS-485 adapters must switch direction on their own (most do).
Set up a port
- Choose Serial server under Settings and Save & reboot.
- Plug in the adapter. The Serial ports panel shows it and a card for each port.
- On each port you want to use, tick Enabled: accept connections on this port and set:
| Setting | |
|---|---|
| Label | a name for the port, for example Rooftop AHU |
| Protocol | Raw TCP passes bytes unchanged. RFC 2217 (client sets baud) is telnet with the COM port option: the client can set baud, data bits, parity, stop bits, DTR and RTS. |
| TCP port | 9000 for port 1, 9001 for port 2, and so on, by default |
| Baud, Data bits, Parity, Stop bits | the line settings. There is no flow control. |
| Allowed clients (blank: anyone) | IP addresses or networks, such as 192.168.1.0/24 10.0.0.5 |
Changes apply at once and are saved. Settings are kept by port number, so a replacement adapter picks them up.
With RFC 2217, settings a client makes last until the last client disconnects, then the saved ones come back.
The admin password doesn't protect the serial sockets: anyone who can connect can write to the line. Fill in Allowed clients on anything that matters.
Connect
python3 -m serial.tools.miniterm rfc2217://etherjax-XXXX.local:9000 9600
nc etherjax-XXXX.local 9000 | xxd # raw
RFC 2217 works with pyserial's rfc2217://host:port, ser2net, and virtual
COM port drivers. Z-Wave JS can open a raw socket as tcp://host:9000.
Each board advertises its enabled sockets over mDNS, and the matrix lists them.
Notes
- FTDI adapters get their latency timer set to 1 ms, so replies aren't held back for 16 ms.
- There is no break signal, and no RS-485 direction control from RTS.
- Protocols such as Modbus are for the client to speak over the socket.
- A missing adapter, or a TCP port that can't be opened, shows as a problem on the page. The board doesn't reboot for either.