Android Question DJI binding process

aeropic

Active Member
Licensed User
Longtime User
Hi all,
I'm still fighting with my connection problem to the DJI SDK
It systematically falls into an UNBOUND state and I found it fails just when the HOME is found.
Just before it is UNBOUND the state it gets is "NOT REQUIRED" and it remains in "NOT REQUIRED" until the GPS has fixed.
Flying in UNBOUND is possible but the drone is limited in range (~30m)

So I tried to switch off the data just before the GPS is fixed and it seems to work fine.
I wanted to switch into Plane OFF mode but this seems being impossible with most recent ANDROID.

Hence my question, is there a way to block the connection to DJI servers by software or to kill something to forbid it goes on trying to connect when the "NOT REQUIRED" state is reached ?

** Activity (main) Resume **
Registered successfully!
activation state: UNKNOWN
binding state: UNKNOWN
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Registered successfully!
activation state: UNKNOWN
binding state: UNKNOWN
onComponentChange: REMOTE_CONTROLLER
Product connected
onProductChanged: WM160
SDK_BindingStateChanged: UNKNOWN
Aircraft disconnected!
onComponentChange: CAMERA
onComponentChange: GIMBAL
onComponentChange: FLIGHT_CONTROLLER
onComponentChange: BATTERY
onComponentChange: AIR_LINK
Activation state changed: ACTIVATED
SDK_BindingStateChanged: NOT_REQUIRED
AfterAircraftConnected
simulator: false
*** Service (remote) Create ***
** Service (remote) Start **
SDK_BindingStateChanged: NOT_REQUIRED
AfterAircraftConnected
simulator: false
** Service (remote) Start **
MAVIC_MINI
MAVIC_MINI
home set
SDK_BindingStateChanged: NOT_REQUIRED <<<<<<<<<<<<<<<<<<<< HERE GPS is not fixed
AfterAircraftConnected <<<<<<<<<<<<<<<<<<<<<<<<<<<< I would want to stop here ;-)
simulator: false
** Service (remote) Start **
SDK_BindingStateChanged: UNBOUND <<<<<<<<<<<<<<<<<<<<<<<<<<< HERE HOME POINT is set
Aircraft disconnected!
MAVIC_MINI
** Activity (main) Pause, UserClosed = false **
** Service (remote) Destroy **
 
Solution
I want to give a short feedback of my tests:

Everything works perfect. As Erel said, the binding-problem belongs to the past. Much thanks for the new DJI-lib combined with the new b4a-version.👍

freedom2000

Well-Known Member
Licensed User
Longtime User
you are in the same configuration as I was yesterday : LOGIN_REQUIRED

If you try to login you will probably receive a token to unlock "something in China" but you will stay "UNBOUND"
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
If you try to login you will probably receive a token to unlock "something in China" but you will stay "UNBOUND"

That have i tried with my app and the Version 4.15 a lot of times before. I logged in with my account and with this of our company with deactivated all no-fly zones. It doesn't make a difference...
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
2. Any tips on reproducing this issue? This is the main problem for me. If I will be able to reproduce it then it will be easier to fix.

My drone is most times UNBOUND with the unchanged code of your last drone example. I only changed the package name and the app-key. I tested it with the old Mavic Pro and the Mavic 2 Zoom Enterprise.

I see two things, which could help to reproduce it:

1. Use it with the simulator and my location of the screenshot in post #40. Perhaps, our locations will causes the error.

2. I send you my dji-app key and my package name and you could start the drone example with this data. Perhaps the account is a problem.

Either way, thank you for your many efforts..
 
Upvote 0

freedom2000

Well-Known Member
Licensed User
Longtime User
1) @aeropic has a litchi licence (I don't). I saw on his Samsung that V4.14 had the issue and litchi not. May be he could make a try to confirm for V4.15 ?

2) the issue seems to be linked to the developper's account (not the drone) as the problem occurs on all of my drones (2 sparks and one mini)
As you can see into my log, the connection jumps several times to "NOT_REQUIRED" (which is the expected result for Europe) but the latest one gives "UNBOUND"

I did try an almost (not) working woraround :
  1. place a sheet of aluminium on top of the drone to prevent GPS fix
  2. launch the app
  3. cut the 4g data link on the phone
  4. remove the sheet of metal

