Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

opendroneid-core-c

> 编程语言
Open source

Open Drone ID Core C Library

354 stars0 likes1 views
WebsiteGitHub

About

Open Drone ID Core C Library

opendroneid-core-c

Open Drone ID Core C Library

This repository provides a C-code function library for encoding and decoding (packing/unpacking) Open Drone ID messages, as the format is defined in the ASTM F3411 Remote ID and the ASD-STAN prEN 4709-002 Direct Remote ID specifications. See further details in the specifications section below.

Please note that both specifications have been updated during the first half of 2021. Both of the updated standards have been published (May 2022). The code available in this repository is compliant with these updates.

The opendroneid-core-c code is meant for implementations that will broadcast the Remote ID information via Bluetooth or Wi-Fi. If you are looking for code related to Network Remoted ID (via the internet), please take a look at https://github.com/interuss and https://github.com/uastech/standards.

Work is ongoing by the IETF DRIP (Drone Remote ID Protocol) task force to define how security could be supported in the context of the ASTM Remote ID specification: https://datatracker.ietf.org/wg/drip/documents/ and https://github.com/ietf-wg-drip and https://www.ida.liu.se/~andgu38/drip/.

MAVLink messages for drone ID are available with documentation. A similar message set for DroneCAN has been published.

If you want to contribute to the open source efforts for Remote ID, see below.

Receiver examples

Android

For an example Android receiver application supporting Bluetooth and Wi-Fi, see https://github.com/opendroneid/receiver-android. This app is available on the Google PlayStore.

The source codes for an alternative remote ID application are available at https://github.com/dronetag/drone-scanner. The DroneTag app can be built for both Android and iOS and is available on the Google PlayStore.

iOS

The DroneTag application for iOS can received Bluetooth 4 Legacy Advertising signals on iOS. It is available on the AppStore. The source codes are available at https://github.com/dronetag/drone-scanner and can be built for both iOS and Android.

Another receiver application for iOS is being Beta tested here: https://testflight.apple.com/join/HA3EL4zw.

Apple currently does not expose suitable APIs to receive any other transmission method for drone ID signals than BT4 legacy advertising. I.e. current versions of iOS (up to and including 15) do not support receiving BT5 Long Range + Extended Advertising, Wi-Fi NaN nor Wi-Fi Beacon.

WireShark

Examples on how to use the WireShark PC application to pick up and dissect open drone ID messages (both WiFi and Bluetooth) are available here: https://github.com/opendroneid/wireshark-dissector.

Bluetooth sniffing

Using Texas Instruments Bluetooth boards, it should be possible to use this SW to pick up all Bluetooth advertisements from a transmitter: https://github.com/nccgroup/Sniffle

Keep in mind that for both WireShark and for this approach, if the goal is to do rule compliance testing, the setup most likely needs to be placed in a radio shielded room, to avoid disturbance from other Bluetooth/Wi-Fi transmitters in the neighborhood.

ESP32

The ESP32 transmitter example code also contains code for receiving drone ID signals on ESP32 HW.

Linux

A basic scanner application for Wi-Fi NaN/Beacon frames and Bluetooth is available here.

Smartphone receivers

A list of smartphones that have been tested for receiving Remote ID signals is available here.

Transmitter examples

ESP32-S3 and ESP32-C3

An implementation for the ESP32-C3 or ESP32-S3 HW supporting inputting data via either MAVLink or DroneCAN messages is available at https://github.com/ArduPilot/ArduRemoteID.

This has been tested to work together with ArduPilot. Currently it supports transmitting Bluetooth 4 Legacy Advertising, Bluetooth 5 Long Range, Wi-Fi Beacon and Wi-Fi NaN.

ESP32/ESP8266

An example library for transmitting Open Drone ID signals from ESP32/ESP8266 HW can be found at https://github.com/sxjack/uav_electronic_ids. The implementation supports simultaneous transmission via Bluetooth Legacy Advertising, Wi-Fi NaN and Wi-Fi Beacon (ESP32) or Wi-Fi NaN/Beacon (ESP8266).

Please note that the ESP32 HW only supports transmitting Bluetooth Legacy Advertising signals. Bluetooth Long Range and Extended Advertising are not supported (ESP32-S3 or ESP32-C3 HW is needed for that). Please check if this is sufficient to comply with the rules that apply in the area in which you are flying (most likely it is not. See below).

Linux

A Wi-Fi NaN transmitter implementation for Linux is available here. Better documentation is needed on what exact HW + SW environment this is functional. Functions for creating suitable Wi-Fi Beacon frames have been added to wifi.c, but those are currently not used by the sample sender application.

A simple application for sending static drone ID data via Bluetooth 4 and 5 and via Wi-Fi Beacon is available here. This has tested to work reasonably okay on one CometLake motherboard and partly okay on RaspberryPi 3B and 4B HW.

