打开 Drone ID 核心 C 库
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.
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.
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.
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.
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.
The ESP32 transmitter example code also contains code for receiving drone ID signals on ESP32 HW.
A basic scanner application for Wi-Fi NaN/Beacon frames and Bluetooth is available here.
A list of smartphones that have been tested for receiving Remote ID signals is available here.
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.
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).
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.
An example transmitter implementation for the nRF52840 Bluetooth chip can be found here.
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.
A list of devices capable of transmitting Remote ID signals is available here.
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.
To build the library, the sample app and the unit tests on Linux:
sudo apt-get install libgps-dev libnl-genl-3-dev libgtest-dev cmake
git submodule update --init
mkdir build && cd build
cmake ../.
make -jTwo 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.
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 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
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
sudo apt-get install libgps-dev libnl-genl-3-devIf available, the Wi-Fi reference implementation will link against libnl-tiny instead of libnl*-3 if available.
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.
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_dataThe 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_encodedOnce 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
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.
暂无开放 Issues,或尚未同步最近议题。