You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-23Lines changed: 27 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,32 +55,36 @@ pip uninstall ser2tcp
55
55
## Configuration file example
56
56
57
57
```json
58
-
[
59
-
{
60
-
"serial": {
61
-
"port": "/dev/ttyUSB0",
62
-
"baudrate": 115200,
63
-
"parity": "NONE",
64
-
"stopbits": "ONE"
65
-
},
66
-
"servers": [
67
-
{
68
-
"address": "127.0.0.1",
69
-
"port": 10001,
70
-
"protocol": "tcp"
58
+
{
59
+
"ports": [
60
+
{
61
+
"serial": {
62
+
"port": "/dev/ttyUSB0",
63
+
"baudrate": 115200,
64
+
"parity": "NONE",
65
+
"stopbits": "ONE"
71
66
},
72
-
{
73
-
"address": "0.0.0.0",
74
-
"port": 10002,
75
-
"protocol": "telnet",
76
-
"send_timeout": 5.0,
77
-
"buffer_limit": 65536
78
-
}
79
-
]
80
-
}
81
-
]
67
+
"servers": [
68
+
{
69
+
"address": "127.0.0.1",
70
+
"port": 10001,
71
+
"protocol": "tcp"
72
+
},
73
+
{
74
+
"address": "0.0.0.0",
75
+
"port": 10002,
76
+
"protocol": "telnet",
77
+
"send_timeout": 5.0,
78
+
"buffer_limit": 65536
79
+
}
80
+
]
81
+
}
82
+
]
83
+
}
82
84
```
83
85
86
+
Legacy format (JSON array at root level) is still supported for backward compatibility.
87
+
84
88
### Serial configuration
85
89
86
90
`serial` structure pass all parameters to [serial.Serial](https://pythonhosted.org/pyserial/pyserial_api.html#classes) constructor from pyserial library, this allows full control of the serial port.
0 commit comments