Sketch not working after disconnect/connect power

I amI have a very strange issue. My sketch works great, but it is not working after i disconnect/connect the power supply (external 12V, 3.5A)

Sketch works if i press manually the RESET button of the Arduino uno or that in GSM Shield.
I am not a specialist but it seemd to me like a booting problem or something? Is this right? How can i make it reset every time the power is reconected? Is there such thing?

Thanks in advance, i hope to solve this problem ASAP.

Check if your issue happens with the examples included with Arduino IDE (GSM).

Yes its same thing....sometimes it works fine but sometimes works about till 20% of the code and then freezes there...very strange..

What can that be?

It sounds to me like there is something to do with gsmbegin(pin,restart) because when i set it to
if(gsmAccess.begin(PINNUMBER,false)==GSM_READY)
instead of
if(gsmAccess.begin(PINNUMBER)==GSM_READY)

  • added , false parameter everything vorks fine....i am not sure why it works better with the false parameter....