You are on page 1of 35

Kairos Application Note

Web Interface
AN_0014_KA_Web_0v3

Version 0.3 draft

Date: 2015/03/31

Radio Activity S.r.l.

Via De Notaris, 50 - 20128 Milano - Italy - email: comm@radioactivity-tlc.it - www.radioactivity-tlc.com


Tel. +39.02.26514205 - FAX/Voicebox +39.1782.242408 - CCIAA Milano N° 1728248 - VAT Id. 04135130963
AN_0014_KA_Web_0v3 ver 0.3 draft

Summary
1Foreground...........................................................................................................3
1.1Local laws restrictions .....................................................................................................................3
1.2Document Copyrights ......................................................................................................................3
1.3Disclaimer ........................................................................................................................................3
1.4Modifications ....................................................................................................................................3
2Changelog............................................................................................................4
3Introduction to Kairos.............................................................................................5
4Introduction to Radio Activity Remote Control Tools ...................................................6
4.1Setup and Management Tools Family..............................................................................................6
4.2Monitor and Surveillance Tools Family.............................................................................................6
5Integrated Web Server...........................................................................................7
5.1Security.............................................................................................................................................7
5.2Brief Manual Reference....................................................................................................................8
5.2.1Installation.................................................................................................................................8
5.2.2Login.........................................................................................................................................9
5.2.3Overview.................................................................................................................................10
5.2.4Audio.......................................................................................................................................12
5.3Customization example: Radioactivity Operator Station................................................................13
5.3.1Configuration..........................................................................................................................13
5.3.2Overview/Home......................................................................................................................15
5.3.3Audio.......................................................................................................................................16
5.4Technical overview.........................................................................................................................18
5.4.1Login Page..............................................................................................................................18
5.4.2DSP Page...............................................................................................................................21
5.4.3Send Pocsag Message...........................................................................................................25
6Introduction to HTTP Protocol................................................................................27
6.1Overview.........................................................................................................................................27
6.2HTTP session.................................................................................................................................27
6.3Request methods ..........................................................................................................................27
6.4HTTP session state........................................................................................................................28
6.5Encrypted connections...................................................................................................................28
6.6Request message...........................................................................................................................28
6.7Response message........................................................................................................................28
6.8Example session............................................................................................................................29
7Introduction to WebSocket Protocol........................................................................30
7.1Technical overview.........................................................................................................................30
7.2WebSocket protocol handshake.....................................................................................................30
7.3URI scheme....................................................................................................................................31
8Introduction to JSON ...........................................................................................32
9References..........................................................................................................35
9.1RFC References.............................................................................................................................35
9.2DMR References............................................................................................................................35
9.3Radio Activity Informative Documents............................................................................................35
9.4Radio Activity Manuals...................................................................................................................35

Radio Activity S.r.l. 2015/03/31 2 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

1 Foreground
This manual is intended for use by experienced technicians familiar with RF and IP technology, and in particular:
• analog and digital transmission
• DMR features and protocols
• data networks (LANs)
• data exchange protocols and standards
• basic concepts of electronic.

This document is not intended to deepen the basic knowledge, unless some brief clarification where needed., it
contains information required for installation, setup and maintenance of a KAIROS based radio infrastructure.
The information in this document is subject to change without notice and its only purpose is to describe the
product specified in the introduction section.
This document is dedicated to the Radio Activity partners only, and may not be in any part reproduced or
retransmitted in any form or mean without an explicit written authorization of Radio Activity Srl.

1.1 Local laws restrictions


The use of this product is subjected to the local laws and in most cases requires a specific license. As example, it
may be prohibited in some RF bands or part of them, or may be limited in the RF power. Please, verify the local
law requirement before to use the equipment.

1.2 Document Copyrights


No distribution or duplication of this document or any portion of it shall take place without the express written
permission of Radio Activity. No part of this manual may be reproduced, distributed, or transmitted in any form
for any purpose without the express written permission of Radio Activity.

1.3 Disclaimer
The information in this document are carefully controlled, up-dated and are believed to be entirely reliable.
However, no responsibility is assumed for inaccuracies. Furthermore, Radio Activity reserves the right to make
changes to any products herein to improve readability, function, or design. Radio Activity does not assume any
liability arising out of the applications or use of any product or circuit described herein; nor does it cover any
license under its patent rights nor the rights of others.

1.4 Modifications
CAUTION: Changes or modifications not expressly approved by RF Innovations may void the user’s authority to
operate the equipment legally, as well as any warranty provided.

Radio Activity S.r.l. 2015/03/31 3 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

2 Changelog

Date Version Document SW Version Brief Description


14/11/12 v. 0.1 AN_0014_Ka_Web_0v1 v. 1.0.2.1
15/03/31 v. 0.3 AN_0013_Ka_Web_0v3 v. 1.3.4.0

Radio Activity S.r.l. 2015/03/31 4 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

3 Introduction to Kairos
The KA-XXX is a “soft radio” in which all the mo-demodulation and filtering processes are achieved through SW
algorithms implemented in Digital Signal Processing (DSP) devices. This technique assures repeatability and
perfect matching between the base stations.
Since a new protocol or a new standard is only a SW upgrade, the investment is future proof.
The KA-XXX has got an effective SW and HW platform that realizes a powerful embedded workstation. Its LINUX
core, thanks to the continuous upgrading from thousands of developers around the world, interfaces naturally IP
devices and networks. It allows also an high level of customizations to satisfy the most exigent Customer’s
needs, without troubles and reducing the development time.
The radio performances are at the top level in the market, because it is designed for infrastructure applications
where radiofrequency pollution is a well known problem.
Excellent resistance to adjacent channel and blocking, noiseless transmitter and soft diversity reception reduce
in-field troubles and give excellent coverage and clean communications .

Radio Activity S.r.l. 2015/03/31 5 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

4 Introduction to Radio Activity Remote Control Tools


