Skip to content

Repository files navigation

Pocket3Direct-Android

A minimal Android reference implementation for direct DJI Osmo Pocket 3 connectivity and gimbal control without DJI Mimo.

This repository is intended as a technical reference for developers exploring direct Pocket 3 communication. It is not an official DJI SDK project and is not affiliated with or endorsed by DJI.

What it demonstrates

  • Bluetooth LE discovery and Pocket 3 pairing
  • DJI camera Wi-Fi credential handoff and Android Wi-Fi joining
  • TCP port 7001 session bootstrap
  • Direct DUML communication over UDP port 9004
  • Camera-session registration and keepalive behavior
  • Capture-derived transport sequence and ACK-window handling
  • Touchscreen gimbal joystick control using DUML 04/01
  • Selectable LINEAR and PROGRESSIVE joystick response profiles
  • Live gimbal telemetry decoding from unsolicited DUML 04/05
  • Continuous/unwrapped yaw tracking across the +/-180 degree telemetry wrap
  • Pocket 3 recenter using 04/4C FE08
  • Explicit STOP / NEUTRAL gimbal control

Scope

Pocket3Direct-Android deliberately focuses on connectivity, transport, telemetry, and direct touchscreen gimbal control.

It is a reference implementation rather than a complete camera-control application. Broader application functionality and internal research material are outside the scope of this public repository.

The application ID is intentionally:

com.example.pocket3direct

It is a non-production placeholder and should be changed by anyone building a derived application for distribution.

Compatibility

This implementation was developed and tested against the DJI Osmo Pocket 3.

Other DJI cameras may use related protocols, but compatibility with other models is not claimed by this repository.

Android configuration:

  • Minimum SDK: 29
  • Target SDK: 34
  • Compile SDK: 34
  • Gradle wrapper: 8.7

The publication build was also verified using OpenJDK 21.

Building

Configure a local Android SDK using Android Studio, ANDROID_HOME, or a local local.properties file.

local.properties is machine-specific and should not be committed.

Build the debug APK with:

./gradlew clean assembleDebug

The APK will be written beneath:

app/build/outputs/apk/debug/

Basic use

  1. Power on the Pocket 3 normally.
  2. Launch Pocket3 Direct.
  3. Tap CONNECT VIA BLUETOOTH.
  4. Grant the requested Bluetooth/Wi-Fi permissions.
  5. Allow the BLE pairing and Wi-Fi handoff process to complete.
  6. Use the on-screen joystick for pitch/yaw movement.
  7. Switch between LINEAR and PROGRESSIVE response profiles as desired.
  8. Use RECENTER to return the Pocket 3 gimbal to its recentered position.
  9. Use STOP / NEUTRAL to explicitly return the joystick command stream to neutral.

Joystick profiles

LINEAR uses direct proportional stick mapping with a lower command range.

PROGRESSIVE preserves finer control near center while increasing response more quickly through the middle of the stick travel and retaining the tested full command ceiling.

Protocol notes

The direct control session uses:

Pocket 3 camera address: 192.168.2.1
TCP bootstrap:           7001
UDP DUML transport:      9004
Gimbal joystick:         04/01
Gimbal telemetry:        04/05
Recenter:                04/4C FE08

The UDP transport includes sequence/ACK-window behavior derived from physical Pocket 3 traffic captures.

Safety

This software can physically move the Pocket 3 gimbal.

Keep the camera clear of obstructions while experimenting, and do not send unverified gimbal commands to hardware you are unwilling to risk.

Open-source lineage

Parts of the BLE, Wi-Fi, DUML, and camera-session implementation incorporate or adapt MIT-licensed work from the Osmosis project.

Several DUML helper classes retain lineage from the MIT-licensed dji-remote project by Dmytro Antonov.

See:

  • THIRD_PARTY_NOTICES.md
  • LICENSES/Osmosis-MIT.txt
  • LICENSES/dji-remote-MIT.txt

License

Pocket3Direct-Android is distributed under the MIT License.

See LICENSE.

DJI and Osmo are trademarks of their respective owners. This is an independent third-party project.

About

Direct DJI Osmo Pocket 3 connectivity, telemetry, and gimbal control reference implementation for Android.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages