@@ -91,12 +91,12 @@ It will listen to http and websocket connections on a range of ports from `8990`
91
91
### Discover the port
92
92
You should make GET request to the ` /info ` endpoint on the possible ports, until you find a reply:
93
93
94
- $ curl http://localhost :8990/info
95
- curl: (7) Failed to connect to localhost port 8990: Connection refused
96
- $ curl http://localhost :8991/info
94
+ $ curl http://127.0.0.1 :8990/info
95
+ curl: (7) Failed to connect to 127.0.0.1 port 8990: Connection refused
96
+ $ curl http://127.0.0.1 :8991/info
97
97
98
- $ curl http://localhost :8992/info
99
- {"http":"http://localhost :8992","https":"https://localhost :8991","version":"1.0.36","ws":"ws://localhost :8992","wss":"wss://localhost :8991"}
98
+ $ curl http://127.0.0.1 :8992/info
99
+ {"http":"http://127.0.0.1 :8992","https":"https://127.0.0.1 :8991","version":"1.0.36","ws":"ws://127.0.0.1 :8992","wss":"wss://127.0.0.1 :8991"}
100
100
101
101
The reply will contain a json with info about the version and the http and https endpoints to use
102
102
@@ -176,7 +176,7 @@ where you should replace /dev/ttyACM0 with the actual port and 9600 with the bau
176
176
You will receive a message like:
177
177
178
178
` ` ` json
179
- {
179
+ {
180
180
" Cmd" : " Open" ,
181
181
" Desc" : " Got register/open on port." ,
182
182
" Port" : " /dev/ttyACM0" ,
@@ -189,7 +189,7 @@ You will receive a message like:
189
189
or
190
190
191
191
` ` ` json
192
- {
192
+ {
193
193
" Cmd" : " OpenFail" ,
194
194
" Desc" : " Error opening port. Serial port busy" ,
195
195
" Port" : " /dev/ttyACM0" ,
@@ -204,7 +204,7 @@ You can then close the port with
204
204
You will receive a message like:
205
205
206
206
` ` ` json
207
- {
207
+ {
208
208
" Cmd" : " Close" ,
209
209
" Desc" : " Got unregister/close on port." ,
210
210
" Port" : " /dev/ttyACM0" ,
216
216
217
217
218
218
` ` ` json
219
- {
219
+ {
220
220
" Error" : " We could not find the serial port /dev/ttyACM0 that you were trying to close."
221
221
}
222
222
` ` `
@@ -238,7 +238,7 @@ with a reply like
238
238
You can receive output from the serial port by listening to messages like this:
239
239
240
240
` ` ` json
241
- {
241
+ {
242
242
" D" : " output string\r\n "
243
243
}
244
244
` ` `
0 commit comments