I’m writing an embedded application for Q2400A (Open AT v3.01). Could anyone tell me how to enter pin number correctly.
Now i can’t see +WIND: 4 message (only +WIND:7) and modem is not available. BUT if i use debug mode SIM card initialization works fine (i can see +WIND:4 and gsm modem is available).
OK, I don’t know if its these simple answers you are looking for but anyway… with AT-commands its just
AT+CPIN=nnnn
(where nnnn is PIN number) and from the ADL embedded OAT application its just to subscribe to the SIM Service API:
adl_simSubscribe(simHandler, PIN_code)
where simHandler is the event handler and PIN_code is the 4 digit PIN code as a text string.
The PIN service should be subscribed during initialisation and the rest of the application should wait until ADL_SIM_EVENT_PIN_OK event is received.
Another option could be to disable the PIN code completely on the SIM card with AT+CLCK command. (but you might want the extra security of the PIN code…)
Its important that you do not modify the +WIND value. The ADL lib needs this value to be set to “all indication” for internal processing. But maybe you dont see the +WIND:4 because of SIM PIN initialisation failure… you will get the +WIND:7 even without PIN code because emergency calls is always possible to make.
You can always check if the PIN status either with
Yes. My mistake is that i’ve modified +WIND value.
I’m using UART1 and just wanted to turn off all responses (My GSM modem should be connected to another board and i want to avoid such responses as +WIND ). By the way, how i can do it?
Thank you.
I have the v3.03 edition of the ADL User Guide, and I can’t see where it mentions about using “” (an empty string?) or “+” to subscribe to all unsolicited messages.
adl_atUnSoSubscribe() function first parameter string is compared to the coming usolicited message. (or the parameter could be a value which represent a string as well. It is written down in the ADL user guide by the function description.)
Which is not written down, that it compares as long as the parameter’s length. So in case of zero string it will compare to a zero string, and every unsolicited message start with ‘+’ character so every message will be passed to the handling function.
If i remeber well i have tried zero and ‘+’ string in the parameter, and it worked.