A Radio Activity Remote Control System is very flexible and powerful: it can work through different connecting
means, also with backup each other. The same features may be available from the User or the local Technical
Assistance or from the Factory directly. In fact Radio Activity sends its products over the world, in many cases
placed in very uncomfortable site: therefore the possibility to control, observe, correct and modify parameters
or the internal software is a must.
Radio Activity equipments have a local intelligence to survey their state (and, in some case, the state of their
neighbor equipments). This information is used to react to failure or specific situation and is available on the
remote Network Managing Center.
A Radio Activity Remote Control System is normally composed of two parts: a Remote Control Tool, running on a
PC equipped with Microsoft Windows, and a Remote Control Module, running on the equipment, that interacts
with the Tool. The normal operating mode for the Remote Control System is that the Remote Control Tool sends
an interrogation to the equipment, and the Remote Control Module properly replies to that interrogation.
Radio Activity provides several Remote Control Tools allowing monitoring/surveillance and/or setup and
management of working parameters of its equipments.

4.1 Setup and Management Tools Family


The tools shown below are designed to setup, test and manage the equipments locally or remotely. While they
are intended to be used by expert users and/or technical/maintenance people, they have a minimum set of
diagnostic features manageable by any user:
• DMR_Manager: it allows a full control over the RA-XXX dual mode DMR/Analog Radio Base Station
parameters. It can manually access a Base Station through the IP Network or through the local serial
port (even if an external modem is attached to this port) or through the internal GSM/GPRS modem; it
can access an RF-Linked Base Station through the DMR link also.
• DTI_Manager: it allows a full control over the RA-TI-XX DMR Audio Gateways parameters. It can
manually access a remote Audio Gateway also.
• MD1_Manager: it allows a full control over the RA-MD1 IP Modems parameters. It can manually access
an IP Modem through the IP Network or through the local control serial port (even if an external
modem is attached on this port).

4.2 Monitor and Surveillance Tools Family


The tools shown below are designed to continuously monitor the functionality of a defined homogeneous set of
equipments (e.g.: one or more Radio simulcast networks, one or more sets of IP Modems managed by a single
Control Center...); the tools poll regularly each equipment in the set and display the status in a summary window
on the screen of the management PC. While they are intended to be used by users responsible for the
supervision and control or the local Technical Assistance people, they can also perform all the features of their
related setup and management tools; in this case the use should be limited to expert users and/or
technical/maintenance people:
• DMR_NetControl: it is a remote network surveillance tool for the RA-XXX dual mode DMR/Analog Radio
Base Stations. Under a password key, it permits to access remotely the same detailed setup menu of the
DMR_Manager tool, to perform the same features.
• MD1_NetControl: it is a remote network surveillance tool for the RA-MD1 IP Modems. Under a
password key, it permits to access remotely a single modem by launching the MD1_Manager tool with
the automatic setting of the connection parameters.

Radio Activity S.r.l. 2015/03/31 6 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5 Integrated Web Server


In addition to the software already available that allow control and complete management of the equipment is
accompanied by a fully integrated Web Server.
This agent does not claim to be a complete replacement of the indipendent Manager software but can address
specific and unique needs, such as:
• use of Manager functions on site, without specific installation, but only with a PC or tablet with only a
Web Browser and a lan connection, also with WIFI adapter.
• integrate new functions, using the specific characteristics of this type of protocol, such as streaming
audio
• provide demo of advanced features normally provided from external server (ex .: dispatcher), such as
real-time Audio Console and management of Pocsag messages
• provide to Radio Activity partners the ability to develop fast and simple interfaces using the HTTP
protocol as User Agent of integrated Server with simpler protocols as JSON or text streams, for example
external Web Server, Dispatcher, or Console
• provides the possibility of customized solutions on the needs of the customer, such as the local operator
place below

5.1 Security
To ensure safe access to the equipment are implemented the following functionality:
• SSL Secure Protocol: in addition to the standard HTTP it is the result of simply layering the Hypertext
Transfer Protocol (HTTP) on top of the SSL or TLS protocol, thus adding the security capabilities of
SSL/TLS to standard HTTP communications protocol on port 80 is also implemented the security
protocol HTTPS
• HTTP Session: to ensure the identity of the user and its rights in all operations are used HTTP sessions,
authentication cookies are the common method used by web servers to know whether the user is
logged in or not, and which account they are logged in with

Radio Activity S.r.l. 2015/03/31 7 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.2 Brief Manual Reference


Please refer to the complete manual for a detailed description of the features implemented, here we show only
a few examples of the same.
The implementation of the interface lets you manage many functions including:
• real-time monitor of DSP status
• sends commands to DSP
◦ unlock squeltch
◦ unlock TCS/DPL
◦ start trasmission
◦ clear packet statistic
◦ disable TX
◦ line two output signal
• monitor channel activity:
◦ channel busy
◦ call type of communication on air
◦ caller radio and called destination
• direct input and output of audio towards radio channel as an dispatcher
• sends POCSAG message to air
• check of radio software versions
• backup and restore of radio configuration
• manage of authorized web users with permission levels
• channels table viewer and editor (with possibility to set default and current channel)
• loop test results page

5.2.1 Installation
Although no installation is needed for Kairos Web Interface, to use it, you will need a Kairos equipment, a
browser capable device and an IP connection between the two. Any kind of, valid, IP connection is accepted this
include wire, Wi-Fi. Please note that you may have to configure your network appropriately to not filter the
Kairos IP and the standard HTTP port 80.
Examples of configuration: Kairos-Ethernet cable-PC; Kairos-network—PC; Kairos-Wi-Fi router-mobile device
Examples of client hardware: PC, Laptop, Tablet, Smartphone
The Kairos acts as a standard web server on this port and accepts any kind of http client. For an optimal
experience we recommend a device that supports the latest version of Mozilla Firefox (current version 36), in
this manual all the example are referred to this browser (Please note some other modern browsers can be used
).

Radio Activity S.r.l. 2015/03/31 8 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.2.2 Login
Open Firefox browser and type in the URL box the IP of the Kairos:

If you receive a connection error, check the connection with Kairos equipment and the IP then retry.If the
connection is correctly configured you will be redirect to the login page:

The default access credential are:


User name :kairos
Password:kairos
For the safety of your equipment is highly recommended that ,on the first access you create a new user account
and then delete the default one:
After login click on Accounts:

Insert the new account information then press “Add”, only after the new account has been created delete the
default one. Note: only accounts with level above 30 can use the “Accounts” page.

Radio Activity S.r.l. 2015/03/31 9 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

