dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
994 stars 581 forks source link

Is WiFi required for the SDK to operate correctly? #1193

Open bbenson09 opened 2 years ago

bbenson09 commented 2 years ago

My app crashed yesterday mid-flight with nondescript error messages (suggesting it might not have originated in my code), and I'm trying to understand what happened. I was operating in very low bandwidth conditions.

All I have is:

--------- beginning of crash
10-24 17:32:30.312 19984 19984 E AndroidRuntime: FATAL EXCEPTION: main
10-24 17:32:30.312 19984 19984 E AndroidRuntime: Process: com.mypackage.name, PID: 19984

However, I noticed that the following lines came directly before the crash in my logs:

10-24 17:32:30.102 19984 20132 E DJIUSBWifiSwitchManager: ****resetSwitchFromWifiFlag
10-24 17:32:30.102 19984 20132 E DJIUsbAccessoryReceiver: receiver destroySession
10-24 17:32:30.140 19984 20072 E DJIPackManager: DataCameraEvent setConnectTypeDirectLy typeRC
10-24 17:32:30.141 19984 20072 E linkDeamon: stopDaemon USB_WIFI
10-24 17:32:30.145 19984 20127 E DJIPackManager: pack senderType=1 cmdSet=2
10-24 17:32:30.165 19984 20127 E DJIPackManager: post DataCameraEvent.ConnectOK RC
10-24 17:32:30.241 19984 20072 E DJIUSBWifiSwitchManager: ****resetSwitchFromWifiFlag
10-24 17:32:30.241 19984 20072 E DJIUsbAccessoryReceiver: receiver destroySession
10-24 17:32:30.242 19984 20072 E DJIUsbAccessoryReceiver: Receiver not registered: dji.midware.usb.P3.DJIUsbAccessoryReceiver@db7ab58
10-24 17:32:30.275 19984 20072 E DJIUSBWifiSwitchManager: ****resetSwitchFromWifiFlag

I was operating in poor WiFi conditions yesterday, and I'm wondering if it's a coincidence that the DJIUSBWifiSwitchManager was doing some operation just before the crash.

What is the likelihood that the DJIUSBWiFiSwitchManager would have caused a crash if it wasn't able to connect to WiFi?

Thanks.

SDK Version: 4.16

DJI-William commented 2 years ago

The WIFI is not required, Normally, the SDK requires network to register, once it registers you can fly without network.