Web Sockets is a network full-duplex communication channel that allows Javascript programs embedded in Web pages to establish connections to applications running on the server that provided the Web pages. Two-way communication is possible between the Javascript program and the server-based application. This allows the Javascript program to display real-time data received from the server on the Web page without the need for refreshing the page. The Web Sockets communication channel has been utilized to display real-time measurements and health information from temperature and pressure smart sensors that were developed as part of the Advanced Ground Systems Maintenance (AGSM) project. The embedded processor in the smart sensors serves Javascript-based Web pages that establish Web Sockets connections back to the sensors. This connection allows real-time updates to be displayed on the workstation using a standard Web browser.

The purpose of this software innovation is to display measurements and health status information from smart temperature and pressure sensors in real time without the need for operator interaction (i.e., clicking on a refresh button). Measurements and health information are streamed over the connection and displayed on the Web page in real time. A simple, unique protocol was developed to encode the measurements and health information by the sensor so the Javascript program could interpret and display the data.

The smart sensor is assigned a unique Internet Protocol (IP) address on a network that is accessible from the workstation. A standard Web browser running on the workstation is used to connect to the smart sensor. There are tabs at the top of the screen that allow access to six different panels (Main, Health, Measurements, Calibration, Configuration, CPU Status). Each of these panels contains fields that are updated in real time using the Web Sockets connection.

HTML5 Web Sockets provided a simple and effective way of updating dynamic Web page content in real time from an embedded device. The protocol developed to address and update fields on the Web page was easy to implement, and can be extended if necessary to handle other types of Web page information.

This work was done by Charles Chapman of Kennedy Space Center. KSC-13824


Software Tech Briefs Magazine

This article first appeared in the September, 2014 issue of Software Tech Briefs Magazine.

Read more articles from this issue here.

Read more articles from the archives here.