Drone Operators · Step 1

Set up a drone

Before a drone can be registered it needs the geoNFT gateway: a small board with a secure element that signs every observation. This page takes you from parts on the bench to a ground station ready for a pairing code.

How the gateway fits in

The gateway sits on the telemetry link, between the flight controller and the ground station. It reads the drone's position (MAVLink GLOBAL_POSITION_INT) and camera frames from the flight controller, signs them with the key inside the ATECC608, and passes them on to MAVProxy. The gateway never connects to the internet. MAVProxy, running the tcs module, is the only part that talks to the geoNFT services.

Flight controller ──UART1──▶ ESP32-S3 gateway ──UART2──▶ MAVProxy (tcs) ──HTTPS──▶ cs.geonft.eu
   (ArduPilot)               + ATECC608 key                (ground station)
                              ▲
                     UART0 or Bluetooth: enrollment from the browser

Parts list

PartPurposeNotes
ESP32-S3 DevKitC-1Runs the gateway firmwarePowered from its own USB port, which is also the flashing port
ATECC608 breakoutHolds the P-256 signing key (DPoP)Must have pull-up resistors to 3.3 V (4.7 kΩ is usual); the firmware turns the internal pull-ups off
USB-UART adapter “ENROLL”Browser enrollment over Web SerialCP2102 or FTDI class. Not needed if you enroll over Bluetooth
Flight-controller link “FC”MAVLink from ArduPilotA Pixhawk/Cube TELEM port, or a USB-UART adapter on the bench
Ground-station link “GCS”Signed downlink to MAVProxyUSB-UART adapter or telemetry radio to the ground station

Wire the gateway

All three serial links run at 115200 baud, 8N1, no flow control. Cross transmit and receive: each ESP32 TX pin goes to the other side's RX, and each RX to the other side's TX. Join every ground to the DevKit ground.

Leave every 5 V pin unconnected

That includes the DevKit 5V pin, the adapters' 5V and 3V3 pins, and pin 1 (VCC) of a Pixhawk-style TELEM connector. Power the ATECC608 from the DevKit's 3V3 pin only.

ESP32-S3 pinConnects toRole
3V3 and GNDATECC608 3V3 and GND3.3 V power for the secure element
GPIO 8 (SDA), GPIO 9 (SCL)ATECC608 SDA and SCLI²C, address 0xC0 (8-bit; a 7-bit scanner shows 0x60), 100 kHz
GPIO 43 TX, GPIO 44 RXENROLL adapter RXD, TXDUART0 · enrollment from the browser
GPIO 17 TX, GPIO 18 RXFlight controller RX, TX (ArduPilot SERIAL1)UART1 · MAVLink from the autopilot
GPIO 10 TX, GPIO 12 RXGCS adapter RXD, TXDUART2 · signed downlink to MAVProxy

On a Pixhawk or Cube TELEM port the usual 6-pin order is 1 VCC (leave open), 2 TX, 3 RX, 4 CTS, 5 RTS, 6 GND. Autopilot TX goes to GPIO 18, autopilot RX to GPIO 17. Check the order in your autopilot manual before applying power. GPIO 11 sits between GPIO 10 and GPIO 12 on the header and is not used; match the GPIO numbers printed on your board, since revisions move the silkscreen.

Flash the firmware

Install ESP-IDF once. Plug the DevKit into your computer with its own USB cable, then, from the root of the Trusted Connected Systems package:

. "$IDF_PATH/export.sh"
cd firmware/esp32s3_gateway
idf.py set-target esp32s3
idf.py build
idf.py flash monitor

Later updates need only idf.py flash monitor. If several serial devices are plugged in, name the DevKit port, for example idf.py -p /dev/cu.usbmodem1101 flash monitor on macOS or /dev/ttyACM0 on Linux.

Ready when you see

esp32s3 gateway ready in the monitor. All three UARTs and Bluetooth are up; the Bluetooth name is tcs-esp32. Leave Ctrl+] to quit the monitor and keep the board powered.

Registration fails until the ATECC608 answers on I²C. If the gateway never shows a fingerprint during registration, check the SDA/SCL wiring and the pull-ups, then flash again.

Configure the flight controller

The gateway expects MAVLink 2 at 115200 baud on the port wired to it. With ArduPilot that is SERIAL1. Connect MAVProxy to the autopilot's main port and set:

param set SERIAL1_PROTOCOL 2
param set SERIAL1_BAUD 115
param fetch
status

For practice without a vehicle, run ArduPilot SITL on the ground-station computer and point its SERIAL1 at the FC adapter:

sim_vehicle.py -v ArduCopter --no-mavproxy \
  -A "--serial1=uart:/dev/cu.usbserial-FC:115200 --serial2=tcp:5773"

Prepare the ground station

  1. Install MAVProxy (Python 3):

    python3 -m pip install MAVProxy

    For MQTT push mode also install paho-mqtt. HTTP is the default and needs nothing else.

  2. Bridge the GCS link to the downlink port. The tcs module talks to the gateway on TCP 127.0.0.1:5763. If the GCS link is a USB-UART adapter, bridge it with socat (on macOS use the cu. device):

    socat TCP-LISTEN:5763,reuseaddr,fork /dev/cu.usbserial-GCS,b115200,raw,echo=0,cs8
  3. Start MAVProxy with the tcs module, connected to the autopilot:

    mavproxy.py --master=tcp:127.0.0.1:5760 --console --map \
      --load-module="$PWD/gcs/mavproxy_tcs.py"

    If your MAVProxy build loads modules only by name, copy gcs/mavproxy_tcs.py into its modules folder and type module load tcs. Replace --master with your autopilot connection (serial port or telemetry radio).

  4. Point the module at the public operator service (the default is a local bench at http://127.0.0.1:8090) and check the settings:

    tcs config as https://operator.geonft.eu
    tcs config
    tcs help
No hardware yet?

The package includes a host simulator, build/tcs-sim, that stands in for the ESP32 and the ATECC608, and sim/sitl/sitl.py, a flight-controller stand-in that emits a fixed position and an emulated camera. Start python3 sim/sitl/sitl.py, then ./build/tcs-sim 127.0.0.1 5762 5763, and MAVProxy as above. The simulator prints the enrollment port (for example uart0 /dev/ttys012) that the browser opens during registration.

Before you continue

  • The monitor showed esp32s3 gateway ready.
  • The enrollment adapter is plugged in, or the gateway advertises as tcs-esp32 over Bluetooth.
  • MAVProxy shows the vehicle and tcs help lists the commands.
  • You have Chrome or Edge and your passkey device ready.