Here is the latest Websockets SDK - v1.54 (Nov 2015)


Websocket API for Airconsole

----------------------------


This package contains information for 3rd party developers to connect to the serial port on an Airconsole using only Websockets and HTML5.


Websockets are supported in most modern browsers (Chrome 16+, Firefox 11.0+, IE 10+, Opera 12.10+, Safari 6.0+)



Subprotocol Support

-------------------

The Airconsole implements two Websocket subprotocols:


- raw-serial - provides a bidirectional pipe for passing bytes to/from the serial port. Baud rate and line settings cannot be directly controlled and should be set on the Airconsole device first.


- telnetcpcd - provides a RFC2217 data path to the Airconsole which allows passing data along with control over the serial port settings (such as baud rate, DTR, RTS, flow control, etc). A sample Javascript library airconsole.js is provided to simplify programming tasks.


If no protocol is specified, the raw-serial protocol will be selected.


The Airconsole defaults to exposing its Websockets on port 8080 but this can be configured on the Advanced Serial settings page.


Sample Code

-----------


Three examples are provided:


1. raw-serial.html - this sample shows how to connect and send/receive data in just a few lines of Javascript


2. airconsole.html - this sample uses the airconsole.js library to expose the serial port data and control channel


3. term.html - this sample uses airconsole.js along with an open source VT100 terminal library (term.js) to implement a simple VT100 terminal



Further Information

-------------------

- Formal details of Websockets can be found in RFC6455 (http://tools.ietf.org/html/rfc6455)

- The W3 recommendation can found at http://www.w3.org/TR/websockets/

- End user/developer documentation can be found on the internet at places such as http://www.websocket.org and https://developer.mozilla.org/en-US/docs/Web/API/WebSocket

- the latest version of term.js can be found at https://github.com/chjj/term.js/