I’m using OpenAT 4.0 and a Q2686 modem. I’ve written code to enter the SIM PINcode as follows:
vSim_State=adl_simGetState(); if (vSim_State!=ADL_SIM_STATE_FULL_INIT) adl_simSubscribe(SimHandler, Sim_PIN);
When I put this check in a loop and run the check once per 10 seconds, vSim_State reads out the value 2 (ADL_SIM_STATE_INSERTED) when powering on the modem, but nothing happens, the SimHandler does not receive an event.
If I open the SIM-card holder and close it back again, the SimHandler receives the events ADL_SIM_EVENT_REMOVED and ADL_SIM_EVENT_INSERTED. Next time the check is done and vSim_State reads out the value 2 (ADL_SIM_STATE_INSERTED). But now on issueing the adl_simSubscribe(SimHandler, Sim_PIN); command the corresponding events are generated.
It looks as if the Simhandler first needs to receive an event before working properly.
Does anyone know how to receive the events without having to open and close the SIM-holder?
Thanks in advance,