Note: On each login, a session is created, that expires after a certain time of inactivity. After the session has
expired, on the first user action, he will be redirected to the login page.

5.2.3 Overview
This page presents details about Kairos Equipment. All the values of the parameters are updated in real time.

Radio Activity S.r.l. 2015/03/31 10 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

Radio Activity S.r.l. 2015/03/31 11 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.2.4 Audio

Radio Activity S.r.l. 2015/03/31 12 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.3 Customization example: Radioactivity Operator Station


Radio Activity Operator Station is a hardware and software solution to provide, easy to use, access to Kairos
equipment functionalities. This way the user can easily monitor up to 4 Kairos and interact with each of them.
The interaction possible via touch screen. No other pointing device is needed to use all Operating Station
features.

5.3.1 Configuration
On each page of Operator Station on the right-bottom side can be found a link named “edit”. To edit the
configuration tap this link. Six IP addresses can be configured but only for the first four, the audio functions will
be available, the last two will be visible only in the overview page. To edit the IP fields use the touch keyboard,
when finished press “Save configuration”. Save the file “config.js” in the folder:
/home/ra/www/js/configuration_file.

To control the if the connection is active, go to Home page and check if all the configured box/IP are not empty.
When a connection fails the message “Failed to connect to…” will be shown in the box.

Radio Activity S.r.l. 2015/03/31 13 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

Radio Activity S.r.l. 2015/03/31 14 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.3.2 Overview/Home
The default page is the overview page. Based on configuration, presents the real time status of the Kairos. Each
equipment has a dedicated box for his parameters:

This page was designed for monitoring purposes so the only possible interactions are: change page from the top
menu or see the detail of one equipment by touching one of the Kairos boxes.

By selecting one of the equipment, the user, will be lead to a custom version of Kairos Web Interface. The only
custom part is the top menu that is divided in two levels: detail level and top level. Top level contains the links to
Operator Station functionalities: overview and audio. Detail level contains the links to Kairos Web Interface
functionalities, for more details please read Kairos Web Interface Manual.

Radio Activity S.r.l. 2015/03/31 15 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.3.3 Audio
The audio page is the main tool, for the user, to interact with the Kairos network. For each Kairos is present a
column and on each row controls for a channel, this way any “cell” has the needed controls for a given channel
present on a certain Kairos. The possible channels are Analog, Timeslot A, and Timeslot B. The only unified
controls are the Push to talk and mode buttons. This buttons offer actions for the selected microphone. To select
a microphone, the user, must touch the “Microphone” label. If a microphone is selected the label background is

green, otherwise is white. Only one microphone can be selected at once so when a new one is selected the
previously selected microphone becomes not selected.

Push to talk: starts a live audio stream from operator station to Kairos that is transmitted via RF by the last. If the
mode is set to local, the audio is transmitted only by the selected Kairos otherwise, if the mode is set to network,
the selected Kairos will, also, send the audio to the radio network. The behavior of the network mode is subject
to the configuration and hierarchy of the Kairos radio network.
Note: a standalone Kairos will have the same behavior in both modes.
When one of the configured Kairos has a channel used for a conversation, the background color of the speakers
become yellow. This way the user can always know the status of the channels, additionally he can also the
conversation by enabling at least one of the two speakers. Each of the two speaker (left and right) corresponds
to the physical speaker. If more that one channel has enabled the left or the right audio, the output will be the
audio mix of the channels. For the Timeslot A and B any time a conversation is signaled the fields “dst” and “src”
are filed with information about the destination, of the call, and the source. This feature is not present for
Analog channels. For each channel is available a volume setting, on each tap the volume rises, a new tap when

Radio Activity S.r.l. 2015/03/31 16 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

the volume is at the max level will cause the volume to go at min level.

Configuration note: to use the microphone without the permission request from browser the following
configuration has been made in about:config: media.navigator.permission.disabled=true (only for Mozilla
Firefox)

Radio Activity S.r.l. 2015/03/31 17 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.4 Technical overview


This is not intended to be an exhaustive list of all the features integrated in the web interface, but only a short
list of examples to illustrate the operation of the Integrated Server Agent.

5.4.1 Login Page


The login page grants to the user access to system with its rights.
It use a standard GET Request to load the page and then a POST request to submit the Authentication data.
Login Page:

Client request:
GET /page/login.html HTTP/1.1
Host: 172.33.17.40
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: it,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://172.33.17.40/index.html
Connection: keep-alive
Cache-Control: max-age=0

Radio Activity S.r.l. 2015/03/31 18 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

Server response:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 5832
Pragma: no-cache
Cache-Control: no-cache, no-store, must-revalidate
Expires: 0

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Radio Activity Smart Repeater Interface - Login</title>
<link href="/css/base.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/js/core.js"></script>
<script type="text/javascript" src="/js/FileSaver.js"></script>
<link rel="icon" href="favicon.ico" />
</head>
<body style="background: url(/img/back_blue.png) repeat center; width: 100%;" ondragstart="return false;"
ondrop="return false;" oncontextmenu="return false">
<div style="min-height:100%; margin: 0 auto;background: url(/img/back_red.png) repeat center;overflow-
y:auto;">
<div style="min-height:100%; margin: 0 auto;background: url(/img/t.gif) repeat center;overflow:hidden;">
<div style="width:60em;height:3.5em;background: url(/img/testata.png);overflow:hidden;margin-
left:1em;margin-top: 1em;"><!-- -->
<div style="position:relative;width:auto;height:auto;left:0em;">
<ul id="menuo" style="width:auto;">
<li><a id="main_home" class="not_selected" onclick="window.location='/entry_point.html';return null;"
type="text/html" target="_self">Home </a></li>
<li><a id="main_audio" class="not_selected" onclick="window.location='/mon_cons.html';return null;"
type="text/html" target="_self">Audio </a></li>
<li><a id="pocsag" class="not_selected" onclick="window.location='/page/pocsag.html';return null;"
type="text/html" target="_self">POCSAG</a></li>
<li><a id="extra" class="not_selected" onclick="window.location='/page/extra.html';return null;"
type="text/html" target="_self">Extra</a></li>
</ul>
</div>
</div>
<div id="body" style="clear:both;width:60em;min-height:100%;background-color:#f5f5f5;overflow-y:auto;margin-
left:1em; oncontextmenu="return false">
<div style="float:left;padding-right: 10px; margin-left: -5px;position:relative;height:auto;min-
height:100vh;left:4px;background-color:#f5f5f5;">
<br/>
<div style="display:inline;">
<ul id="menuv" style="background-color:#f5f5f5">
<li class="header"> </li>
</ul>
</div>
<div style="margin-top:30px;">
<div class="spalla" style="position:relative;float:none;z-index: 3;"></div>
<div class="spalla" style="position:relative;top:-14px;float:none;background:#f5f5f5;z-index: 2;padding:22px 0px
12px 0px;">
<a href="?lang=UK"><img class="flag UK" style="margin-left:2px;" src="/img/t.gif" title=".Inglese" /></a>
<a href="?lang=IT"><img class="flag IT" src="/img/t.gif" title=".Italiano" /></a>
<a href="?lang=FR"><img class="flag FR" src="/img/t.gif" title=".Francese" /></a>
<a href="?lang=DE"><img class="flag DE" src="/img/t.gif" title=".Tedesco" /></a>

