A focused iOS reference implementation for direct DJI Osmo Pocket 3 connectivity, live preview, camera recording, telemetry, and touchscreen gimbal control without using DJI Mimo as the control path.
This repository is intended as a technical reference for developers exploring direct Pocket 3 communication on iPhone and iPad. It is not an official DJI SDK project and is not affiliated with, authorized by, sponsored by, or endorsed by DJI.
- Bluetooth LE discovery and Pocket 3 pairing
- Retrieval of the Pocket 3 Wi-Fi SSID and password over BLE
- App-managed iOS Wi-Fi association
- TCP port 7001 session bootstrap
- Direct DUML communication over UDP port 9004
- Camera-session registration, keepalive, transport sequencing, and ACK-window handling
- Touchscreen gimbal control using DUML
04/01 - Selectable
LINEARandPROGRESSIVEjoystick response profiles - Combined pan/tilt control or separate yaw and pitch touch controls
- 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 - Direct H.264 live preview using the Pocket pktType
0x02media path - Pocket 3 internal recording start/stop using DUML
02/02 - Recording-state confirmation from unsolicited
02/80camera telemetry - Display of recording state, elapsed/remaining recording time, and storage information when available
- Automatic Picture in Picture for a live Pocket preview
- Clean external-display output for supported iOS external-screen paths
- Explicit neutral gimbal output when touchscreen control ends
Pocket3Direct-iOS focuses on direct Pocket 3 connectivity, transport, telemetry, live video, recording control, and touchscreen gimbal operation.
It is a reference implementation rather than a finished camera application. Broader product functionality, experimental research material, and application-specific features are intentionally outside the scope of this public repository.
Some controls visible in the camera interface are placeholders for future monitoring tools. Histogram, waveform, zebras, false color, and focus peaking are not implemented video-analysis features in this release.
The application bundle identifier is intentionally:
com.example.Pocket3Direct
It is a non-production placeholder and should be changed by anyone building a derived application for distribution.
This implementation was developed for the DJI Osmo Pocket 3.
Other DJI cameras may use related protocols, but compatibility with other models is not claimed by this repository.
Project settings currently target iOS 15.0 or later.
Open:
Pocket3Controller.xcodeproj
in Xcode and select the Pocket3Controller scheme.
A command-line simulator build can be performed with:
xcodebuild \
-project Pocket3Controller.xcodeproj \
-scheme Pocket3Controller \
-configuration Debug \
-sdk iphonesimulator \
-destination "generic/platform=iOS Simulator" \
CODE_SIGNING_ALLOWED=NO \
buildThe project also contains XCTest coverage for DUML/control regressions and video-timing behavior.
- Power on the Pocket 3 normally.
- Launch Pocket3 Direct on the iPhone or iPad.
- Start the Bluetooth connection flow.
- Approve pairing on the Pocket 3 if requested.
- Allow the app to retrieve the Pocket 3 Wi-Fi credentials and join its Wi-Fi network.
- Wait for the UDP datalink and camera session to become ready.
- Open the camera/control interface.
- Use the on-screen joystick controls for pitch and yaw.
- Switch between
LINEARandPROGRESSIVEresponse profiles as desired. - Use
RECENTERto return the gimbal to its recentered position. - Use the record control only after camera recording-state telemetry is available.
- When enabled and supported by iOS, Picture in Picture can preserve the live preview outside the foreground app.
- A connected supported external display receives the clean Pocket preview while the device keeps the controller UI.
LINEAR uses direct proportional stick mapping with a tested command range of approximately +/-330 around the neutral value.
PROGRESSIVE preserves finer control near center while increasing response more aggressively through the middle of the stick travel and retaining the tested full command ceiling of approximately +/-550.
The neutral joystick value is 1024 on both axes.
The direct 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
Record start: 02/02 01
Record stop: 02/02 00
Record/status telemetry: 02/80
Direct video media: UDP pktType 0x02 H.264
The UDP transport includes sequence, acknowledgement, and transmit-window behavior derived from physical Pocket 3 traffic captures.
The recording control path does not assume success merely because a command was sent. The implementation waits for fresh 02/80 telemetry to confirm the resulting camera state.
Pocket3Direct-iOS contains a direct Pocket 3 H.264 receive and presentation path. It reassembles the Pocket's UDP pktType 0x02 media data, identifies H.264 parameter sets and access units, and presents decoded video through the iOS media pipeline.
The same live-video pipeline supports:
- inline application preview
- automatic Picture in Picture when enabled and eligible
- clean external-display presentation
The external display path is intentionally separated from the phone/controller UI so overlays and controls are not rendered into the clean preview output.
This software can physically move the Pocket 3 gimbal and send camera-control commands.
Keep the camera clear of obstructions while experimenting. Do not send unverified gimbal or camera commands to hardware you are unwilling to risk.
Parts of the BLE, Wi-Fi, DUML, camera-session, and transport implementation incorporate or adapt MIT-licensed work from the Osmosis project.
This iOS implementation was ported from a frozen Android reference baseline that also included MIT-licensed protocol utilities with lineage from the dji-remote project by Dmytro Antonov.
See:
THIRD_PARTY_NOTICES.mdLICENSES/Osmosis-MIT.txtLICENSES/dji-remote-MIT.txt
Third-party attribution does not imply that all Pocket 3-specific behavior in this repository originated in those projects. This repository also contains independently developed Pocket 3 integration, protocol research, transport behavior, gimbal control, telemetry handling, live-video handling, and application code.
Pocket3Direct-iOS is distributed under the MIT License.
See LICENSE.
DJI and Osmo are trademarks of their respective owners. Pocket3Direct-iOS is an independent third-party project.