adl_simSubscribe function not properly working?


#1

Hi,

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,

Marcel


#2

Hi Marcel,

I think your problem is that you’re trying to detect an event that occurs before you’ve subscribed to the service.

Also, you’re working with a Beta version of OpenAT when you’re using the Q2686, so you should check the release notes to make sure the SIM service has been fully tested. If not, ask your Wavecom disti when the next release will be available.

Regards,
Arfy


#3

Hello Arfy,

Thanks for your answer. The event should come after sending the “adl_simSubscribe(SimHandler, Sim_PIN);” instruction, but it doesn’t work. You are right about the Beta-version of OpenAt 4.0. Unfortunately there are no relase notes on my DVD. I’m using Open AT® 4.00.b01a.

Kind regards,

Marcel