This is my fifth article about Andruav. The new thing about this topic is that it targets Developers more than users.

Andruav-SDK is a jar file that you can use to develop an application with same or more features of that in Andruav App.

Andruav Protocol

Andruav based systems uses web-sockets for communicating with other Andruav-based parties. Communication can take place as broadcast or peer-to-peer. It is very similar to IRC and chat room model, where you can communicate privately with someone or just speak to the whole room. In Andruav world we call them Groups and instead of talking to persons there are Units. A unit can be a vehicle “plane, quadcopter, rover” or can be a GCS “Ground Control Station”.

Andruav Communication Rules

Before we start, we need to define some communication rules for Andruav.

1- Any client connect to server identify itself by AccessCode "account".

2- for each packet the unit has to identify its name and group name.

a. unit name "sender" is a name unique for each account and identifies the unit of GCS.

b. group name "group" is a name unique for each account.

3- Each account can have multiple groups.

4- Each group can have multiple units.

5- Units can only communicate with other units in the same group. no group-to-group communication or account-account communication.

Command Types

command types are either system commands or communication commands. It is a fast way to tell server if it has to parse the message or just forward it to target(s).

system commands are:

add: to subscribe a unit or GCS in a group in an account.

del: to unsubscribe a unit or GCS from a group in an account.

ping: server reply with pong message and using timestamp created by sender the sender can evaluate quality of connection. Can be used to determine some features such as enable/disable video stream, or send a remote warning that there is a communication issue or send SMS as SOS message.

The other command type is communication commands and it has only two commands:

individual: instruct the server to send the message to a single unit. the target unit is found in field "target" and it should be found within the same group. target is extra field that appears only when sending individual messages.

common: instruct the server to send the message to all units and GCS in the same group.

In communication commands, server only acts as router for routing messages. the message field in Andruav command become a major player here. as it contains the actual command or info that is sent to target(s). Also another field appear when sending command called "message type" which is an id of type of command embedded in the message part.

Above attributes are sent in JSON format.

Andruav Messages can be either text or binary. Binary messages are used to carry telemetry data, images and video frames.

Remember you can Extend and Create new commands that fits your need. More information about classes are here.

There is alot to be written for documentation, however please contact me in case you need any support that is not clear in documentation.

How to Run Sample #1 APP

Code & App is on gitHub

You need to install Android APP apk file on two android mobiles.

from above video you need to only enter Access Code & Andruav Unit ID. The first one is a common alphanumeric, and the second one is unique per device.

You might also want to access this for details.

Views: 623


You need to be a member of DIY Drones to add comments!

Join DIY Drones


Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service