How to reset the modem manually?


#1

My application is in endless repetition, I can not connect me to my modem in any way, try using the HyperTerminal, but he soon begins to run my application and not have the ability to run at+wopen=0.

So I how do I manually reset the modem?

When i connected modem by hyperterminal:

[GPRS]: initialized.
[GSM]: initialized.
[UART1]: initialized.
[UART2]: initialized.
[]: initialized.

+WIND: 13
ADL_FCM_EVENT_FLOW_OPENNED
[GPRS]: initialized.
[GSM]: initialized.
[UART1]: initialized.
[UART2]: initialized.
[]: initialized.

+WIND: 13
ADL_FCM_EVENT_FLOW_OPENNED
[GPRS]: initialized.
[GSM]: initialized.
[UART1]: initialized.
[UART2]: initialized.
[]: initialized.

+WIND: 13

#2

You don’t need to reset the modem - it’s doing that already!

What you need to do is to stop your application.

You need to send AT+WOPEN=0 to stop the application as soon as possible - probably by having it ready in the clipboad, and use Hypoterminal’s ‘paste to host’ function.

Next time, make sure that you build a startup delay into your application, or some other way to easily stop it in case of problems - see: viewtopic.php?f=53&t=1907&p=7061&hilit=startup+delay#p7061


#3

Thanks! But you can paste code for init delay? Please :slight_smile:


#4

I’m not an expert, but it should be something like the following:

TRACE (( 1, "Waiting 10 sec. before start the application...." ));
	r = adl_ctxSleep(10 * 1000 / 18.5 );

in my app it works.


#5

I’m not sure if adl_ctsSleep requires that you have a “multi-task” application?

An alternative is to have your adl_main function just start a single-shot timer - then the “real” application starts from the timer handler…


#6

no, it does not.


#7

I can confirm, I tested it.
I suppose the single “main” thread is the actual context task