1
1
serial-port-json-server
2
2
=======================
3
+ Version 1.2
3
4
4
5
A serial port JSON websocket & ; web server that runs from the command line on
5
- Windows, Mac, Linux, or Raspberry Pi that lets you communicate with your serial
6
+ Windows, Mac, Linux, Raspberry Pi, or Beagle Bone that lets you communicate with your serial
6
7
port from a web application. This enables web apps to be written that can
7
8
communicate with your local serial device such as an Arduino, CNC controller, or
8
9
any device that communicates over the serial port.
@@ -12,6 +13,12 @@ The server runs on the standard port of localhost:8989. You can connect to
12
13
it locally with your browser to interact by visiting http://localhost:8989 .
13
14
The websocket is technically running at ws://localhost/ws.
14
15
16
+ Supported commands are:
17
+ list
18
+ open [ portName] [ baud]
19
+ close [ portName]
20
+ send [ portName] [ cmd]
21
+
15
22
The app is one executable with everything you need and is available ready-to-go
16
23
for every major platform.
17
24
@@ -26,4 +33,16 @@ you've created an oscilloscope web app that connects to an Arduino, it would be
26
33
great use case. Finally you can write web apps that interact with a user's local hardware.
27
34
28
35
Thanks go to gary.burd.info for the websocket example in Go. Thanks also go to
29
- tarm/goserial for the serial port base implementation.
36
+ tarm/goserial for the serial port base implementation.
37
+
38
+ Changes in 1.2
39
+ - Added better error handling
40
+ - Removed forcibly adding a newline to the serial data being sent to the port. This
41
+ means apps must send in a newline if the serial port expects it.
42
+ - Embedded the home.html file inside the binary so there is no longer a dependency
43
+ on an external file.
44
+ - TODO: Closing a port on Beagle Bone seems to hang. Only solution now is to kill
45
+ the process and restart.
46
+ - TODO: Mac implementation seems to have trouble on writing data after a while. Mac
47
+ gray screen of death can appear. Mac version uses CGO, so it is in unsafe mode.
48
+ May have to rework Mac serial port to use pure golang code.
0 commit comments