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: Data frame: |
4 | direction |
|
5 | comm id | Has to be the same on drone and ground station. Associates drone with ground station |
6 | port | DB-control: DB-telemetry: DB-video: DB-communication: DB-status: DB-proxy: DB-RC: |
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: |
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.
Last updated