nRF Bluetooth chipsets

An example transmitter implementation for the nRF52840 Bluetooth chip can be found here.

TI Bluetooth chipsets

Transmitter implementations for Bluetooth 4 and 5, based on the TI CC2640 SoCs are known to exist, but so far none have been open sourced. Please open an issue if you have an implementation you are willing to share. A new repository under opendroneid can be made.

Transmitter devices

A list of devices capable of transmitting Remote ID signals is available here.

Flight controllers

Integration of remote ID support in various flight controller SW is an ongoing effort.

The first part of supporting remote ID in ArduPilot has been merged. It is expected that additional changes are needed in order to be fully compliant with the rules and standards. Discussion related to remote ID support in ArduPilot can be followed on Discord. Some documentation is available here, here and here. The ArduPilot changes are being tested against this transmitter implementation.

The first part of supporting remote ID in PX4 is being handled in this Pull Request and this Pull Request. It is expected that additional changes are needed in order to be fully compliant with the rules and standards. Discussion related to remote ID support in PX4 can be followed on Discord.

How to Build

To build the library, the sample app and the unit tests on Linux:

bash
sudo apt-get install libgps-dev libnl-genl-3-dev libgtest-dev cmake
git submodule update --init
mkdir build && cd build
cmake ../.
make -j

Two types of simple test systems are availabe:

test/odidtest
ctest .

The outputs will be libopendroneid/libopendroneid.so, the test/odidtest sample application, and the test/unit_odid_wifi_beacon test.

The sample odidtest application will do a test encode/decode, then continuously generate sample messages.

The intended architecture is to take whatever input you wish, and to put it into the nominal structures as defined in libopendroneid/opendroneid.h.

The unit_odid_wifi_beacon checks that a sample input data structure produces the expected Beacon header.

Build Options

Memory reductions

Some embedded systems might require a smaller memory footprint than what by default is used by opendroneid-core-c. The following compile time options exists for reducing the memory consumption:

  • ODID_AUTH_MAX_PAGES is by default configured to support 16 pages/messages of authentication data. See the beginning of opendroneid.h. If authentication messages are not used, this value can be configured between 1 and 16, e.g. by adding -DODID_AUTH_MAX_PAGES=1 when calling cmake.

  • When including MAVLink in the build (see below), if MAVLink's virtual channel functionality is not used, some memory can be saved by defining MAVLINK_COMM_NUM_BUFFERS to be equal to 1, before including mavlink_types.h See further details in the beginning of mav2odid.c.

MAVLink

MAVLink OpenDroneID support is included by default.

To disable, use the BUILD_MAVLINK parameter, i.e.:

cmake -DBUILD_MAVLINK=off .

MAVLink support requires the mavlink_c_library_v2 to be installed in the respective folder

Wi-Fi NaN example implementation

The Wi-Fi NaN example implementation is built by default.

To disable, use the BUILD_WIFI parameter, i.e.:

cmake -DBUILD_WIFI=off .

It requires the libgps, libnl-3 and libnl-genl-3 support. Install the dependencies on your build host, e.g. on Debian/Ubuntu use

bash
sudo apt-get install libgps-dev libnl-genl-3-dev

If available, the Wi-Fi reference implementation will link against libnl-tiny instead of libnl*-3 if available.

Continuous Integration

Regressions can be checked by running the tests provided in the test subdirectory.

An example is given in the form of a GitHub workflow in the .github subdirectory.

Architecture

These are nominal (non-encoded) structures:

ODID_BasicID_data
ODID_Location_data
ODID_Auth_data
ODID_SelfID_data
ODID_System_data
ODID_OperatorID_data
ODID_MessagePack_data

The SDK functions will encode to (or decode from) the following structures:

ODID_BasicID_encoded
ODID_Location_encoded
ODID_Auth_encoded
ODID_SelfID_encoded
ODID_System_encoded
ODID_OperatorID_encoded
ODID_MessagePack_encoded

Once you have the encoded data, then you are ready to assemble and transmit over any of the acceptable broadcast methods in Open Drone ID.

The primary SDK calls are the following:

…

Specific messages have been added to the MAVLink message set to accommodate data for Open Drone ID implementations:

https://mavlink.io/en/messages/common.html#OPEN_DRONE_ID_BASIC_ID

The functions in mav2odid.c can be used to convert these MAVLink messages into suitable opendroneid.h data structures and back again. See the example usages in test/test_mav2odid.c.

Recommendations on how to utilize the MAVLink messages for UAS internal distribution of Open Drone ID data of an Unmanned Aircraft System (UAS) can be found here: https://mavlink.io/en/services/opendroneid.html

Contribution suggestions

Any contribution to the open source efforts related to Remote ID will be very welcome. Below is a list of multiple topics that would be useful to get sorted out, but anything you feel you can help with, will certainly be appreciated.

  • Provide open source transmitter implementati

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言