No video feed from M600 Pro with mobile SDK - dji-sdk

I'm having trouble getting the video feed working from the M600 Pro. It works fine in the DJI Go App so I know the feed is there, just not in my IOS app. When we initially setup the app up for the M210, we needed to set bandwidth allocation to make it work, wondering if there is something like that needed for the M600 Pro? Has anyone got that working?
Below is my code:
if (product?.model == DJIAircraftModelNameMatrice600Pro) {
DJISDKManager.videoFeeder()?.secondaryVideoFeed.add(self, with: nil)
}
VideoPreviewer.instance().start()

Yes bandwidth could be an issue but also, other aspects of your setup could influence this blockage. Without knowing your entire set-up this is a difficult question to answer since the M600 has a variety of variables. The best thing to do is send a ticket to dev#dji.com with this issue but include - what cameras you are using, outline how you've made the connections, your setup for bandwidth, the reason you are using secondaryVideoFeed vs. Primary and any other details you can think of.

Related

Bluetooth Service Solicitation in Windows UWP

I am trying to connect to my iPhone and access services such as the battery level and ANCS from windows. I have tried out the Advertisement watcher and query but I feel as though they are really inconsistent. I am just using the code they provided in their updated documentation. I feel as though my results are extremely buggy. Devices show up multiple times and then become unreachable. It's almost as if past devices are never cleared from the cache (this may need to be something I do manually?) upon restarting my UWP in debug x86. I have briefly had success with the advertisement watcher and was even able to initiate pairing. Although when I read the battery level it was still not a number after using the data reader. I noticed that there were some service solicitation properties on the documentation but I could not figure out how to use them. Would these help and if so how could I use them? This might be useful when I try to connect to the ANCS of my iPhone.
Edit 1: After trying out the sample provided by Microsoft, I am still having a similar issue. I am able to see devices and even pair with them but when I click the connect button, it returns that there is a connection failure. In order to advertise to the BLE I am using the LightBlue app on my iPhone to advertise a virtual peripheral with the battery service added. My end goal is to connect to the iPhone directly and access some of its native BLE services and characteristics. I have heard that this can be done with something called service solicitation but have failed to successfully find any real examples of this being put into practice in a UWP (maybe it's not used anymore). I am still pretty new to BLE so I am trying to work out some of my fundamental misunderstandings of how it works so if there is something I am missing please let me know below!
BLE Failing to connect after pairing.
Edit 2: Ok after cleaning and re-building to fix some of my silly mistakes, I can now say that the example project is running as intended from what I can tell. The solution is actually pretty nice and I can see it is much more elegant than my implementation. However, I see that I am running into the same issue as before where the services of my virtual peripheral become undiscoverable after pairing and now result in a "Device Unreachable" exception in scenario 2. It seems as though Windows does not support "Resolvable Random Private Addresses." To elaborate, it does not provide my phone with an Identity Resolving Key (IRK) upon pairing with my iPhone 11 in order to keep track of its address. In order to access certain key characteristics, I need authorization.
Is there any way I can exchange an IRK upon pairing using the custom pairing capability or is there another method to provide authorization in order to access these characteristics on my iPhone? As it is, ANY and ALL GATT services present on the iPhone (virtual peripheral or native OS) become unreachable as soon as I successfully pair with the device. I am hoping it is possible to implement a solution in Windows as if not then communicating meaningful data between modern devices seems impossible with outdated privacy protocols.
I did a little bit of research and it is either the problem above or something to do with my Bluetooth device.
If I were to try to access characteristic without pairing
Edit 3: I have been able to get it to work briefly and it was wonderful. I used the system settings to pair and magically got the prompt on my phone to share notifications. From there, I had authorization/authentication and everything else I wanted to do was a breeze. Unfortunately, this does not seem to be reproducible as I have to randomly pair and unpair while starting and stopping the sample solution to get this prompt. I don't entirely remember what was happening when it popped up, but it does not seem easy to recreate. I thought that pairing would be my solution, but I am now stuck. When I pair with the device, I cannot access any services, but when I am unpaired, I can see all of the services and characteristics I need. However, when trying to subscribe to those characteristics I get "System.Exception: 'The attribute requires authentication before it can be read or written. (Exception from HRESULT: 0x80650005)'." Is there any way for me to request access to the notifications on my iPhone using something in the documentation? I need a reproducible way to request system notification access on my iPhone.

Recommendations on Mac OSX (preferably Swift) video chat APIs?

I'm tasked with developing a fullscreen native Mac OSX (Swift preferably, as I've been experimenting with it a lot lately) application that will connect two kiosks in two different parts of the US (each with high speed hardwired internet connections) in a video chat session. The kiosks must be able to automatically/programmatically connect and reconnect in case of lost connection. I was looking into TokBox but it seems their SDK/API is WebRTC, iOs, or Android oriented, otherwise it would have been a great choice at first glance. As I understand it, WebRTC is really just meant for browsers.
Does anyone have recommendations on an SDK/API that can help me accomplish this?
You can use WebRTC and make a web app out of the website. It will look and feel like a regular appp. Take a look at Mike Kelly's Refract for a painless web app packager.

