Mobile-SDK-Android icon indicating copy to clipboard operation
Mobile-SDK-Android copied to clipboard

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

Open ykn96 opened this issue 3 years ago • 35 comments

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 ?

ykn96 avatar Feb 09 '22 06:02 ykn96

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 avatar Feb 09 '22 06:02 dji-dev

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.

°°°

dji-dev avatar Feb 09 '22 07:02 dji-dev

@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 ?

ykn96 avatar Feb 09 '22 07:02 ykn96

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.

°°°

dji-dev avatar Feb 09 '22 08:02 dji-dev

@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 ?

ykn96 avatar Feb 09 '22 08:02 ykn96

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

°°°

dji-dev avatar Feb 09 '22 09:02 dji-dev

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

ykn96 avatar Feb 09 '22 12:02 ykn96

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.

°°°

dji-dev avatar Feb 10 '22 03:02 dji-dev

@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 ?

ykn96 avatar Feb 10 '22 07:02 ykn96

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.

°°°

dji-dev avatar Feb 10 '22 09:02 dji-dev

@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 ?

ykn96 avatar Feb 10 '22 12:02 ykn96

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?

°°°

dji-dev avatar Feb 11 '22 02:02 dji-dev

@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

ykn96 avatar Feb 11 '22 03:02 ykn96

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.

°°°

dji-dev avatar Feb 11 '22 10:02 dji-dev

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 ?

ykn96 avatar Feb 17 '22 08:02 ykn96

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

°°°

dji-dev avatar Feb 17 '22 11:02 dji-dev

@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 ?

ykn96 avatar Feb 18 '22 01:02 ykn96

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

°°°

dji-dev avatar Feb 18 '22 06:02 dji-dev

@dji-dev ok understand. Thank you !

ykn96 avatar Feb 18 '22 07:02 ykn96

@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 ?

ykn96 avatar Feb 22 '22 05:02 ykn96

You might be using the incorrect USB configuration, it sounds like you are changing the setting under debug, that’s not the correct setting. From the app screen, drag down from the top to expose the settings menu, on the far right you will see “USB”, open that and select the top item (Charge). Once selected, and when connected to the PC you will see Android Studio connect. No special cable needed.

From: ykn96 @.> Sent: Monday, February 21, 2022 9:25 PM To: dji-sdk/Mobile-SDK-Android @.> Cc: Subscribed @.***> Subject: Re: [dji-sdk/Mobile-SDK-Android] DJI MSDK version 4.15 unable to connect to Mavic 2 Enterprise advanced (Issue #1106)

@dji-dev https://github.com/dji-dev hello. I am unable to deploy my app to the smart controller for mavic 2. From my android studio, https://user-images.githubusercontent.com/93758179/155068281-5e55a7c5-3974-4d4a-a21b-fd40c24b30c4.png

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 ?

— Reply to this email directly, view it on GitHub https://github.com/dji-sdk/Mobile-SDK-Android/issues/1106#issuecomment-1047437204 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHP4OB656LENJVQS3Q2WT3U4MMY5ANCNFSM5N4RPRHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/ADHP4OHWDU4LCPULN2PQJC3U4MMY5A5CNFSM5N4RPRHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHZXJ7FA.gif Message ID: @.*** @.***> >

kenargo avatar Feb 22 '22 17:02 kenargo

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.

°°°

dji-dev avatar Feb 25 '22 03:02 dji-dev

@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.

ykn96 avatar Feb 25 '22 05:02 ykn96

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.

°°°

dji-dev avatar Feb 25 '22 06:02 dji-dev

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

Is this the correct configuration ?

ykn96 avatar Feb 28 '22 07:02 ykn96

No. That looks like the developer settings.

Drag down from the top,  of the home screen,  up will see a little USB icon,  you touch that and choose the top option.

⁣Get BlueMail for Android ​

On Feb 27, 2022, 11:17 PM, at 11:17 PM, ykn96 @.***> wrote:

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

Is this the correct configuration ?

-- Reply to this email directly or view it on GitHub: https://github.com/dji-sdk/Mobile-SDK-Android/issues/1106#issuecomment-1053958258 You are receiving this because you were mentioned.

Message ID: @.***>

kenargo avatar Feb 28 '22 07:02 kenargo

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

°°°

dji-dev avatar Feb 28 '22 09:02 dji-dev

@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 ?

ykn96 avatar Mar 07 '22 04:03 ykn96

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

°°°

dji-dev avatar Mar 07 '22 07:03 dji-dev

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.

ykn96 avatar Mar 10 '22 09:03 ykn96