Main Site Documentation

Reset after deploy in gadgeteer by code


#1

I try to deploy on my gadgeteer by vs(build->deploy solution)
but after deploy I have press on the ereset button.
I wold be happy to do it via code.

the only function I found from searching about this problem was using the function:
Microsoft.SPOT.Hardware.PowerState.RebootDevice(false);

but if I use it- my gadgeteer became crazzzzy! it isn’t recognized in device manager window, or connect and disconnect every minute.
and when try to run via vs get error:“an error has occurred: please check your hardware”

(I use FEZspider)

someone have any idea?


#2

If you want to do it once after deploy you have to use reset button. If you put it into your code it will reset the board and then when your code will start executing it will reset board again. I think that what you are experiencing.

May be there is another way to help, if you can give more details about your application.


#3

yes, lets be specific. The deployment process will automatically reboot the device it deploys the app to. If you “need” to reboot it something is wrong, or you have an incorrect understanding of what is expected. If you can try to explain your scenario more we may be able to shed more light on things.


#4

Thanks all,
I understood my problem but didn’t solve it…
I want to deploy the program via command line, and I have after deploying- press on the reset button.
so maybe there is a comannd-line-instruction whitch help me?


#5

@ Chaya - If you are using MFDeploy to deploy from the command line, there is a reboot option which you could try. I have not used it myself but from the documentation it looks like it might be what you are after.
http://msdn.microsoft.com/en-us/library/cc544583.aspx


#6

Tanks a lot!
it is.