Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DJI MSDK version 4.15 unable to connect to Mavic 2 Enterprise advanced #1106

Open
fatbringer opened this issue Feb 9, 2022 · 35 comments
Open

Comments

@fatbringer
Copy link

I am trying to connect to my Mavic 2 Enterprise advanced using the sample app generated by the MSDK.
However, the status on the entry screen is:
" No product Connected"
"Product information"
"Firmware version: N/A"

The APP registration has been done successfully. It is able to connect to DJI Spark, and DJI M210 RTK V2.
May I know if there is a problem specific for Mavic 2 Enterprise advance ?

@dji-dev
Copy link
Contributor

dji-dev commented Feb 9, 2022

Agent comment from DJI SDK in Zendesk ticket #60060:

尊敬的开发者,感谢您联系DJI 大疆创新
由于github不是我们主要的咨询渠道,您的问题可能跟进不及时。我们建议您通过填写表单( https://djisdksupport.zendesk.com/hc/zh-cn/requests/new )向我们反馈问题。或者您也可以在论坛发帖,与其它开发者交流。论坛链接:https://djisdksupport.zendesk.com/hc/zh-cn/community/topics

Dear developer, thank you for contacting DJI.
Since github is not our main consultation channel, your questions may not be followed up in time. We recommend that you fill in the form (https://djisdksupport.zendesk.com/hc/en-us/requests/new) to report problems to us. Or you can post in the forum to communicate with other developers. Forum link: https://djisdksupport.zendesk.com/hc/zh-cn/community/topics

°°°

@dji-dev
Copy link
Contributor

dji-dev commented Feb 9, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

Can you tell me the model of remote control you are using? If it has a screen, it cannot be connected to a smartphone through USB and can only be installed internally.

°°°

@fatbringer
Copy link
Author

@dji-dev i am using the default smart controller that came with the mavic 2 enterprise advance.
Yes it has a screen.
By installing internally, do you mean to connect the smart controller to the computer with android studio, then installing the app directly onto the controller ?
Is there a need to enable developer options, and other necessary settings ?

@dji-dev
Copy link
Contributor

dji-dev commented Feb 9, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

By installing internally, do you mean to connect the smart controller to the computer with android studio, then installing the app directly onto the controller ?
==》Yes.
Is there a need to enable developer options, and other necessary settings ?
==>You need to go into the settings and launch the developer option and turn on usb debugging.

°°°

@fatbringer
Copy link
Author

@dji-dev will we be able to choose which app to run ?
Currently upon start up the controller will execute the pre-installed DJI pilot app when you click on "manual flight".
Will the new app conflict with the pre-installed DJI pilot app ?

@dji-dev
Copy link
Contributor

dji-dev commented Feb 9, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

Dear Client

Thank you for contacting DJI.

Will we be able to choose which app to run ?
==》Yes,you can access the application screen by clicking on this button.

When the pop-up window for how to use the USB appears, you just select charging.

Hopefully our solution can help you.

Kindly Regards,

DJI Developer Support
Screenshot_20220209-174352.png

°°°

@fatbringer
Copy link
Author

@dji-dev in event of crash, is there a way to reset the controller software ?

@dji-dev
Copy link
Contributor

dji-dev commented Feb 10, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

Does the remote control crash? You can press and hold of the power button for more than 20s which will trigger a forced shutdown,then you can try to restart it.

°°°

@fatbringer
Copy link
Author

fatbringer commented Feb 10, 2022

@dji-dev ok thank you.

Another question is about ActiveTrackMission. For M300 aircraft. Understand that there is no access in MSDK for the "Smart pin and track". Is there access for DJI OSDK on Manifold 2 for that ?

Also, there is a activeTrack here https://github.com/DJI-Mobile-SDK-Tutorials/Android-Phantom4Missions also by DJI. Can this be used for Mavic 2 Enterprise advance, M210 and M300 ?

@dji-dev
Copy link
Contributor

dji-dev commented Feb 10, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

I asked the relevant colleagues and got the result that OSDK has not an available interface for ActiveTrackMission. You need to develope own ActiveTrackMission yourself.

°°°

@fatbringer
Copy link
Author

@dji-dev I see. Thank you.
Can you advise on how to port the Phantom4 activeTrack over to the mobile SDK for Mavic 2 EA ?

May I also know how to modify the basic view layouts ?

@dji-dev
Copy link
Contributor

dji-dev commented Feb 11, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

Sorry,i can't tell you the detail of ActiveTrackMission in account of information security.You can get the video stream from the drone through the MSDK before developing it further.
Which part of the view are you referring to when you say basic view layout? Is it the MSDK SAMPLE?

°°°

@fatbringer
Copy link
Author

fatbringer commented Feb 11, 2022

@dji-dev yes i am referring to the MSDK sample

for example:

public class MoveGimbalWithSpeedView extends BaseThreeBtnView { 

and

public class PushGimbalDataView extends BasePushDataView {

These seem to be custom view layouts created by DJI. I would like to add additional text box, and text entry fields. But i get error

@dji-dev
Copy link
Contributor

dji-dev commented Feb 11, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

Take MoveGimbalWithSpeedView for example, it inherits from BaseThreeBtnView which is a subclass of LinearLayout, so you can make layout changes in MoveGimbalWithSpeedView through code statements, similar to BaseThreeBtnView.
I hope my answer can help you.

°°°

@fatbringer
Copy link
Author

fatbringer commented Feb 17, 2022

Thank you @dji-dev i will study the code and come back with question.

I have another question about DJI gimbal movement from this article https://developer.dji.com/onboard-sdk/documentation/tutorial/advanced-sensing.html.
It says that: 1 degree/second for 10 pixels. Understand that this is trying to control for gimbal speed.

May I know how did this value/calculation come out ? For mapping 10 pixels to 1 degree, i am interested in the math
Will it be different if for example, the image resolution is 1280x720, or 1920x1080 ?
If we want to map gimbal movement instead, i.e. yaw and pitch, can we use the same 10 pixels to 1 degree ?

@dji-dev
Copy link
Contributor

dji-dev commented Feb 17, 2022

Agent comment from kyle.cai in Zendesk ticket #60060:

Dear developer ,

Thank you for contacting DJI.

The document you are viewing is an algorithm used by OSDK to track the target, marking the target movement by 10 pixels, and then setting the gimbal to rotate. This value can also be adjusted.

Thank you for your understanding and support, hope you have a nice day.

Best Regards,
DJI SDK Support Team

°°°

@fatbringer
Copy link
Author

fatbringer commented Feb 18, 2022

@dji-dev yep I understand that it can be adjusted. Is the 10 pixel to 1 degree ratio a recommended value ? And for different image size ?
Because for example, 1920x1080(example H20T) is much bigger than 1280x720 (example mavic 2). So maybe the gimbal dont turn enough to the correct position.
Can you advise on how to find a good value ?

@dji-dev
Copy link
Contributor

dji-dev commented Feb 18, 2022

Agent comment from kyle.cai in Zendesk ticket #60060:

Dear developer ,

Thank you for contacting DJI.

Target tracking is to select the target (ROI) and calculate the offset of the ROI to rotate the gimbal, The offset of the ROI is not directly related to the resolution(720p or 1080p), you can set 5, 10 or other, just start to rotate the gimbal. The gimbal in the OSDK sample is continuously rotating, which is equivalent to 1 deg/s, not 1 deg. Whether the gimbal position is appropriate can be compared by image algorithm.

Thank you for your understanding and support, hope you have a nice day.

Best Regards,
DJI SDK Support Team

°°°

@fatbringer
Copy link
Author

@dji-dev ok understand. Thank you !

@fatbringer
Copy link
Author

@dji-dev hello. I am unable to deploy my app to the smart controller for mavic 2.
From my android studio,
Screenshot from 2022-02-22 13-23-22

I have already enabled MTP file transfer, and also USB debugging on the smart controller.
I have also made sure to use a data cable for the USB C.
Could you advise ?

@kenargo
Copy link

kenargo commented Feb 22, 2022 via email

@dji-dev
Copy link
Contributor

dji-dev commented Feb 25, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

This may be related to the phone you are using.
In general, the AS will recognise your device if the usb configuration is set to charging and usb debugging is turned on. If your device is not recognised even in charging mode, you might be able to try RNDIS mode.

°°°

@fatbringer
Copy link
Author

@dji-dev i am actually trying to install it to the mavic 2 controller, the one with a built-in screen. I was trying to install it to the controller internally as you had previously mentioned.

What does AS, and RNDIS mean ?

@kenargo from what i understand about installing android apps via android studio, the android device must have 1) USB debugging enabled, and 2) MTP protocol (i.e. if you set it to charge only, you cannot install the app)
I understand what you are suggesting. And I have done what is expected, but android studio is unable to detect the mavic 2 controller smart controller with the inbuilt screen. It is able to detect my mobile phone, however, that is not what I want because I want to use the MSDK on the mavic 2 smart controller.

@dji-dev
Copy link
Contributor

dji-dev commented Feb 25, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

AS means android studio,and RNDIS is one of the usb configuration.
When the RM500 is connected to the computer via the USB cable, many pop-ups will appear on the RM500. The pop-up asking for Allow USB debugging selects OK, the pop-up prompting for USB configuration (it text message is USB TO) just leave the default as charging. When the selection is done, the Android studio will show that the RM500 has been recognised.
You can refer to my process.

°°°

@fatbringer
Copy link
Author

Hi @dji-dev I see this on my smart controller screen.
IMG_20220222_131958

Is this the correct configuration ?

@kenargo
Copy link

kenargo commented Feb 28, 2022 via email

@dji-dev
Copy link
Contributor

dji-dev commented Feb 28, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

Generally, the RM500 will pop up as shown in the picture when connected to a PC via USB.
If the properties in the status bar are the current properties, I think it should be recognised at this point.

image.png

°°°

@fatbringer
Copy link
Author

fatbringer commented Mar 7, 2022

@dji-dev hello i am encoutnering this problem instead
Screenshot from 2022-03-07 12-13-00

I also get this error

com.intellij.diagnostic.PluginException: Created extension classloader is not equal to plugin's one.
See https://github.com/JetBrains/intellij-community/blob/master/platform/core-impl/src/com/intellij/ide/plugins/readme.md
(
  className=com.google.urlassistant.actions.UrlMapperAction,
  extensionInstanceClassloader=PluginClassLoader(plugin=PluginDescriptor(name=App Links Assistant, id=com.google.urlassistant, descriptorPath=plugin.xml, path=/usr/local/android-studio/plugins/url-assistant, version=211.7628.21.2111.8139111, package=null), packagePrefix=null, instanceId=61, state=active),
  pluginClassloader=PluginClassLoader(plugin=PluginDescriptor(name=Firebase App Indexing, id=com.google.appindexing, descriptorPath=plugin.xml, path=/usr/local/android-studio/plugins/google-appindexing, version=211.7628.21.2111.8139111, package=null), packagePrefix=null, instanceId=62, state=active)
)
	at com.intellij.serviceContainer.ComponentManagerImpl.createError(ComponentManagerImpl.kt:820)
	at com.intellij.serviceContainer.ComponentManagerImpl.createError(ComponentManagerImpl.kt:55)
	at com.intellij.openapi.extensions.impl.InterfaceExtensionImplementationClassResolver.resolveImplementationClass(InterfaceExtensionImplementationClassResolver.java:36)
	at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.java:64)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.java:502)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapters(ExtensionPointImpl.java:436)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.getExtensions(ExtensionPointImpl.java:268)
	at com.intellij.openapi.extensions.ExtensionPointName.getExtensions(ExtensionPointName.java:35)
	at com.android.tools.idea.assistant.view.FeaturesPanel.actionPerformed(FeaturesPanel.java:138)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6652)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
	at java.desktop/java.awt.Component.processEvent(Component.java:6417)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2784)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:906)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:836)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:787)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Do you know the cause ?

