@@ -91,12 +91,12 @@ It will listen to http and websocket connections on a range of ports from `8990`
9191### Discover the port
9292You should make GET request to the ` /info ` endpoint on the possible ports, until you find a reply:
9393
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
9797
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"}
100100
101101The reply will contain a json with info about the version and the http and https endpoints to use
102102
@@ -176,7 +176,7 @@ where you should replace /dev/ttyACM0 with the actual port and 9600 with the bau
176176You will receive a message like:
177177
178178` ` ` json
179- {
179+ {
180180 " Cmd" : " Open" ,
181181 " Desc" : " Got register/open on port." ,
182182 " Port" : " /dev/ttyACM0" ,
@@ -189,7 +189,7 @@ You will receive a message like:
189189or
190190
191191` ` ` json
192- {
192+ {
193193 " Cmd" : " OpenFail" ,
194194 " Desc" : " Error opening port. Serial port busy" ,
195195 " Port" : " /dev/ttyACM0" ,
@@ -204,7 +204,7 @@ You can then close the port with
204204You will receive a message like:
205205
206206` ` ` json
207- {
207+ {
208208 " Cmd" : " Close" ,
209209 " Desc" : " Got unregister/close on port." ,
210210 " Port" : " /dev/ttyACM0" ,
216216
217217
218218` ` ` json
219- {
219+ {
220220 " Error" : " We could not find the serial port /dev/ttyACM0 that you were trying to close."
221221}
222222` ` `
@@ -238,7 +238,7 @@ with a reply like
238238You can receive output from the serial port by listening to messages like this:
239239
240240` ` ` json
241- {
241+ {
242242 " D" : " output string\r\n "
243243}
244244` ` `
0 commit comments