Indication of SIM Initailisation


#1

Hello
Please can u tel me if is there way to activate an unsolisited reponse to indicate that the SIM is full initalised.

Thanks :slight_smile:


#2

Hello Malek,

You should be able to subscribe to +WIND indications to tell when the SIM reaches various states of rediness. Have a look under the +WIND command in the AT documentation and adl_UnSoSuscribe in the ADL documentation for more inforamtion on how to activate hooks and interpret the different WIND indications.

Kind regards,
Mike


#3

If you use the ADL, then the +wind is initialised to the invariable decimal value ‘511’ (0x1FF) which means that the first 9 indications levels (bit 0 to bit 8) are set. Its not recommended to change this value.

If you (as [color=blue]MikeBean wrote) subscribe to the ‘+WIND:4’ unsolicited result:

adl_atUnSoSubscribe("+WIND: 4", (adl_atUnSoHandler_t) atUnSoResponse_PlusWIND4_Handler);

Then you’ll know when the unit is properly initialised to receive all AT-commands (SIM is fully initialised)

The callback routine to “catch” the unsolited result could look something like:

bool atUnSoResponse_PlusWIND4_Handler(adl_atUnsolicited_t * response)
{
	TRACE (( 1, "atUnSoResponse_PlusWIND4_Handler" ));

	return FALSE;  // do not send to external application
}

You can in the same way subscribe to any other +WIND indication.
However, some needs to be activated with +WFM command.

Good Luck

/Snoooze


#4

The best way consist in subscribing to SIM events with adl_Simsubscribe and wait for the ADL_SIM_EVENT_FULL_INIT.
See also adl_SIM.h for other SIM events.

Remember that it is highly recommended to wait to the full init, before issuing any GPRS action

Cheers