Page 1 of 1

Win10 IoT raspberry pi 2 Autostart Headless App

Posted: Mon Aug 31, 2015 10:54 pm
by acedeno9
Hello,

I have a created a headless app in C# on Win10 for the IoT Core for the Raspberry pi 2. I'm using board model B and have followed all the set up and guides on the Microsoft website. Dev box configured for developer mode.

I connect directly with a Ethernet cable to the board from my dev box. From Visual Studio, if run my code in either debug or release mode, it works fine. If I connect to the device from the web interface and try to select my program from the list of installed apps, it fails to do so. i guess this is related.

My main question, How can I setup my headless app to automatically start after i boot? I don't want to have to be connected to the internet after i deploy my solution.

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Posted: Tue Sep 01, 2015 5:24 pm
by beta-tester
acedeno9 wrote:(...) From Visual Studio, if run my code in either debug or release mode, it works fine. If I connect to the device from the web interface and try to select my program from the list of installed apps, it fails to do so. i guess this is related.

My main question, How can I setup my headless app to automatically start after i boot? I don't want to have to be connected to the internet after i deploy my solution.
If your App is working on the RPi from "within" VS2015, then it should be able to run your App via Web interface as well and should be able to select as autorun as well.
via PowerShell you can select an App to autostart as well
http://ms-iot.github.io/content/en-US/w ... eUtils.htm

did you got an exception message when you tried to run your App from Web interface?

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Posted: Tue Sep 01, 2015 10:15 pm
by acedeno9
More details can be seen by my post on StackExchange

http://raspberrypi.stackexchange.com/qu ... ndow10-iot

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Posted: Wed Sep 02, 2015 10:44 am
by ricl
Without any idea of what error messages you get it is a little difficult to help much.

It does work as expected. I have debugged, deployed and run from start a number of the example applications (https://github.com/ms-iot/samples) including Blinky.

My setup is just a standard 192.168.x.x. network from a Dell Desktop running VS2015 Community edition.

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Posted: Wed Sep 02, 2015 2:30 pm
by acedeno9
The error message is

Failed to start package BlinkyHeadlessCS-uwp_q8jk9dv1tcdg!App

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Posted: Wed Sep 02, 2015 2:37 pm
by beta-tester
i haven't tried the blinky example, but i have my own App running as "autorun".
i used a fresh installation of Win 10 IoT Core for RPi2 build 10.0.10240.16384, a 16GB microSD card, a 10.xxx.xxx.xxx IP, VisualStudio 2015 RTM.
after i compiled, deployed, debugged my App once to RPi2 from within VS, my App is listed in "installed apps" on the RPi2's Web interface http://10.xxx.xxx.xxx:8080/AppXManager.htm.
after that, i can select my App, start my App and set my App as default for "autostart" from within the web interface.
it works perfectly.... i tired two different of my Apps... no problems there at my.

i would suggest to make a fresh installation.
do you have the recent Win10 IoT Core for RPi2 and VisualStudio 2015, or are you usinf still one of the preview builds of Win IoT and VS 2015 RC?

if it still not work, maybe you de-tuned some project settings (so VS did not leave all packages on the RPi2 after debugging).
so create a very simple new App from scratch (hello world like App) and try that. (don't play with the project settings... only to see if something went wrong with your project settings)

PS.: normally you don't have to remove your App, if you have changed it ... VS 2015 will update it automatically if you deploy it to your RPi2

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Posted: Wed Sep 02, 2015 9:45 pm
by UndergroundFun
Yes, I would try explicitly removing the application, restarting the Pi, then redeploying your application.

I had a similar issue where it seemed to be holding onto the wrong version of the deployed files.