# ArduPilot RemoteID 发射器 这是 MAVLink 和 DroneCAN OpenDroneID 发射器的一个实现。它旨在为 FAA 标准的 RemoteID 要求提供一个发射器解决方案,满足 ASTM F3586-22 遵守方式的发射器组件。它还旨在符合欧盟的 RemoteID 规定。 用户/制造商有责任配置 ArduRemoteID 固件,以确保其符合当地的 RemoteID 规定。例如,在美国,无人机制造商必须向 FAA 提交一份 [DoC(符合性声明)](https://link.gitcode.com/?target=https%3A%2F%2Fuasdoc.faa.gov%2Flogin&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white),声明他们的产品符合 RemoteID 规定。 ## 支持的硬件 该固件当前支持 ESP32-S3 和 ESP32-C3 芯片。目前支持 7 种主板,还有更多主板即将加入: - ESP32-S3 开发板:[https://au.mouser.com/ProductDetail/356-ESP32S3DEVKTM1N8](https://link.gitcode.com/?target=https%3A%2F%2Fau.mouser.com%2FProductDetail%2F356-ESP32S3DEVKTM1N8&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) - ESP32-C3 开发板:[https://au.mouser.com/ProductDetail/Espressif-Systems/ESP32-C3-DevKitM-1](https://link.gitcode.com/?target=https%3A%2F%2Fau.mouser.com%2FProductDetail%2FEspressif-Systems%2FESP32-C3-DevKitM-1&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) - Bluemark DB110(旧款)来自 [https://bluemark.io/](https://link.gitcode.com/?target=https%3A%2F%2Fbluemark.io%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) ([产品页面](https://link.gitcode.com/?target=https%3A%2F%2Fdronescout.co%2Fdronebeacon-mavlink-remote-id-transponder%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white)) - Bluemark DB200 来自 [https://bluemark.io/](https://link.gitcode.com/?target=https%3A%2F%2Fbluemark.io%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) ([产品页面](https://link.gitcode.com/?target=https%3A%2F%2Fdronescout.co%2Fdronebeacon-mavlink-remote-id-transponder%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) | 由 db201 替代) - Bluemark DB201 来自 [https://bluemark.io/](https://link.gitcode.com/?target=https%3A%2F%2Fbluemark.io%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) ([产品页面](https://link.gitcode.com/?target=https%3A%2F%2Fdronescout.co%2Fdronebeacon-mavlink-remote-id-transponder%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) | [购买](https://link.gitcode.com/?target=https%3A%2F%2Fdronescout.co%2Fproduct%2Fdronebeacon-mavlink-db201-transponder%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white)) - Bluemark DB202mav 来自 [https://bluemark.io/](https://link.gitcode.com/?target=https%3A%2F%2Fbluemark.io%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) ([产品页面](https://link.gitcode.com/?target=https%3A%2F%2Fdronescout.co%2Fdronebeacon-mavlink-remote-id-transponder%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) | [购买](https://link.gitcode.com/?target=https%3A%2F%2Fdronescout.co%2Fproduct%2Fdronebeacon-mavlink-db202mav-transponder%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white)) - Bluemark DB210pro 来自 [https://bluemark.io/](https://link.gitcode.com/?target=https%3A%2F%2Fbluemark.io%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) ([产品页面](https://link.gitcode.com/?target=https%3A%2F%2Fdronescout.co%2Fdronebeacon-mavlink-remote-id-transponder%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) | [购买](https://link.gitcode.com/?target=https%3A%2F%2Fdronescout.co%2Fproduct%2Fdronebeacon-mavlink-dronecan-db210pro-transponder%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white)) - Holybro Remote ID 模块 ([产品页面](https://link.gitcode.com/?target=https%3A%2F%2Fholybro.com%2Fproducts%2Fremote-id%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white)) 预计很快将添加来自 [https://wurzbachelectronics.com/](https://link.gitcode.com/?target=https%3A%2F%2Fwurzbachelectronics.com%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) 的硬件。 对于 ESP32-S3 开发板,此固件假定的引脚为: - UART TX 在引脚 18 - UART RX 在引脚 17 - CAN TX 在引脚 47 - CAN RX 在引脚 38 对于 ESP32-C3 开发板,此固件假定的引脚为: - UART TX 在引脚 3 - UART RX 在引脚 2 - CAN TX 在引脚 5 - CAN RX 在引脚 4 对于 CAN,需要将一个合适的 1MBit bxCAN 转发器连接到 CAN TX/RX 引脚。 您还可以在 USB UART 端口(丝网上标记为 "UART" 的端口)上使用 MAVLink。这允许通过插入一个微型 USB 线缆进行简单的仿真测试。 有关移植到新主板的信息,请查看 board_config.h 和 Makefile。 ## 传输模式 该固件支持以下传输模式: - WiFi 广播 - WiFi NAN(邻居感知网络) - Bluetooth 4 旧版广告 - Bluetooth 5 长距离 + 扩展广告 ## 协议 该固件支持使用 MAVLink 或 DroneCAN 与 ArduPilot 飞行控制器通信。 对于 MAVLink,使用以下服务: [https://mavlink.io/en/services/opendroneid.html](https://link.gitcode.com/?target=https%3A%2F%2Fmavlink.io%2Fen%2Fservices%2Fopendroneid.html&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) 对于 DroneCAN,使用以下消息: [https://github.com/dronecan/DSDL/tree/master/dronecan/remoteid](https://link.gitcode.com/?target=https%3A%2F%2Fgithub.com%2Fdronecan%2FDSDL%2Ftree%2Fmaster%2Fdronecan%2Fremoteid&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) DroneCAN 消息是 MAVLink 消息的精确镜像,以简化双传输实现。 ## 发布版本 预构建的发布版本在 github 上的发布列表文件夹中。 [https://github.com/ArduPilot/ArduRemoteID/releases](https://link.gitcode.com/?target=https%3A%2F%2Fgithub.com%2FArduPilot%2FArduRemoteID%2Freleases&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) ## 烧录 对于初始固件加载,要烧录到 ESP32-S3 开发板,请使用来自 [https://www.espressif.com/en/support/download/other-tools](https://link.gitcode.com/?target=https%3A%2F%2Fwww.espressif.com%2Fen%2Fsupport%2Fdownload%2Fother-tools&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) 的 espressif FlashTool。 如果是第一次烧录主板,您可能需要在连接 USB 连接器上的 USB 线缆时按下 "boot" 按钮,然后使用发布文件夹中的预构建二进制文件,并在选择主板连接的通信端口后使用以下选项进行烧录: ![Board setup dialog](https://raw.gitcode.com/gh_mirrors/ar/ArduRemoteID/files/master/images/flash-tool-setup.jpg) ![Flashing with FlashTool](https://raw.gitcode.com/gh_mirrors/ar/ArduRemoteID/files/master/images/FlashTool.jpg) 后续重新烧录新版本时,在连接 USB 线缆给主板加电时不需要按住 "boot" 按钮。 如果主板已经运行 ArduRemoteID,首选的固件升级方法是通过对网页界面上传新的固件文件。 ## 参数 该固件附带一组参数,可通过 DroneCAN 或 MAVLink 访问。这些参数允许在控制主板行为方面有很大的灵活性。 DroneCAN 允许控制任何参数。使用 MAVLink 时,只有非字符串参数可访问。 ![DroneCan Parameters](https://raw.gitcode.com/gh_mirrors/ar/ArduRemoteID/files/master/images/DroneCAN-parameters.jpg) 关键参数包括: - LOCK_LEVEL:这控制主板的锁定。如果将其设置为非零值,则将阻止通过 DroneCAN 进行所有参数更新。要在此设置后更改参数(包括 LOCK_LEVEL),需要使用 DroneCAN SecureCommand。在 scripts/secure_command.py 中有一个示例脚本,如果知道与其中一个公钥对应的私钥,它可以更改任何参数。 - UAS_TYPE、UAS_ID_TYPE 和 UAS_ID:当它们都已设置时,这些参数将覆盖 RemoteID BasicID 数据包中的 ID。制造商在发货前应设置这些值。 - WEBSERVER_ENABLE:这会启用构建 WiFi 访问点和网页服务器,用于状态监视和安全的固件更新。 - PUBLIC_KEY1 到 PUBLIC_KEY5:这些是用于验证固件更新和参数安全更新的公钥 ## 网页服务器 如果设置了参数 WEBSERVER_ENABLE,固件将附带内置的网页服务器。WiFi 访问点将使用从 WIFI_SSID 和 WIFI_PASSWORD 参数设置的 SSID 和密码,您可以使用 DroneCAN 参数工具(如 DroneCAN GUI 工具或 MissionPlanner CAN 工具)进行设置。 默认的 SSID 是 RID_xxxxxxxx,其中 xxxxxxxx 是主板的工厂 WiFi MAC 地址。默认密码是 ArduRemoteID。 网页服务器具有安全的固件更新机制,只允许使用与参数中的 5 个公钥之一对应的签名进行正确签名的固件。如果未设置任何公钥,则可以加载任何固件。 网页服务器默认在连接到 WiFi 访问点后使用 URL [http://192.168.4.1](https://link.gitcode.com/?target=http%3A%2F%2F192.168.4.1&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white)。 ## 固件签名 要生成公/私钥对,请使用: ``` scripts/generate_keys.py ``` 密钥与ArduPilot安全启动系统兼容。默认情况下,包含3个ArduPilot公开发布的密钥。 一旦生成了公钥,您可以使用DroneCAN参数编辑器将其添加到RemoteID节点。确保将私钥保存在安全的位置。 要通过网页服务器上传固件,您需要使用“OTA”(空中升级)固件,该固件在构建过程中生成OTA文件。然后,您需要使用与RemoteID节点上某个公钥相对应的私钥对其进行签名。 要签名OTA固件,您应使用如下命令: ``` scripts/sign_fw.py ArduRemoteID_ESP32S3_DEV_OTA.bin MyName_private_key.dat 1 ``` 末尾的 '1' 是BOARD_ID。有关您的板型ID,请参见board_config.h文件。 签署完成后,您可以通过网页服务器上传固件。 将LOCK_LEVEL设置为-1,以跳过通过空中升级(OTA)时的检查,例如板型ID检查,带有有效密钥的签名固件。对于LOCK_LEVEL为0或更高,只接受与板型ID匹配且由有效密钥签名的固件文件。(ArduRemoteID GitHub页面上的OTA固件文件总是由有效密钥签名的。) ## LOCK_LEVEL 参数 LOCK_LEVEL 参数是厂商锁定RemoteID板使其具有防篡改能力的方式。如果已设置任何有效公钥,则将LOCK_LEVEL设为1可以防止通过DroneCAN或MAVLink接口进行参数更改。所有参数更改都需要通过签名的SecureCommand接口进行。 将LOCK_LEVEL设置为2还会导致ESP32 eFuses被设置,以防止除签名网页界面外的固件更新。这是一个永久性更改,即使通过SecureCommand将LOCK_LEVEL改回0或1也无法撤销。 将LOCK_LEVEL设置为-1将跳过通过网页服务器升级固件的任何检查,如板型ID检查,带有有效密钥的签名固件。 默认的LOCK_LEVEL=0允许更改参数,并且只允许通过网页服务器进行已由有效密钥签名的固件升级。同时,固件文件的板型ID需要与设备的板型ID匹配。 ## 安全参数更新 一旦LOCK_LEVEL为1或2,您无法使用正常参数命令设置参数。相反,您需要使用DroneCAN的SecureCommand接口或MAVLink的SECURE_COMMAND接口。 对于DroneCAN,请参见scripts/secure_command.py中的脚本,例如以下命令会将UAS_TYPE更改为3: ``` scripts/secure_command.py mavcan::14550 --private-key my_private_key.dat --target-node=125 UAS_TYPE=3 ``` 在 MAVLink 中,您可以使用 MAVProxy 的 SecureCommand 模块。例如: ``` module load SecureCommand securecommand set private_keyfile my_private_key.dat securecommand getsessionkey securecommand setconfig UAS_TYPE=3 ``` 您也可以使用安全命令将LOCK_LEVEL重置为零,但请注意,如果您已经将LOCK_LEVEL设置为2,那么对eFuse位的设置不会被撤销。您将能够更改参数,但无法通过USB端口刷写固件。您仍然可以通过网页界面刷写签名后的固件。 ## 通过 support.ardupilot.org 的安全命令 如果您通过support.ardupilot.org远程使用secure_command.py,那么您需要运行以下命令: ``` scripts/secure_command.py mavcan:udpout:support.ardupilot.org:AAAAA --signing-passphrase=XXXXXXX --target-node=NNN --private-key=my_private_key.dat UAS_TYPE=3 ``` 以下是文本的中文翻译,保持了原始的 Markdown 格式: where - AAAAA 是您在 support.ardupilot.org 的远程支持 ID(支持工程师 ID,而非客户 ID) - NNN 是远程飞行控制器上的目标 CAN 节点 ID - 如果节点位于第二个 CAN 总线上,请添加 --bus-num=2 由于链接可能较慢,您可能还需要为 --timeout 选项设置更高的值。 ## 使用 DroneCAN GUI 工具进行安全命令 对于连接了 CAN 的 ArduRemoteID 模块,您可以使用 DroneCAN GUI 工具安全地更新参数。 您可以在以下链接获取最新的 DroneCAN GUI 工具: [https://firmware.ardupilot.org/Tools/CAN_GUI/](https://link.gitcode.com/?target=https%3A%2F%2Ffirmware.ardupilot.org%2FTools%2FCAN_GUI%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) 您需要版本 1.2.23 或更高版本。 连接后,选择 RemoteID 面板: ![RemoteID 面板1](https://raw.gitcode.com/gh_mirrors/ar/ArduRemoteID/files/master/images/RemoteID_panel1.jpg) 然后按以下方式使用: ![RemoteID 面板2](https://raw.gitcode.com/gh_mirrors/ar/ArduRemoteID/files/master/images/RemoteID_panel2.jpg) 命令格式为 "参数名称=值"。 当您通过 support.ardupilot.org 签名的链接使用 DroneCAN GUI 工具时,您需要输入如下格式的 URI: ![GUI 签名](https://raw.gitcode.com/gh_mirrors/ar/ArduRemoteID/files/master/images/GUI_signed.jpg) 其中 999999 替换为您支持工程师的 ID。 ## ArduPilot 支持 OpenDroneID 支持在 ArduPilot 主分支中,并且在 4.2.3 稳定版本和 4.3.x 版本中也提供。您需要在板上启用它,通过在您的板的 hwdef.dat 中设置 "define AP_OPENDRONEID_ENABLED 1",或者在执行 waf configure 时使用 --enable-opendroneid。 ## 致谢 非常感谢以下人员的出色工作: - OpenDroneID: [https://github.com/opendroneid/](https://link.gitcode.com/?target=https%3A%2F%2Fgithub.com%2Fopendroneid%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) - Steve Jack: [https://github.com/sxjack/uav_electronic_ids](https://link.gitcode.com/?target=https%3A%2F%2Fgithub.com%2Fsxjack%2Fuav_electronic_ids&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) - Roel Schiphorst: [https://bluemark.io/](https://link.gitcode.com/?target=https%3A%2F%2Fbluemark.io%2F&from=https%3A%2F%2Fgitcode.com%2Fgh_mirrors%2Far%2FArduRemoteID&lang=zh&theme=white) - David Buzz: ESP32 CAN 和蓝牙驱动程序 此固件基于他们的工作构建。 ## 许可 此固件在 GNU GPLv2 或更高版本下授权。