One of OpenAT’s major advantages is the fact that the ADL api’s obsolete the use of AT commands . The adl_sim service is an important and fundamental service, but so limiting that its use is limited to very simple applications. Therefore my big dismay each time I see this api in the ADL manual and still need to use the AT+CPIN command.
I face the following real world problems:
- In most applications where sim cards get removed/replaced the sim card need to be authenticated (using a pre stored ccid) before the sim pin can be entered. I tried subscribing to the sim service (supplying NULL for pin) to receive the ADL_SIM_EVENT_PIN_WAIT or ADL_SIM_EVENT_INSERTED event to know when to query for the CCID (using an AT cmd ). Once the card is authenticated (so now I know I have a pin associated with the sim card) I unsubscribe and subscribe again to the sim service to “enter” the pin this way. If I need a new pin the user is queried for the new pin via either LCD/KEYPAD prompt or via uart. I retrieve the pin and enter it the same way, using adl_simSubsribe. After this I discovered my sim handler is never called with the FULL_INIT event. I also had issues with WIP telling me the sim is not initialised (obviously when it was). I assume this is only a bug, and hopefully only on the OpenAT version I tried this.
- If the unit boot without any simcard I never receive a no sim event. . This may sound like a silly complain, but due to the inherent non-blocking nature of the OpenAT OS proper application design is event driven (WITH THE MINIMUM TIMER EVENTS!) that step state engines. Without this event there is no “final” response from the sim service after reboot without a sim to step any state engine.
- No separate PHONE to NETWORK lock or SIM to PHONE lock indications. (Talking about the PH-NET and PH-SIM unsoliciteds) If I am lucky I receive PIN_ERROR events. So I am back subscribing to Unsolicited events.
This could be such a nice service! Go Wavecom…