Target mode issues


#1

I am running OpenAT v3.12 and using Eclipse
When I compile my application it refuses to load up.
However if I take out the two adl_atCmdCreate commands it boots perfectly

void adl_main(adl_InitType_e adlInitType) { // Start up software
    adl_errSubscribe((adl_errHdlr_f)myErrorHandler); 
    adl_atCmdCreate("AT+CSQ", TRUE, (adl_atRspHandler_t)signalStrength, "+CSQ", NULL);
    adl_atCmdCreate("AT+CGMR", TRUE, (adl_atRspHandler_t)firmwareVersion, "", NULL); 
    gpioHandle = adl_ioSubscribe(ADL_IO_Q24X6_GPIO_4,ADL_IO_Q24X6_GPIO_4,0,1,(adl_ioHdlr_f)gpioHandler);  
    adl_simSubscribe(simHandler,NULL);
}

Any ideas? Are there restrictions on using AT commands that I am not aware of?


#2

Hi tim,

The problem u have now with adl_cmdCreate…i had the same issue but not in eclipse in VC++. But
i had overcome the problem by giving delay in calling the adl_cmdCreate subsequently.It worked fine.So may be it works here also.Try

regards
priya


#3

Remember that the unit has to do certain initialisations - including initialising the SIM - before it can accept AT commands.

You can subscribe to the SIM Service to be notified when the SIM is ready.

but see my note here about the sequence of ADL_SIM_EVENT_FULL_INIT and ADL_SIM_EVENT_PIN_OK events…
wavecom.com/modules/movie/sc … t=sequence


#4

Remember that adl_cmdCreate effectively injects the command into the normal AT Command processor - just as if you had typed it manually.

When typing manually, you would not send the next AT Command until you had redeived the OK (or other) response from the previous one, would you…?

So, inserting a delay is a crude, “open-loop”, way out of this.

A more elegant solution would be to wait for the response to the previous command before issuing the next…