@dji-dev
Copy link
Contributor

dji-dev commented Mar 7, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

1.There is a category of cable that can only be used to charge devices. Can the cable you use be used for data transfer?
2.Based on the error message you provided, I have searched for a relevant solution, which is shown below.I hope this can be of some help to you.

image.png

°°°

@fatbringer
Copy link
Author

Hi @dji-dev i am using the data cable.
For the image, may I know where can I find the setting ?

Also, I realise i can install the app when i run android studio from windows. However, I face the described problem when using android studio on Ubuntu.

@dji-dev
Copy link
Contributor

dji-dev commented Mar 10, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

We have not tried to recognize the RM500 using Android studio for Ubuntu. have you tried to recognize other mobile devices in Ubuntu? Android studio may recognize the RM500 in the same way as any other smartphone.

°°°

@fatbringer
Copy link
Author

fatbringer commented Mar 11, 2022

@dji-dev yep i have tried using the android studio with normal android phone. It is able to recognise and install. However, it cannot recognise the rm500

@dji-dev
Copy link
Contributor

dji-dev commented Mar 14, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

I'm sorry that I can't give you a suitable solution because I haven't tested the recognition on Android studio of ubuntu. Besides, the Android system of RM500 is a custom system of DJI, so it may not be able to adapt to ubuntu.

°°°

@fatbringer
Copy link
Author

@dji-dev alright noted. May I know if there are specal things to take note ? since it is a custom system

@dji-dev
Copy link
Contributor

dji-dev commented Apr 6, 2022

Agent comment from yating.liao in Zendesk ticket #60060:

I am sorry to have kept you waiting for so long. We have just had a three-day holiday and are only resuming our normal duties today.
In terms of use, there should be nothing special about this remote control, but one thing that will affect development is its inability to connect to a mobile device to control the drone.

°°°

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants