https://github.com/capacitorset/ws-serial
A small application that bridges websockets to the serial port.
https://github.com/capacitorset/ws-serial
Last synced: 2 months ago
JSON representation
A small application that bridges websockets to the serial port.
- Host: GitHub
- URL: https://github.com/capacitorset/ws-serial
- Owner: CapacitorSet
- License: mit
- Created: 2016-12-22T09:50:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-22T10:16:46.000Z (over 9 years ago)
- Last Synced: 2025-05-21T22:41:49.333Z (11 months ago)
- Language: HTML
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ws-serial
A small application that bridges websockets to the serial port.
## Setup
>The program was written for the serial port `/dev/COM1`. To change it, edit `client.js`.
Compile the serial-to-stdio interface: `cc main.c`
Run the websocket-to-stdio interface: `node client.js`
Serve files from the local folder: `python -m SimpleHTTPServer`
## Usage
Visit the local web server (eg. `http://192.168.5.100:8000`) and interact with the page.
## Explanation
`main.c` lets you read or write to the serial port using stdin and stdout.
`client.js` runs `main.c` and watches its output. It also exposes a websocket interface. Whenever it receives data from stdout, it will push it to the sockets; when it receives data from a socket, it will push it to stdin.