if you are lucky, you can do it at the exact right moment to skip the latest DJI connection and prevent the "UNBOUND". But it is really a matter of chance and doesn't work most of the time...
In any case if you reopen the data link then the drone switchs to UNBOUND (if not already in the air)

Once you are in "UNBOUND" you MUST open the DJIFly original App to "clear a flag" to recover the NOT_REQUIRED configuration. A message in the DJI App says "device re initializes its parameters to comply with local regulations. Please wait and reconnect" or something like this.
reset.jpg

Then (and only then) the V4.14 App may recover the NOT_REQUIRED config provided you are lucky enough with my not working trick above...
If you relaunch the DJI Fly App this message does not pop up. This means that :
- V4.14 somehow spoils a parameter into the remote controller
- this parameter can be reset by the official DJIFly app (or Litchi if @aeropic can confirm)
- if not reset this parameter remains into its latest state (if you are UNBOUND you stay UNBOUND unless an "official app" removes this limitation)

All this is not tested on my app with V4.15 as it doesn't work with the latest lib... Only Erel's example works for the moment. (logs above are from this Erel's example V4.15)
 
Last edited:
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
@freedom2000: If you got the NOT_REQUIRED configuration, did you test the drone limits? In the new Version 4.15, i got sometimes NOT_REQUIRED on the Mavic 2, but the drone was nevertheless limited to 30m alt..
 
Upvote 0

freedom2000

Well-Known Member
Licensed User
Longtime User
What is strange is that this problem occurred 1 month (roughly) after creating my DJI dev account. During one month V4.14 worked really fantastically well. I didn't change anything (same key, same package name) and one day : game over !
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
I made some more test:

First i made a new account under https://developer.dji.com/ and creates an new app-key with another packagename:

With the new key, it was possible to start the unchanged drone-example normaly on the Mavic 2 Zoom with smartcontroller. After that, I checked my own app. This app runs also first time under NOT_REQUIERED, but after changing the batterie, the system tells me: LOGIN_REQUIRED. After login, I got state NOT_REQUIRED again, but with an limited drone (30m). Later my own app shows always UNKNOWN.

Then I started the drone example on the smartphone and with the old Mavic Pro. It was not possible, to get another state than UNBOUND. I tried different scenarios with and without internet and starting the drone before controller and vice versa. All without success.

Today, I started the unchanged drone example with the Mavic Air 2. I didn't had installed an dji-app on the smartphone. First batterie, everything was good. State was NOT_REQUIERED, even if i switched off and on the controller and the drone. The app was able to bind with the drone.
After using the second batterie, i could see the camera-feed, but the drone was disconnected, until switching the app into back and foreground again. Than the drone was connected, but the state always UNKNOWN.

I tried to clear the cache and app data, but i was not able to bind the system other than UNKNOWN.
 
Upvote 0

Simon Thorogood

New Member
Licensed User
Longtime User
Hi, I have been hoping for a response to Erels' question on the DJI Forum, but no one has answered. I have the same issue in Australia DJI Mini. Could it be anything to do with LDMManager / DJIFlysafe?
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
Is there a timeline for a release of the next version?
It is indeed desperate. One day, it works flawlessly, but the next day, it is not possible to get the drone out of the safemode. no matter, what you do. I was hoping, that there is a work around with switching on and off the drone, the controller and the internet in different constellations, but i can't find any system behind it. For now, we are not able to train with it.
Perhaps, there is somebody who find out a workaround...
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
Dear Developer,

We are excited to announce the official release of the DJI Android Mobile SDK 4.15.1. You can find it on our developer site at DJI MSDK Download.

This version of Mobile SDK has fixed various bugs. We strongly recommend you update the Android MSDK to the latest 4.15.1 version.

Please refer to the release notes for the full list of changes.

If you would like to contribute or ask any questions in the DJI Developer Support please check here: Developer Support.

If you don't want to subscribe news about our SDK anymore, you can go to our developer website to unsubscribe it. You can go to the link below to unsubscribe.
link: https://developer.dji.com/user/account

Best,
The DJI MSDK Product Team

I hope, we could find a solution...🤨
 
Upvote 0
Top