Please select Into the mobile phone version | Continue to access the computer ver.
DJI Mavic Air 2 Camera can't set mode (photo, video, download)?
2840 6 2021-3-17
Uploading and Loding Picture ...(0/1)
o(^-^)o
MeteC
lvl.2

Spain
Offline

I'm trying to see why our DJI-enabled app isn't working correctly with the Mavic Air 2 on iOS or Android. Here I'm debugging with iOS but  I've seen the same failures when briefly testing on our Android app.

When calling setMode:completion: on the single camera belonging to the Mavic Air 2, I consistently get "Current product does not support this feature.(code:-1013)"

isMediaDownloadModeSupported returns true for the camera, and yet I can't set the camera mode to media download mode at all (or any other mode).

I've found that setFlatMode:completion: seems to work ok  to set photo and video modes as a sort of alternative, however this is  only for photo/video modes, and won't help me with downloading media from the SD card. (right?)

Any help out there?

2021-3-17
Use props
Mats Bohlinsson
lvl.4
Flight distance : 1838077 ft
  • >>>
Sweden
Offline

make sure you not using an old sdk version.
2021-3-17
Use props
MeteC
lvl.2

Spain
Offline

Mats Bohlinsson Posted at 3-17 14:41
make sure you not using an old sdk version.

Thanks, but I'm using 4.14 final on iOS (and 4.14.1 on Android)
2021-3-19
Use props
MeteC
lvl.2

Spain
Offline

From my DJI Developer Support ticket for the same issue:

For the Mavic Air 2 drone, should use the setFlatMode to switch the photo, video mode, and use the enterPlayback, exitPlayback to enter/ exit the download mode.


2021-3-24
Use props
djiuser_LqiBEGU2pd8u
lvl.1

Netherlands
Offline

Hello, I would like to know if I can after enterPlayback mode, use fetchData() my following code is:

func camera(_ camera: DJICamera, didGenerateNewMediaFile newMedia: DJIMediaFile) {
      camera.enterPlayback()
        newMedia.fetchData(withOffset: 0, update: DispatchQueue.main, update: { [self](_ data: Data?, _ isComplete: Bool, _ error: Error?) -> Void in

                                if error != nil {
                                    testlabel.text = "\(error!.localizedDescription)"
                                    print("State:")
                                    print("Error downloading photo: \(error!)")
                                }
                                else {
                                    // unwrap downloaded data and create image
                                    guard let data = data else {return}
                                    let downloadedImage = UIImage(data: data)
                                    pictureview.image = downloadedImage
                                    
                                }

            guard isComplete else {return}
            camera.exitPlayback()
})

This is not working it says camera is busy or the command is not supported in the camera's current state.
2023-4-6
Use props
djiuser_LqiBEGU2pd8u
lvl.1

Netherlands
Offline

MeteC Posted at 2021-3-24 05:46
From my DJI Developer Support ticket for the same issue:

For the Mavic Air 2 drone, should use the setFlatMode to switch the photo, video mode, and use the enterPlayback, exitPlayback to enter/ exit the download mode.


Hello, I would like to know if I can after enterPlayback mode, use fetchData() my following code is:

func camera(_ camera: DJICamera, didGenerateNewMediaFile newMedia: DJIMediaFile) {
      camera.enterPlayback()
        newMedia.fetchData(withOffset: 0, update: DispatchQueue.main, update: { [self](_ data: Data?, _ isComplete: Bool, _ error: Error?) -> Void in

                                if error != nil {
                                    testlabel.text = "\(error!.localizedDescription)"
                                    print("State:")
                                    print("Error downloading photo: \(error!)")
                                }
                                else {
                                    // unwrap downloaded data and create image
                                    guard let data = data else {return}
                                    let downloadedImage = UIImage(data: data)
                                    pictureview.image = downloadedImage
                                    
                                }

            guard isComplete else {return}
            camera.exitPlayback()
})

This is not working it says camera is busy or the command is not supported in the camera's current state.
2023-4-6
Use props
Denise Rey
New

Switzerland
Offline

Hilfeeee

Das Problem the camera ist busy or the command is not supportet, habe mein handy gewechselt und kann die kamera nicht mal laufen lassen .... was tun???
Screenshot_20231128_203100_DJI Drone.jpg
2023-11-28
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules