Search code examples
azureuwpraspberry-pi3azure-iot-hubwindows-iot-core-10

Raspberry Pi 3 running Windows 10 Core with custom program shows crossed-out x


I have a very simple project, in which I aim to be able to toggle an LED by means of a direct method call (through Azure IoT hub) on my Raspberry Pi 3, running Windows 10 IoT Core.

In it's current state, the program I wrote shows only a white box with an x in it, not unlike a mail envelope, and the back end light-controlling code does not respond to direct method calls. However, when connected to a Visual Studio 2017 remote debugger, the code behind the UI seems to run perfectly fine (or so I thought), so I assumed the failure of Direct Method call was due to my internet connection (as I asked about in this question).

Turns out, however, that the code behind the UI was making a request to print a little program-execution update into a text box, and the nonexistent UI never responded, thus preventing the program from continuing on to open the Azure Iot Hub Device Client in the first place.

Rather than just ditching the UI altogether, I'd like to figure out what is preventing my UI from doing, well, anything. What makes this odd is that, when I first tried out my program (minus the IoT Code) the UI worked just fine. Frankly, I haven't the foggiest idea what could suddenly be wrong (the Pi is in headed mode, if you were wondering), so I suppose my best course of action would be to publish my code and see if anyone else can replicate the issues.

Instead of dumping all my code into this post, where someone would have to reconstruct it into a project, and then potentially be missing something, etc... I've simply shoved it all into a Git repo, which can be found here:

https://github.com/Hermanoid/UltimateLED2

I have a couple asides to ask about as well... For one, I neglected to bleep out the Device Key and ID of my Raspberry Pi in the repo. Could that be a (halfway viable, or at least likely) security concern?

And also, I have a truckload of version mismatch warnings in my VS error list. In other projects, I would simply spin up some version redirects in a Web.xml or App.xml file, but (with the exception of a "Runtime Directives" XML file) those don't exist in this project. What can I do to remedy these issues?

Thanks!

Lucas Niewohner


Solution

  • The capabilities of the application need to be enhanced. Since the application now needs to send bi directional information from it to azure. It needs both client and server checked in the application manifest

    enter image description here