udp2serial
v1.2 release
This is a simple console application that takes data received on a UDP/IP socket and forwards it to a serial port.
udp2serial [options] UDPPort [COMPortID]
Short | Long | Description |
---|---|---|
‑i | ‑‑InterfaceIP | Defines the IP of the network interface to use for the UDP socket. Use 0.0.0.0 to listen on all interfaces with IPv4 or ::0 for all interfaces with IPv6. |
‑b | ‑‑BaudRate | Defines the serial baud rate. Standard values: 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 128000, or 256000. |
‑d | ‑‑DataBits | Defines the standard length of data bits per byte. Standard values: 5, 6, 7 or 8. |
‑p | ‑‑Parity | Defines the parity-checking protocol. Value is one of: Even, Mark, None, Odd or Space. |
‑s | ‑‑StopBits | Defines the standard number of stopbits per byte. Value is one of: None, One, OnePointFive or Two. |
‑t | ‑‑DtrEnable | Defines boolean value, true or false, that enables the Data Terminal Ready (DTR) signal during serial communication. |
‑r | ‑‑RtsEnable | Defines boolean value, true or false, indicating whether the Request to Send (RTS) signal is enabled during serial communication. |
‑? | ‑‑help | Shows usage. |
udp2serial -b=9600 5505 COM2
udp2serial 8505 /dev/ttyS2
udp2serial --InterfaceIP=::0 6704
Default settings for optional parameters, e.g., serial baud rate and UDP network interface, are configured in a settings.ini
file. This file will be automatically created when the application is first run.
Common locations for this configuration file are as follows:
OS | Settings File Path |
---|---|
Windows | C:ProgramDataudp2serialsettings.ini |
Linux / OSX | /usr/share/udp2serial/settings.ini |
The original default values are initially commented out. Following is an example of the default settings file with a few overrides:
[Serial]
; Defines the serial baud rate. Standard values: 110, 300, 600, 1200, 2400,
; 4800, 9600, 14400, 19200, 38400, 57600, 115200, 128000, or 256000.
;BaudRate=115200
BaudRate=9600
; Defines the standard length of data bits per byte. Standard values: 5, 6,
; 7 or 8.
;DataBits=8
; Defines the parity-checking protocol. Value is one of: Even, Mark, None, Odd
; or Space.
;Parity=None
; Defines the standard number of stopbits per byte. Value is one of: None, One,
; OnePointFive or Two.
;StopBits=One
; Defines the value that enables the Data Terminal Ready (DTR) signal during
; serial communication.
;DtrEnable=False
; Defines the value indicating whether the Request to Send (RTS) signal is
; enabled during serial communication.
;RtsEnable=False
[UDP]
; Defines the IP of the network interface to use for the UDP socket. Use 0.0.0.0
; to listen on all interfaces with IPv4 or ::0 for all interfaces with IPv6.
;InterfaceIP=0.0.0.0
InterfaceIP=::0