Skip to content
jaanuke edited this page Mar 18, 2022 · 14 revisions

DJI FPV Architecture

The DJI FPV system uses a shared architecture between the Goggles, Air Unit, and Vista.

The main processor is a P1, an ARM ??? with several coprocessors onboard.

The system runs an Android kernel and base userland, but does not use Android UI services like SurfaceFlinger or MediaServer.

For this reason, basic Android principles and services are all in play:

adb can be used for file transfer and debugging. The Android logger is employed, so adb logcat will give you interesting logs. setprop can be used to affect the Properties system and trigger actions in the running system.

DJI specific software is all stored in the /system partition.

DJI processes communicate with one another using an event bus and a message passing system called DUML.

The most important processes are in /system/bin , and libraries in /system/lib:

  • dji_glasses : The base DJI UI process. Has debugging symbols, so a great place to start.
  • dji_hdvt_gnd : The "Ground Station" HD Video Transmission service.

These services communicate over the DJI event bus using DUPC. dji_mb_ctrl and dji_mb_parser can be used to manipulate the message bus from userland. The messsage bus is also exposed over a USB-serial gadget, which can be communicated with using https://github.com/o-gs/dji-firmware-tools and comm_serialtalk.py .

In /system/lib:

  • libtp1801_gui.so : The Embedded Wizard GUI framework
  • libduml_*.so : The frameworks used by all shared DJI applications. FRWK and HAL contain hardware abstraction. OSAL contains OS Abstraction - basically RTOS primitives built on top of PThreads. Util contains... utilities.

The base RF communication between the Goggles and Air Unit/Vista happens through a baseband OS called, rather simply, SDR, which runs on the same P1 processor, with shared address space. Division between the RTOS and Linux seems to be through simple core affinity - Linux gets one core and the RF baseband gets the other core. Communication between the two systems happens through the "SDRS" system by simply mapping buffers in /dev/mem.

There is also a kernel module called pigeon_modem which seems to use the same shared-memory communication mechanism to create a virtual networking device which tunnels IP packets between nodes.

UI is driven through a DirectFB mux - dji_glasses takes over DirectFB and something at a lower level handles the mux between the overlay DirectFB and the raw video data from the baseband.