Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellindros committed Feb 11, 2014
1 parent 661f5ce commit 19289b4
Showing 1 changed file with 10 additions and 25 deletions.
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
## Websocket Server for Arduino
## Arduino Websocket Server for Door Controller Test Tool

This library implements a Websocket server running on an Arduino. It's based on the [proposed standard][1] published December 2011 which is supported in the current versions (June 2012) of Firefox, Chrome, and Safari 6.0 beta (not older Safari, unfortunately) and thus is quite usable.
This library implements a Websocket server running on an Arduino. It's based on the [proposed standard][1] published December 2011 which is supported in the current versions (January 2014) of Firefox, Chrome, and Safari.

The library is used by the Door Controller Test Tool.

### Limitations

The implementation in this library has restrictions as the Arduino platform resources are very limited:

* The server **only** handles TXT frames.
* The server **only** handles **single byte** chars. The Arduino just can't handle UTF-8 to it's full.
* The server **only** accepts **final** frames with maximum payload length of 64 bytes. No fragmented data, in other words.
* For now, the server silently ignores all frames except TXT and CLOSE.
* The server **only** handles one client at a time. Trying to connect two at the same time will force the old client to disconnect.
* There's no keep-alive logic implemented.
* The server **only** accepts **final** frames with maximum payload length of 256 bytes. No fragmented data, in other words.
* For now, the server silently ignores all frames except TXT, CLOSE and PONG.
* The server **only** handles one client at a time.

_Required headers (example):_

Expand All @@ -21,7 +24,7 @@ _Required headers (example):_
Origin: https://example.com
Sec-WebSocket-Version: 13

The server checks that all of these headers are present, but only cares that the version is 13.
The server checks that all of these headers are present, but only cares that the version is 13 and origin is not null.

_Response example:_

Expand All @@ -38,22 +41,4 @@ The last line is the Base64 encoded SHA-1 hash of the key with a concatenated GU
* An Arduino Duemilanove or greater with Ethernet shield. An Arduino Ethernet should work too, but it has not been tested.
* A Websocket client that conforms to version 13 of the protocol.

### Getting started

Install the library to "libraries" folder in your Arduino sketchbook folder. For example, on a mac that's `~/Documents/Arduino/libraries`.

Try the supplied echo example together with the the [web based test client][2] to ensure that things work.

Start playing with your own code and enjoy!

### Feedback

I'm a pretty lousy programmer, at least when it comes to Arduino, and it's been 15 years since I last touched C++, so do file issues for every opportunity for improvement.

Oh by the way, quoting myself:

> Don't forget to place a big ***fat*** disclaimer in the README. There is most certainly bugs in the code and I may well have misunderstood some things in the specification which I have only skimmed through and not slept with. So _please_ do not use this code in appliancies where living things could get hurt, like space shuttles, dog tread mills and Large Hadron Colliders.

[1]: https://datatracker.ietf.org/doc/rfc6455/?include_text=1 "Protol version implemented here"
[2]: https://www.websocket.org/echo.html "Echo Test client"

0 comments on commit 19289b4

Please sign in to comment.