Radio Activity S.r.l. 2015/03/31 19 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

<a href="?lang=ES"><img class="flag ES" src="/img/t.gif" title=".Spagnolo" /></a>


</div>
<div class="spalla" style="position:relative;top:-28px;float:none;text-align:center;background:#dde4e8;z-index:
1;padding-top:20px;height: 130px;">
<table class="glb_info" width="140"><tbody>
<tr class="nfocus"><td colspan="2">Equipment:</td></tr>
<tr class="mfocus"><td>Name:</td><td>KAIROS</td></tr>
<tr class="mfocus"><td>IP:</td><td>0.0.0.0</td></tr><tr class="nfocus"><td colspan="2">Software:</td></tr>
<tr><td>Name:</td><td>ka_bst</td></tr><tr><td>Vers.:</td><td>1.3.4.0</td></tr>
<tr><td>Date:</td><td>31-3-2015</td></tr>
<tr class="nfocus"><td colspan="2">Interface v 2257</td></tr>
</tbody></table>
</div></div></div>
<div ;style="height:200px;weight:60;border:solid;"></div>
<br/><span style="color:red;font-style:italic;font-weight:bold;"></span><br/><br/>
<form name="login" action="login.html" method="POST" >
<table><tr><td>User name:</td>
<td><input name="user" type="text" value=""/></td></tr>
<tr><td>Password:</td>
<td><input name="pass" type="password" value=""/></td>
</tr><tr><td></td><td><input type="submit" value="Login" /></td></tr>
</table>
</form>
</div></div></div></div></body>
</html>

Client request:
POST /page/login.html HTTP/1.1
Host: 172.33.17.40
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: it,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://172.33.17.40/page/login.html
Connection: keep-alive

Content-Length: 23
Content-Type: application/x-www-form-urlencoded
user=kairos&pass=kairos

Server Response:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 5329
refresh: 0; url=/entry_point.html
Pragma: no-cache
Cache-Control: no-cache, no-store, must-revalidate
Expires: 0
Set-Cookie: Kairos=rl3q1Xgr0NdpJOUi0SNVPLUXOU8d; Path=/;

Radio Activity S.r.l. 2015/03/31 20 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.4.2 DSP Page


This page show the mains data values of the equipment

Client Request:
GET /entry_point.html HTTP/1.1
Host: 172.33.17.40
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: it,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://172.33.17.40/entry_point.html
Cookie: Kairos=rl3q1Xgr0NdpJOUi0SNVPLUXOU8d
Connection: keep-alive

Server Response:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 15259
Pragma: no-cache
Cache-Control: no-cache, no-store, must-revalidate

Radio Activity S.r.l. 2015/03/31 21 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

Expires: 0
Access-Control-Allow-Origin: *

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Radio Activity Smart Repeater Interface - Home</title>
<link href="/css/base.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/js/core.js"></script>
<script type="text/javascript" src="/js/FileSaver.js"></script>
<link rel="icon" href="favicon.ico" />
</head>
<body style="background: url(/img/back_blue.png) repeat center; width: 100%;" ondragstart="return false;"
ondrop="return false;" oncontextmenu="return false">
<div style="min-height:100%; margin: 0 auto;background: url(/img/back_red.png) repeat center;overflow-
y:auto;">
<div style="min-height:100%; margin: 0 auto;background: url(/img/t.gif) repeat center;overflow:hidden;">
<div style="width:60em;height:3.5em;background: url(/img/testata.png);overflow:hidden;margin-
left:1em;margin-top: 1em;">
<div style="position:relative;width:auto;height:auto;left:0em;">
<ul id="menuo" style="width:auto;">
<li><a id="main_home" class="selected" onclick="window.location='/entry_point.html';return null;"
type="text/html" target="_self">Home </a></li>
<li><a id="main_audio" class="not_selected" onclick="window.location='/mon_cons.html';return null;"
type="text/html" target="_self">Audio </a></li>
<li><a id="pocsag" class="not_selected" onclick="window.location='/page/pocsag.html';return null;"
type="text/html" target="_self">POCSAG</a></li>
<li><a id="extra" class="not_selected" onclick="window.location='/page/extra.html';return null;"
type="text/html" target="_self">Extra</a></li>
</ul> </div></div>
<div id="body" style="clear:both;width:60em;min-height:100%;background-color:#f5f5f5;overflow-y:auto;margin-
left:1em; oncontextmenu="return false">
<div style="float:left;padding-right: 10px; margin-left: -5px;position:relative;height:auto;min-
height:100vh;left:4px;background-color:#f5f5f5;">
<br/><div style="display:inline;">
<ul id="menuv" style="background-color:#f5f5f5">
<li class="header"> </li> </ul> </div>
<div style="margin-top:30px;">
<div class="spalla" style="position:relative;float:none;z-index: 3;"> </div>
<div class="spalla" style="position:relative;top:-14px;float:none;background:#f5f5f5;z-index: 2;padding:22px 0px
12px 0px;">
<a href="?lang=UK"><img class="flag UK" style="margin-left:2px;" src="/img/t.gif" title=".Inglese" /></a>
<a href="?lang=IT"><img class="flag IT" src="/img/t.gif" title=".Italiano" /></a>
<a href="?lang=FR"><img class="flag FR" src="/img/t.gif" title=".Francese" /></a>
<a href="?lang=DE"><img class="flag DE" src="/img/t.gif" title=".Tedesco" /></a>
<a href="?lang=ES"><img class="flag ES" src="/img/t.gif" title=".Spagnolo" /></a> </div>
<div class="spalla" style="position:relative;top:-28px;float:none;text-align:center;background:#dde4e8;z-index:
1;padding-top:20px;height: 130px;">
<table class="glb_info" width="140"><tbody>
<tr class="nfocus"><td colspan="2">Equipment:</td></tr>
<tr class="mfocus"><td>Name:</td><td>KAIROS</td></tr>
<tr class="mfocus"><td>IP:</td><td>172.33.17.40</td></tr>
<tr class="nfocus"><td colspan="2">Software:</td></tr>
<tr><td>Name:</td><td>ka_bst</td></tr>
<tr><td>Vers.:</td><td>1.3.4.0</td></tr>