DJI Phantom API or hackable procedure

Maybe I have't looked hard enough, but I spent yesterday googling for a bit and found no relevant projects on hacking the DJI Phantom Drone in order to create new coordinating apps. This is besides the app for coordination DJI currently uses for their drone. I'm trying to see if there's a way to communicate with the Drone with a specific protocol in order to accept a set of procedures.
Any help would be awesome,
Thanks.
Great News for you and all us Droneys! DJI has launched their SDK since you asked this question. They released it last November and you can now apply for a license and write your own apps for the Phantom2 Vision+ using their SDK.
Check it out at https://developer.dji.com/
I am already building a project using the SDK - you can follow my progress on my blog / product site. I will also try to update it with good DJI related development links and tips.
This post is old but I think it is good to leave a foot print for others :)
There is this new company called NVdrones, which created a peace of hardware that you can attach to any drone (you need physical access to the flight controller), and once you do that you can use their SDK (Arduino, Java, Android and Javascript) to write your app without the need of hacking, soldering or anything else. It is just plug and play.
Another benefit is that you are not locked with a specific drone (DJI SDK or 3DRobotics SDK), you can use the board on anything you want. Which gives lots of flexibility.
The developer site is http://developers.NVdrones.com
Hope this helps.
This is a great topic!
You could check how to hack your copter here: https://github.com/flyver/Flyver-SDK/wiki/-2.2--How-To:-Flyver-Hack-a-Copter
By opening the drone, taking out the original controller, soldering a few wires and sticking an Android phone to it, you will have the ability to program your Phantom in a modern manner with an open source SDK and application based development. This means that you could add computer vision to it, automation or additional hardware. You could also use smartphones, web and other interactive devices for remote controlling the copter instead of using the standard remote controls.
The Phantom, however, is offcenter balanced due to the fact that most people use gimbal with it. Without the gimbal is a lot less stable from my experiments so you will have to put some extra work in center balancing it.

Can I use "presentor mode" on my Windows Phone 7 like Joe Belfiore to give app demos?

I would like to be able to show whats happening on my phone, on a computer screen or projector.
This seems like it must be possible since Microsoft does it in all of their demos, but I can't seem to figure out how.
For example, I've build an app, and I want to demo it to a room of prospective clients. I can't really use the emulator very well during a presentation. I'd like the room to be able to see what I'm doing on a big screen instead of all huddling around my phone.
I've asked various people at Microsoft about this and, unfortunately, the response I always get is that Microsoft is not able to load to load the necessary "VGA Patch" externally.
Unless you can do your demo in the emulator, cameras are the only way to go at this point.
What you've seen was done with internal hardware. Perhaps you could approach Microsoft to see if they are willing to assist in any way.

Non-dev-tools Windows Phone 7 emulation

In developing a number of WP7 apps, I have a need to show clients how the app will be when deployed. The clients are a) not in the same location as I am, b) not technical at all, and c) may not even be using a PC. The purpose is to demo, get feedback and make any needed changes.
I'm not finding any realistic options to just simply show them what it would look, feel and run on a Windows Phone 7 (using the ApplicationBar, etc.). I found this link - http://www.redmondpie.com/standalone-windows-phone-7-series-emulator-9140536/ - but it's rather hacky for me to ask someone to do to set up an emulator on their machine without also installing VS Express, etc.
Does anyone know of any links to an official emulator that can be run on a PC, has a simple install and can load WP7 apps?
Have you considered using a product such as Citrix GoTo. Clients do not need to be particularly technical to join such a meeting, you can then take them through a demo. This will cost you though.
A free alternative would be to set aside a PC running the emulator with your software loaded. Create a VPN for you clients to connect to and let them use Remote Desktop Connection to connect to the PC. They can then play around with it remotely.
Have you considered using SketchFlow? Although by default the UI is "sketchy" (sorry), you can apply styles to the controls you drop on your pages, including the very same styles that are used by Windows Phone controls.
If you use a Silverlight SketchFlow project, you can deploy the content to a web server and provide a link that can be consumed on any machine that will render Silverlight content...they can go through the navigation, provide feedback, etc.
Christian Schormann has a writeup on what is required to use it in the pre-release tools... http://electricbeach.org/?p=573
You should take a look at this: http://justinangel.net/WindowsPhone7EmulatorAutomation. I believe it will answer your question exactly.

Resources