acedeno9
Posts: 3
Joined: Mon Aug 31, 2015 10:41 pm

Win10 IoT raspberry pi 2 Autostart Headless App

Mon Aug 31, 2015 10:54 pm

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.

beta-tester
Posts: 1353
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Tue Sep 01, 2015 5:24 pm

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?
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

acedeno9
Posts: 3
Joined: Mon Aug 31, 2015 10:41 pm

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Tue Sep 01, 2015 10:15 pm

More details can be seen by my post on StackExchange

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

ricl
Posts: 657
Joined: Wed Aug 26, 2015 11:55 am

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Wed Sep 02, 2015 10:44 am

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.
ricl : F/gamma = ma : Law ii(a) : https://climatedatablog.wordpress.com/2016/01/02/an-energy-challenge-2016/ #AnEnergyChallenge2016

acedeno9
Posts: 3
Joined: Mon Aug 31, 2015 10:41 pm

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Wed Sep 02, 2015 2:30 pm

The error message is

Failed to start package BlinkyHeadlessCS-uwp_q8jk9dv1tcdg!App

beta-tester
Posts: 1353
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Wed Sep 02, 2015 2:37 pm

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
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

UndergroundFun
Posts: 44
Joined: Wed Jun 17, 2015 12:57 pm

Re: Win10 IoT raspberry pi 2 Autostart Headless App

Wed Sep 02, 2015 9:45 pm

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.

Return to “Windows 10 for IoT”