Raw protocol

Specification of the DroneBridge raw protocol

This protocol is used for long range communication in monitor mode. The basic idea is the same as with WifiBroadcast. The protocol allows simple plug & fly as no configuration is needed. Changing the comm id is required if multiple pilots want to use the same frequency.

While it is optimized for use in UAS applications it is designed to carry any kind of payload

Protocol structure

Radiotap header

DroneBridge custom header

payload

Radiotap header

Use any that works. You can set the transmission bit rate here (works with Ralink cards only). Higher bit rate means less latency and more data but also less range.

Raw Protocol v2 header

Total length of the header is 10 bytes. Allows frames to be injected by most/all drivers supporting injection & monitor mode

Byte

Field

Description

0-3

FCF duration

RTS frame: 0xb4 0x00 0x00 0x00

Data frame: 0x08 0x00 0x00 0x00

4

direction

0x01 if packet is for drone

0x03 if packet is for ground station

5

comm id

Has to be the same on drone and ground station. Associates drone with ground station

6

port

DB-control: 0x01

DB-telemetry: 0x02

DB-video: 0x03

DB-communication: 0x04

DB-status: 0x05

DB-proxy: 0x06

DB-RC: 0x07

7-8

payload length

unsigned int 16 bit

little endian

9

sequence number

increases with every frame sent to same port. Used to make software diversity possible. Range: 0-255

If DroneBridge compatibility mode is enabled the DB raw header gets extended by 10 bytes of random data. These bytes are likely to overwritten on reception by un-patched WiFi drivers. The 10 byte padding makes sure no payload data is overwritten. Compatibility mode should be used in case a receiver with un-patched drivers is used (e.g. default Ubuntu etc.)

Compatibility mode can automatically be detected on reception if the length of the received frame is bigger than the sum of: Radiotap header length, DB header length & payload length

Payload

Minimal payload length depends on used frame type (tested with AR9271):

  • Data frame: minimal payload length: 14 bytes

  • RTS frame: minimal payload length: 6 bytes

  • Beacon frame: minimal payload length: 14 bytes

Can be anything. Just make sure the transmission bit rate is set appropriate. In the case of DroneBridge the payload can be on of the following things:

  • DroneBridge communication protocol (change settings etc.)

  • MSP (Multiwii Serial Protocol)

  • H264 in MPEG-TS container in case of GoPro video transmission using DroneBridge video module

  • LTM (Light Telemetry Protocol)

Encrypted Payload

The specification for encrypted messages is as follows:

field

length

description

Nonce

16 bytes

Nonce as part of the encryption. Must not be reused for any other

message with same key

MAC

16 bytes

MAC or TAG to verify the integrity of the message & authenticate the sender

Payload

0 - 1458 bytes

Encrypted data. Length must not exceed 1458 bytes since the MTU in most WiFi drivers is ~1500 bytes

The encrypted payload lies inside the DroneBridge raw protocol payload field. DroneBridge libraries support AES encryption with 128, 192, 256 bit key length. Authentication is done using EAX. The Python library uses the PyCryptodomex implementation. That way DroneBridge allows for end to end encryption of all messages. It is not recommended to enable it on latency sensitive applications like real-time video & audio streams.