Radio Activity S.r.l. 2015/03/31 22 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

<tr><td>Date:</td><td>31-3-2015</td></tr>
<tr class="nfocus"><td colspan="2">Interface v2259</td></tr>
</tbody></table> </div></div></div>
<div class="lower_part" id="page_low_content">
<div class="main_content">
<div class="box" id="b15"><div class="titolo"><ul><li>DSP</li><li id="b15_wait" class="wait"
></li></ul></div><div class="corpo" id="b15_content" ><ul><div style="width:100% "><div class="value"
id="f0"><table ><tbody><tr><td style="border:none;"></td></tr><tr><td style=
" border-style:none;">PPS Signal from GPS</td><td style=" background-color:#FF0000;">Present</td><td style="
background-color:#FF0000;">Valid</td><td style=" background-color:#CECECE;">Lock</td></tr><tr><td style="
border-style:none;">PPS Signal from PTP</td><td style="
background-color:#00FF00;">Present</td><td style=" background-color:#00FF00;">Valid</td><td style="
background-color:#CECECE;">Lock</td></tr><tr><td style=" border-style:none;">External PPS Signal</td><td
style=" background-color:#00FF00;">Present</td><td style=" backgro
und-color:#00FF00;">Valid</td><td style=" background-color:#CECECE;">Lock</td></tr><tr><td style=" border-
style:none;">Superaudio Tone</td><td style=" background-color:#FF0000;">Present</td><td style=" background-
color:#FF0000;">Valid</td><td style=" background-color:#CE
CECE;">Lock</td></tr></tbody></table></div></div><div style="width:100% "><div class="value"
id="f1"><table><tbody><tr><td style=" border-style:none;">Synchronization from RF Signal or 4FSK</td><td
style=" background-color:#CECECE;">Lock</td></tr><tr><td style=" border-s
tyle:none;">Synchronization from Internal Reference</td><td style=" background-
color:#00FF00;">Lock</td></tr></tbody></table></div></div><div style="width:100% "><div class="value"
id="f2"><table style="min-width:250px;"><tbody><tr><td style="border:none;"></td></tr><tr>
<td style="background-color:#00FF00; text-align:center;text-color:white; ">DSP Correctly
Synchronized</td></tr></tbody></table></div></div><div style="width:100% "><div class="value" id="f3"> 0d 0h
2m 36s</div></div><div style="width:100% "><div class="value" id="f4"><ta
ble class="values_table"><tbody><tr><td style="border:none;"></td></tr><tr><td class="m_v"
style="background-color:#00FF00;">TX PLL Lock</td></tr><tr><td class="m_v" style="background-
color:#00FF00;">RX PLL Lock</td></tr><tr><td class="m_v" style="background-color:#00FF0
0;">DSP<->PLD Communication</td></tr></tbody></table></div></div><div style="width:100% "><div
class="value" id="f5"><table class="values_table"><tbody><tr><td style="border:none;"></td></tr><tr><td
class="m_v" style="background-color:#00FF00;">Analog Features</td></tr><
tr><td class="m_v" style="background-color:#FF0000;">DMR Features</td></tr><tr><td class="m_v"
style="background-color:#00FF00;">ETSI Tier III Features</td></tr><tr><td class="m_v" style="background-
color:#00FF00;">Simulcast Features</td></tr></tbody></table></div></div>
<div style="width:100% "><div class="value" id="f6"><table class="values_table"><tbody><tr><td
style="border:none;"></td></tr><tr><td class="m_v" style="background-color: #00FF00;" colspan="2"> DSP
Ready</td></tr><tr><td class="m_v" style="background-color: #00FF00;" col
span="2">TRX Active</td></tr><tr><td class="m_v" style="background-color: #CECECE;" colspan="2">Calibration
Running</td></tr><tr><td class="m_v" style="background-color: #00FF00;" colspan="2">Calibration
OK</td></tr><tr><td class="m_v" style="background-color: #00FF00;"
colspan="2">Interrups from PLD</td></tr><tr><td class="m_v" style="background-color: #CECECE;">Main RX
Fail</td><td class="m_v" style="background-color: #CECECE;">Diversity RX Fail</td></tr><tr><td class="m_v"
style="background-color: #CECECE;">PTT Carrier</td><td class=
"m_v" style="background-color: #CECECE;">PTT Modem</td></tr><tr><td class="m_v" style="background-color:
#CECECE;">Squelch</td><td class="m_v" style="background-color: #CECECE;">TCS-DPL</td></tr><tr><td
class="m_v" style="background-color: #CECECE;">TX DMR TS A</td><td c
lass="m_v" style="background-color: #CECECE;">TX DMR TS B</td></tr><tr><td class="m_v" style="background-
color: #CECECE;">RX DMR TS A</td><td class="m_v" style="background-color: #CECECE;">RX DMR TS
B</td></tr></tbody></table></div></div><div style="width:100% "><div cla
ss="value" id="f8"> <table class="values_table"><tbody><tr><td style="border:none;"></td></tr><tr><td
class="m_h">DMR Packets Out of Window</td><td acolspan="2" class="m_v">0</td></tr><tr><td
class="m_h">Analog Packets Out of Window</td><td colspan="2" class="m_v">0</
td></tr><tr><td class="m_h">Safety margin for DMR Packets</td><td colspan="2"

