data from msdk to osdk is lost very very often - dji-sdk

I'm using osdk3.6 and msdk4.6(android).
I'm sending data from android to osdk,
but data is lost very very often and it is almost unusable.
I edited osdk3.6 mobile sample.
parseFromMobileCallback() is hardly called(but not zero).
Does anyone have any suggestions(changing sdk version or something)?

how much is the size of data you sent?Actually,the upstream (mobile device to onboard computer) bandwidth is approximately 1KB/s while the downstream (onboard computer to mobile device) bandwidth is approximately 8KB/s

Related

Extremely slow socket data throughput on Android 11?

I've seen some posts elsewhere about very slow file access after "upgrading" a device to Android 11. I'm not having that, but I AM having unbelievably slow performance in a small app that uses sockets. It's a client app that uses a socket to send a request to a server (mine) that monitors my solar installation, to get data back about how it has been performing etc. So the socket interaction is in a separate thread from the UI, and uses runOnUIThread to call a function that updates the UI with the received data. The request data is only a few bytes, maybe 20 or so maximum: the data coming back varies from a few hundred bytes to maybe 50000 bytes or thereabouts.
If I run this app on my phone (Android 8.1) it is fine - it takes 1.5 to 2 seconds to send the request, get the data back, and update the UI. Perfectly fine. It's the same on an older tablet running Android 7.1.2 too. But I have just recently acquired a flash (read expensive) new Samsung tablet running Android 11, and its performance is woeful - the same app doing the same operation takes anything up to 30 seconds, or even more. And it is exactly the same app, exactly the same code. Both devices are running on the same network, so the only significant difference seems to be the Android version. It is repeatable ad nauseum, so it isn't momentary network load either. The app is built to target API level 26 - it has to be so it can run on all the devices it needs to. It is not a commercial app, just something for my own use, but I am totally bewildered by this behaviour.
The other thing I have noted with this new tablet is that it is unable to provide a video stream from a surveillance IP camera I have at home. I use the TinyCam Pro app from Google Play for this. It can connect, but it has never yet managed to give me a picture, regardless of how good my connection is. Again, my phone and the older tablet can do this more often than not, and the new tablet would have far more horsepower than either of them. There is some sort of serious bottleneck in there!
Has anyone else seen this type of thing on Android 11? If so, is there anything that can be done about it, that is usable on earlier versions too? Or do we just have to wait for Android 11.1?
EDIT: I've done some more investigation on this, and I think I have now pinned it down to a 4G network bandwidth issue. I said that the tablet and the phone were doing exactly the same thing, but I have since remembered that they do NOT use the same carrier for their mobile connections. So it's not EXACTLY the same thing. I would actually expect the network capacity for the tablet's carrier to be superior to that of the phone's carrier, but that appears not to be the case where I am at the moment. So I think I have to take back my evil thoughts about the tablet, and maybe even Android 11. Interesting how easy it is to be misled, and how hard it can be to genuinely compare apples with apples when there are so many variables and so many links in the chain. I'll be doing some more tests and comparisons when back in the city, where network capacity should be much more alike for the two carriers.
yes its true. While compare to Android 11 and Android 8 there is a lot of changes updated because of security issue.
May be, If your managing some file in mobile storage mnt/sdcard/ here in this path its speed of access or managing a file in this path its restricted and its becomes less. So, if your using this path please change it like below because it will cause youe app to process slow.
solution - Try to use this file access path is Android/data/data/packageName/
I mean if your using this logic to access file - Environment.getExternalStorageDirectory()
instead of above try this - Context.getExternalFilesDir(null)
refer this link https://developer.android.com/about/versions/11/privacy/storage
I hopes it will help you...

Access HTTP server running on the Onboard computer

I was wondering if it is possible to access an HTTP server running on the onboard computer from a device (mobile or laptop) connected to the remote control on the ground. From the documentation, the uplink/downlink speeds of 24kbps / 16Mbps are satisfactory for our application.
Going over the available SDKs, the "SDK Interconnection" or "MOP" caught my attention that offers send and receive functions for Onboard and Mobile SDK (Payload as well). However, this means that the send/receive from the ground are exposed on an android based SDK, i.e.
UART Lightbridge USB
Onboard PC ---> OSDK ----> DJI drone ------------> R.C. ----> Android ---> MSDK
From this alone, it seems that we would need to develop network interfaces that are sending and receiving via the corresponding OSDK and MSDK methods. This might be easier said than done - especially for the android device.
My questions are:
Is there a smarter way to do this?
Is the implementation of Mobile SDK available? If so we can port the send/receive code to a Linux box to simplify the code
The MSDK is heavily encrypted.
I've been doing some reverse engineering on it. It's not easy, recommend older versons since they not encrypted.
There's no opensource if that what you asked. Will never be.
Everything sent from the drone is dumldore messages. You can decode them without the MSDK, but it's not completly straightforward.
The messages are partly documented here:
https://github.com/o-gs/dji-firmware-tools/blob/master/comm_dissector/wireshark/dji-dumlv1-proto.lua
If I were you I would connect a 4g modem to the onboard computer. Saves you a lot of time.

What technical specifications are relevant to creating an at-home UnitTest lab?

