DJI RS2 and RS3-Pro Gimbals


ArduPilot 4.4 (and higher) support the DJI RS2 and DJI RS3-Pro handheld gimbals using a Lua script. The driver relies on the gimbal supporting the “DJI R SDK” protocol which is only these two gimbals as far as we know. Other gimbals including the very similar RSC2 and RS3 are not supported.

Some images on this page are from the DJI SDK Protocol and User Interface instructions.

What to Buy

Connection and Configuration

Connect the autopilot’s CAN1 or CAN2 port to the Focus wheel as shown below


Alternatively the connection can be accomplished without a Focus wheel. Note the image below shows the ports on the right side of the gimbal. The right-side port may be used but the pin positions are rotated 180 deg.


Connect to the autopilot with a ground station and do the following

  • If using CAN1, set CAN_D1_PROTOCOL = 10 (Scripting), CAN_P1_DRIVER = 1 (First driver)

  • If using CAN2, set CAN_D2_PROTOCOL = 10 (Scripting), CAN_P2_DRIVER = 2 (Second driver)

  • Set SCR_ENABLE = 1 to enable scripting

  • Set SCR_HEAP_SIZE = 120000 (or higher)

  • Set MNT1_TYPE = 9 (Scripting) to enable the mount/gimbal scripting driver

  • Reboot the autopilot

  • Download mount-djirs2-driver.lua (from here) and copy it to the autopilot’s SD card in the APM/scripts directory and reboot the autopilot

  • Optionally set DJIR_DEBUG to 1 to display parsing and errors stats at 5sec. Set to 2 to display gimbal angles

See the “Control with an RC transmitter” section of this page for details on parameter changes required to control the gimbal through an RC Transmitter (aka “RC Targeting”)

Control and Testing

See Gimbal / Mount Controls for details on how to control the gimbal using RC, GCS or Auto mode mission commands


Yaw rate control is always “follow” mode (aka “earth frame”) meaning that if the user control the gimbal’s yaw rotation rate from the RC (e.g. MNT1_RC_RATE > 0) the gimbal will rotate in “lock” mode (e.g. “earth frame”, e.g. will not rotate with the vehicle). A workaround is to always use yaw angle control (e.g. MNT1_RC_RATE = 0) or switch the mount to “Neutral” whenever the user wishes to re-center it.