Radio Activity S.r.l. 2015/03/31 23 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

class="m_v">0</td></tr><tr><td class="m_h">Safety margin for Analog Packets</td><td colspan="2"


class="m_v">0</td></tr></tbody></table></div></div><div style="width:100% "><div class="value" id
="f9"><table class="values_table"><tbody><tr><td style="border:none;"></td></tr><tr><td class="m_h">Board
Supply Voltage</td><td class="m_v">3.27 V</td></tr><tr><td class="m_h">Input Supply Voltage</td><td
class="m_v">12.79 V</td></tr><tr><td class="m_h">TX Temperature</
td><td class="m_v" style="background-color: ;">30 &#176;C</td></tr><tr><td class="m_h">TX Input
Current</td><td class="m_v">N/A </td></tr><tr><td class="m_h">Forward Power</td><td class="m_v">N/A
</td></tr><tr><td class="m_h">Reflected Power</td><td class="m_v">N/A </td>
</tr></tbody></table></div></div><div style="width:100% "><div class="value" id="f10"><table
class="values_table"><tbody><tr><td style="border:none;"></td></tr><tr><td class="m_h">AF to DMR
Codecs</td><td class="m_v" style="background-color:#CECECE;" colspan="3">TS A</td
><td class="m_v" style="background-color:#CECECE;" colspan="3">TS B</td></tr><tr><td class="m_h">DMR
Codecs to AF</td><td class="m_v" style="background-color:#CECECE;" colspan="3">TS A</td><td class="m_v"
style="background-color:#CECECE;" colspan="3">TS B</td></tr><tr><t
d class="m_h">Output Signalling</td><td class="m_v" style="background-color:#CECECE;" colspan="2">Line
0</td><td class="m_v" style="background-color:#CECECE;" colspan="2">Line 1</td><td class="m_v"
style="background-color:#CECECE;" colspan="2">Line 2</td></tr><tr><td cla
ss="m_h">Input Signalling</td><td class="m_v" style="background-color:#CECECE;" colspan="2">Line 0</td><td
class="m_v" style="background-color:#CECECE;" colspan="2">Line 1</td><td class="m_v" style="background-
color:#CECECE;" colspan="2">Line 2</td></tr><tr><td class="m_
h"></td></tr><tr><td class="m_v" style="background-color:#CECECE;" colspan="7">Emergency Self-Repeating
mode</td></tr></tbody></table></div></div><div style="width:100% "><div class="value" id="f11"><table
style="min-width:250px;"><tbody><tr><td style="border:none;"></td
></tr><tr><td style="background-color:#00FF00; text-align:center;text-color:white; ">DSP in Survey
State</td></tr></tbody></table></div></div><div style="width:100% "></div><div style="width:100% "><di
v class="value" id="f13"><table class="values_table"><tbody><tr><td style="border:none;"></td></tr><tr><td
class="m_h">Current Timeslot</td><td colspan="2" class="m_v">19</td></tr><tr><td class="m_h">Current
Second</td><td colspan="2" class="m_v">6</td></tr><tr><td class
="m_h">Current Extended Timeslot</td><td colspan="2" class="m_v">219</td></tr><tr><td
class="m_h"></td></tr><tr><td class="m_h"> </td><td class="m_v">TS A</td><td class="m_v">TS
B</td></tr><tr><td class="m_h">Last Received Timeslot</td><td class="m_v">0</td><td class="m_
v">0</td></tr><tr><td class="m_h">Frequency offset rx</td><td class="m_v">0 Hz</td><td class="m_v">0
Hz</td></tr><tr><td class="m_h">Time offset rx</td><td class="m_v">0.000 &mu;s</td><td class="m_v">0.000
&mu;s</td></tr><tr><td class="m_h">Error Vector</td><td class="m_
v">0</td><td class="m_v">0</td></tr><tr><td class="m_h">Last Received Color codes</td><td
class="m_v">0</td><td class="m_v">0</td></tr><tr><td class="m_h">Last Transmitted Data Types</td><td
class="m_v">0</td><td class="m_v">0</td></tr><tr><td class="m_h">RSSI Main</td><
td class="m_v">N/A</td><td class="m_v">N/A</td></tr><tr><td class="m_h">RSSI Diversity</td><td
class="m_v">N/A</td><td class="m_v">N/A</td></tr><tr><td class="m_h"></td></tr><tr><td class="m_h">Peak
Deviation </td><td colspan="2" class="m_v">N/A</td></tr><tr><td class="m
_h">Estimated SINADp </td><td colspan="2" class="m_v">N/A</td></tr><tr><td class="m_h">Estimated
frequency offset </td><td colspan="2"
class="m_v">N/A</td></tr></tbody></table></div></div></ul></div></div>
</div></div></div></div></div></div>
</body>
</html>

Radio Activity S.r.l. 2015/03/31 24 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

5.4.3 Send Pocsag Message

Used to send a new message to POCSAG terminal and monitor history of sent message.
Client request:
POST /page/dom/send_pocsag.html HTTP/1.1
Host: 172.33.17.40
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: it,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://172.33.17.40/page/pocsag.html
Content-Length: 129
Cookie: Kairos=rl3q1XgrT9dsJVUiJNW19pWyOU8d
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

Radio Activity S.r.l. 2015/03/31 25 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

parms=1#0#12,5kHz#POCASG 1200#0#2000#Impolite#&msg=Radioactivity Kairos Post


Office Code Standardization Advisory Group Solution&

Server Response:
HTTP/1.1 200 OK
Content-Length: 57
Pragma: no-cache
Cache-Control: no-cache, no-store, must-revalidate
Expires: 0
Connection: Keep-Alive
Content-Type: application/xml

POCSAG message successfully queued,with id :1, to be sent

Radio Activity S.r.l. 2015/03/31 26 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

6 Introduction to HTTP Protocol


The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia
information systems. HTTP is the foundation of data communication for the World Wide Web.
Hypertext is structured text that uses logical links (hyperlinks) between nodes containing text. HTTP is the
protocol to exchange or transfer hypertext.
The standards development of HTTP was coordinated by the Internet Engineering Task Force (IETF) and the
World Wide Web Consortium (W3C), culminating in the publication of a series of Requests for Comments (RFCs),
in particular see RFCs 7230, 7231, 7232, 7233, 7234, and 7235 which defines HTTP/1.1.