I need to run tests against physical mobile devices, and need to deploy unit tests to many concurrent devices at the same time.
Conceptually, this is similar to the Xamarin Mobile Test Cloud, or Microsoft Mobile cloud... but I need an on-premise equivalent so that I can test Bluetooth and GPS features
I'm looking to test 7 to 14 physical devices all connected to the same USB hub.
Question
How many devices can a single Mac / Windows machine talk to over a single USB port?
What are the power considerations I need to keep in mind while selecting hardware?
Here is a visual example of what I imagine, however this device is focused on charging, not connecting a USB backplane to a computer.
Per USB controller you can have a 127 devices (128 minus the controller), bu I am not saying you can simultaneously have 127 devices communicating to the host and maintain any type of data throughput, that is a different story....
The core USB issue with a lot of devices is the power draw. We use special Y cables that have a data only side and a power only side even when using the so-called "powered" USB hubs.
The really good cables that do this are typically found via companies that cater to audiophiles and as such are typically very expensive and work great but are overkill for this usage. But also avoid the cheap Y-cables where the data-only side is "ungrounded" as you will have data transfer failures. Low quality cables will kill data through-put and have you running in circles chasing test failures.
Consumer external USB hubs are not created equal and wildly vary in their power output and simultaneous throughput across each port. While most will do well with one/two devices talking simultaneously, many start failing when 4-8 devices are all talking. Also trying to cascade them for increasing the number of ports can cause failures across the entire chain. Make sure you have a good return policy where ever you can buying it from.
You did not stated the testing framework, but some Appium info:
For Appium-based Android testing I have use a combination of:
Android<-USB->Host(adb)
8 devices is about the threshold for reliable simultaneously (bi-directional) testing
Android<-Wifi->AP<-Host(adb)
A DHCP server handles assigning an IP to the Android device via MAC address so we can create a static mapping of ports to IPs for remapping via adb
8 simultaneous Appium servers (thus devices) running per Window server/host is about what to expect
This works for about 32/64 devices per dedicated AP.
Remember the AP has to be ~4/5 feet away from the devices for proper signal attenuation
Mobile cloud datacenters use EMI / faraday cages to isolate each mobile device rack where multiple servers, an AP and the devices are installed within each rack
Android<-USB2Ethernet<-Host(adb)
Not all devices support OTG, so this is not always an option, but works great.
A DHCP server is required just like the Android<-Wifi->AP setup
iOS is a totally different can of worms:
4 iOS devices connected to a Mac is about all you can achieve with reliable results.
Remember a separate Xcode Instruments is spun up per Appium server on the host.
Mac Minis work great for dedicated Appium test servers.
In terms of GPS testing, mocking is the easiest way to go. There are hardware devices designed for GPS testing that are use by the top tier app developers (mapping, traffic, avionics, etc..) but for an ad-hoc in-house device lab these are usually way to expensive to purchase and setup (EMI / faraday cages are needed enclosing the device and the GPS injector antenna).
Bluetooth can be a big problem in a device lab due to interference, pairing issues, etc..., having a number of devices in close proximity competing for a single (or more) bluetooth accessory can make the accessories fail to pair with any device. Basically bluetooth testing simultaneously does not work well, but you can use Appium to automate the turning the wifi/bluetooth/airplane mode on/off, but for Android devices this requires that they are all USB connected and not using adb to remap host ports to IP addresses over wifi...

Force USB High Speed EHCI 2.0 hub to enumerate as Full Speed UHCI/OHCI device

In Windows XP SP3 is there a registry key or some setting, maybe even at the device level in the registry, that an EHCI USB 2.0 High Speed hub can be enumerated as a UHCI or OHCI full speed device at the host level?
I am seeing an issue where a USB 1.1 full speed device is deadlocked due to infinitely NAKd split transactions with the transaction translator buffer on a high speed hub. This only happens under certain circumstances the full speed device is connected behind a 2.0 high speed hub only in XP SP3. I have opened an issue with Microsoft and they have confirmed this is a known issue and there is no Hotfix for the issue (nor will one be developed). It has been corrected in Vista+.
If the device is connected directly to the host controller, or has a full speed hub upstream of the high speed hub the problem goes away (because there are no split transactions). So, if there is a way to force the high speed hub to enumerate as a full speed device then it may help us out.
Furthermore, the hardware design is set in stone. Systems have been developed and there is no way to insert a full speed hub chip anywhere in the design, or hook up the devices directly to the root hub. And finally, it is not an option to upgrade the OS on the systems.
After some work and research with help of Microsoft the current conclusion is that there is not a way to do this.
The workaround that we will be using is to perform a PnP reset on the bus to stop the infinite NAKs, then reopen the port to begin communication again. This is not very clean, but it will solve the problem.

Increase speed on RN-41 bluetooth SPP?

I'm using RN-41-APLX bluetooth evaluation board (based on RN-41-APL, very similar to RN-41 but also supports Apple devices) as a member of MFi.
I was able to establish connection and transfer some data to and from dev board with out-of-the-box configuration.
The problem is, in data sheet for RN-41 it is set, that SPP profile supports 240kbps speed, but when I transfer 10kB from iPod touch with Roving test iOS application installed, it takes 5 seconds to transfer.
Since UART speed is 230kbps, I think the bottle neck is the bluetooth link speed, but I can not find any way to change it. Can anybody help with that?
Thanks in advance!
I've run into this problem myself about this chip (well, the RN42 technically) and posted my findings here:
RN42 Bluetooth disconnects on iOS within seconds of streaming data
Short summary:
When the RN42 is used to communicate with an iOS device, it cannot
communicate faster than 2.5-3kB/s... If it's used to communicate with
an Android or computer or anything else, it can transfer at 35kB/s
(over SPP).
Hope it helps!
-SJ

Resources