Android Question DJI Binding Process - Camera / battery not ready

prajinpraveen

Active Member
Licensed User
Longtime User
Hello All,

I tried to connect DJI Mavic mini 2. I get the following error. Does anyone know a solution for this? Many thanks.

AfterAircraftConnected
Camera / battery not ready

(CameraReady false and BatteryReady false)
 

Attachments

  • error.txt
    231.9 KB · Views: 36

prajinpraveen

Active Member
Licensed User
Longtime User
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Product connected
AfterAircraftConnected
main$ResumableSub_AfterAircraftConnectedresume (java line: 584)
java.lang.NullPointerException: Attempt to invoke virtual method 'void dji.sdk.battery.Battery.setStateCallback(dji.common.battery.BatteryState$Callback)' on a null object reference
at anywheresoftware.b4a.objects.DJIAircraftWrapper.RegisterBatteryStateEvent(DJIAircraftWrapper.java:51)
at za.co.irays.dronetest.main$ResumableSub_AfterAircraftConnected.resume(main.java:584)
at za.co.irays.dronetest.main._afteraircraftconnected(main.java:555)
at za.co.irays.dronetest.main._sdk_productconnected(main.java:1288)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8633)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
(NullPointerException) java.lang.NullPointerException: Attempt to invoke virtual method 'void dji.sdk.battery.Battery.setStateCallback(dji.common.battery.BatteryState$Callback)' on a null object reference
** Activity (main) Pause, UserClosed = false **
 
Upvote 0

prajinpraveen

Active Member
Licensed User
Longtime User
am i doing this right?

Installed DJI Fly app, can connect to the drone and fly the drone
Registered my App with the same package name on DJI Developer page, changed the app key in the manifest editor
Installed the Drone app on my phone
Switch the Drone on
Switch the controller on
Connect the USB cable from the controller to the Phone
The phone prompts for which app to use ( DJI Fly or Drone - B4A ) - Chose Drone App
Use B4A bridge to check what is happening on the Drone App


1641974979625.png
 
Upvote 0
Top