6.1 Overview
HTTP functions as a request-response protocol in the client-server computing model. A web browser, for
example, may be the client and an application running on a computer hosting a web site may be the server. The
client submits an HTTP request message to the server. The server, which provides resources such as HTML files
and other content, or performs other functions on behalf of the client, returns a response message to the client.
The response contains completion status information about the request and may also contain requested content
in its message body.
A web browser is an example of a user agent (UA). Other types of user agent include the indexing software used
by search providers (web crawlers), voice browsers, mobile apps, and other software that accesses, consumes,
or displays web content.
HTTP resources are identified and located on the network by Uniform Resource Identifiers (URIs)—or, more
specifically, Uniform Resource Locators (URLs)—using the http or https URI schemes. URIs and hyperlinks in
Hypertext Markup Language (HTML) documents form webs of inter-linked hypertext documents.
HTTP/1.1 is a revision of the original HTTP (HTTP/1.0). In HTTP/1.0 a separate connection to the same server is
made for every resource request. HTTP/1.1 can reuse a connection multiple times to download images, scripts,
stylesheets, etc after the page has been delivered. HTTP/1.1 communications therefore experience less latency
as the establishment of TCP connections presents considerable overhead.

6.2 HTTP session


An HTTP session is a sequence of network request-response transactions. An HTTP client initiates a request by
establishing a Transmission Control Protocol (TCP) connection to a particular port on a server (typically port 80).
An HTTP server listening on that port waits for a client's request message. Upon receiving the request, the server
sends back a status line, such as "HTTP/1.1 200 OK", and a message of its own. The body of this message is
typically the requested resource, although an error message or other information may also be returned.

6.3 Request methods


HTTP defines methods (sometimes referred to as verbs) to indicate the desired action to be performed on the
identified resource. What this resource represents, whether pre-existing data or data that is generated
dynamically, depends on the implementation of the server. Often, the resource corresponds to a file or the
output of an executable residing on the server. The HTTP/1.0 specification defined the GET, POST and HEAD
methods, their semantics are well known and can be depended upon.
Any client can use any method and the server can be configured to support any combination of methods.
• GET: requests a representation of the specified resource. Requests using GET should only retrieve data
and should have no other effect. (This is also true of some other HTTP methods.) The W3C has published
guidance principles on this distinction, saying, "Web application design should be informed by the above

Radio Activity S.r.l. 2015/03/31 27 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

principles, but also by the relevant limitations."


• HEAD: asks for the response identical to the one that would correspond to a GET request, but without
the response body. This is useful for retrieving meta-information written in response headers, without
having to transport the entire content.
• POST: requests that the server accept the entity enclosed in the request as a new subordinate of the
web resource identified by the URI. The data POSTed might be, for example, an annotation for existing
resources; a message for a bulletin board, newsgroup, mailing list, or comment thread; a block of data
that is the result of submitting a web form to a data-handling process; or an item to add to a database.

6.4 HTTP session state


HTTP is a stateless protocol. A stateless protocol does not require the HTTP server to retain information or status
about each user for the duration of multiple requests. However, some web applications implement states or
server side sessions using for instance HTTP cookies or Hidden variables within web forms.

6.5 Encrypted connections


The most popular way of establishing an encrypted HTTP connection is HTTP Secure.
Two other methods for establishing an encrypted HTTP connection also exist, called Secure Hypertext Transfer
Protocol and the HTTP/1.1 Upgrade header. Browser support for these latter two is, however, nearly non-
existent; so HTTP Secure is the dominant method of establishing an encrypted HTTP connection.[24]

6.6 Request message


The request message consists of the following:
• A request line, for example GET /images/logo.png HTTP/1.1, which requests a resource called
/images/logo.png from the server.
• Request header fields, such as Accept-Language: en
• An empty line.
• An optional message body.
The request line and other header fields must each end with <CR><LF> (that is, a carriage return character
followed by a line feed character). The empty line must consist of only <CR><LF> and no other whitespace. In the
HTTP/1.1 protocol, all header fields except Host are optional.
A request line containing only the path name is accepted by servers to maintain compatibility with HTTP clients
before the HTTP/1.0 specification in RFC 1945.

6.7 Response message


The response message consists of the following:
• A Status-Line, which include the status code and reason message. (e.g., HTTP/1.1 200 OK, which
indicates that the client's request succeeded)
• Response header fields, such as Content-Type: text/html
• An empty line
• An optional message body

Radio Activity S.r.l. 2015/03/31 28 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

The Status-Line and other header fields must all end with <CR><LF> (a carriage return followed by a line feed).
The empty line must consist of only <CR><LF> and no other whitespace.

6.8 Example session


Below is a sample conversation between an HTTP client and an HTTP server running on www.example.com, port
80.
Client request:
GET /index.html HTTP/1.1
Host: www.example.com
A client request (consisting in this case of the request line and only one header field) is followed by a blank line,
so that the request ends with a double newline, each in the form of a carriage return followed by a line feed. The
"Host" field distinguishes between various DNS names sharing a single IP address, allowing name-based virtual
hosting. While optional in HTTP/1.0, it is mandatory in HTTP/1.1.
Server response:
HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
ETag: "3f80f-1b6-3e1cb03b"
Content-Type: text/html; charset=UTF-8
Content-Length: 138
Accept-Ranges: bytes
Connection: close

<html>
<head>
<title>An Example Page</title>
</head>
<body>
Hello World, this is a very simple HTML document.
</body>
</html>
The ETag (entity tag) header field is used to determine if a cached version of the requested resource is identical
to the current version of the resource on the server. Content-Type specifies the Internet media type of the data
conveyed by the HTTP message, while Content-Length indicates its length in bytes. The HTTP/1.1 webserver
publishes its ability to respond to requests for certain byte ranges of the document by setting the field Accept-
Ranges: bytes. This is useful, if the client needs to have only certain portions of a resource sent by the server,
which is called byte serving. When Connection: close is sent, it means that the web server will close the TCP
connection immediately after the transfer of this response.
Most of the header lines are optional. When Content-Length is missing the length is determined in other ways.
Chunked transfer encoding uses a chunk size of 0 to mark the end of the content. Identity encoding without
Content-Length reads content until the socket is closed.
A Content-Encoding like gzip can be used to compress the transmitted data.

Radio Activity S.r.l. 2015/03/31 29 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

7 Introduction to WebSocket Protocol


WebSocket is a protocol providing full-duplex communications channels over a single TCP connection. The
WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is
being standardized by the W3C.
WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or
server application. The WebSocket Protocol is an independent TCP-based protocol. Its only relationship to HTTP
is that its handshake is interpreted by HTTP servers as an Upgrade request. The WebSocket protocol makes
more interaction between a browser and a website possible, facilitating live content and the creation of real-
time games. This is made possible by providing a standardized way for the server to send content to the browser
without being solicited by the client, and allowing for messages to be passed back and forth while keeping the
connection open. In this way a two-way (bi-directional) ongoing conversation can take place between a browser
and the server. A similar effect has been achieved in non-standardized ways using stop-gap technologies such as
Comet.
In addition, the communications are done over TCP port number 80, which is of benefit for those environments
which block non-web Internet connections using a firewall. The WebSocket protocol is currently supported in
most major browsers including Google Chrome, Internet Explorer, Firefox, Safari and Opera. WebSocket also
requires web applications on the server to support it.

7.1 Technical overview


Unlike HTTP, WebSocket provides full-duplex communication. Additionally, WebSocket enables streams of
messages on top of TCP. TCP alone deals with streams of bytes with no inherent concept of a message. Before
WebSocket, port 80 full-duplex communication was attainable using Comet channels; however, Comet
implementation is nontrivial, and due to the TCP handshake and HTTP header overhead, it is inefficient for small
messages. WebSocket protocol aims to solve these problems without compromising security assumptions of the
web.

7.2 WebSocket protocol handshake


To establish a WebSocket connection, the client sends a WebSocket handshake request, for which the server
returns a WebSocket handshake response, as shown in the following example:
Client request:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
Origin: http://example.com
Server response:
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=
Sec-WebSocket-Protocol: chat

The handshake resembles HTTP so that servers can handle HTTP connections as well as WebSocket connections

Radio Activity S.r.l. 2015/03/31 30 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

on the same port. However the specific fields involved, and what follows after the handshake, do not conform to
the HTTP protocol.
Note that each line ends with an EOL (end of line) sequence, \r\n. There must be an extra blank line at the end.
The client sends a Sec-WebSocket-Key which is a random value that has been base64 encoded. To form a
response, the GUID 258EAFA5-E914-47DA-95CA-C5AB0DC85B11 is appended to this base64 encoded key. The
base64 encoded key will not be decoded first. The resulting string is then hashed with SHA-1, then base64
encoded. Finally, the resulting reply occurs in the header Sec-WebSocket-Accept.
Once the connection is established, the client and server can send WebSocket data or text frames back and forth
in full-duplex mode. The data is minimally framed, with a small header followed by payload. WebSocket
transmissions are described as "messages", where a single message can optionally be split across several data
frames. This can allow for sending of messages where initial data is available but the complete length of the
message is unknown (it sends one data frame after another until the end is reached and marked with the FIN
bit). With extensions to the protocol, this can also be used for multiplexing several streams simultaneously (for
instance to avoid monopolizing use of a socket for a single large payload).
It is important (from a security perspective) to validate the "Origin" header during the connection establishment
process on the serverside (against the expected origins) to avoid Cross-Site WebSocket Hijacking attacks, which
might be possible when the connection is authenticated with Cookies or HTTP authentication. It is better to use
tokens or similar protection mechanisms to authenticate the WebSocket connection when sensitive (private)
data is being transferred over the WebSocket.

7.3 URI scheme


The WebSocket protocol specification defines two new URI schemes, ws: and wss:, for unencrypted and
encrypted connections respectively. Apart from the scheme name and fragment (# is not supported), the rest of
the URI components are defined to use URI generic syntax.

Radio Activity S.r.l. 2015/03/31 31 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

8 Introduction to JSON
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and
write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming
Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language
independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C+
+, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange
language.

JSON is built on two structures:


• A collection of name/value pairs. In various languages, this is realized as an object, record, struct,
dictionary, hash table, keyed list, or associative array.
• An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

These are universal data structures. Virtually all modern programming languages support them in one form or
another. It makes sense that a data format that is interchangeable with programming languages also be based
on these structures.

In JSON, they take on these forms:

An object is an unordered set of name/value pairs. An object begins with { (left brace) and ends with } (right
brace). Each name is followed by : (colon) and the name/value pairs are separated by , (comma).

An array is an ordered collection of values. An array begins with [ (left bracket) and ends with ] (right bracket).
Values are separated by , (comma).

Radio Activity S.r.l. 2015/03/31 32 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

A value can be a string in double quotes, or a number, or true or false or null, or an object or an array.
These structures can be nested.

A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A
character is represented as a single character string. A string is very much like a C or Java string.

Radio Activity S.r.l. 2015/03/31 33 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

A number is very much like a C or Java number, except that the octal and hexadecimal formats are not used.

Whitespace can be inserted between any pair of tokens. Excepting a few encoding details, that completely
describes the language.

Radio Activity S.r.l. 2015/03/31 34 / 35


AN_0014_KA_Web_0v3 ver 0.3 draft

9 References

9.1 RFC References


∞ RFC 7230 - HTTP/1.1: Message Syntax and Routing
∞ RFC 7231 - HTTP/1.1: Semantics and Content
∞ RFC 7232 - HTTP/1.1: Conditional Requests
∞ RFC 7233 - HTTP/1.1: Range Requests
∞ RFC 7234 - HTTP/1.1: Caching
∞ RFC 7235 - HTTP/1.1: Authentication
∞ RFC 6455 - The WebSocket Protocol

9.2 DMR References

∞ DMR Application Interface (AIS) 1.0.3

9.3 Radio Activity Informative Documents

∞ ENB20 - DMR repeater

9.4 Radio Activity Manuals

∞ ENB30 - DMR Manager


∞ ENB40 - DTI Manager
∞ ENB32 - DMR Repeater User Manual
∞ ENB52 - KAIROS user manual

Radio Activity S.r.l. 2015/03/31 35 / 35

You might also like