Adl & pin


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


(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


or with


Hope that will help…


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.


You can subscribe to all unsolicited messages this way:

adl_atUnSoSubscribe("",  (adl_atUnSoHandler_t) UnSo_Handler);
adl_atUnSoSubscribe("+",  (adl_atUnSoHandler_t) UnSo_Handler);

If you don’t want to send the message to the external application the UnSo_Handler should return FALSE.

bool UnSo_Handler(adl_atUnSolicited_t* paras) { return FALSE; }

There is more info about this function in the ADL user guide by AT Commands API.

Best Regards,


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. :frowning:

Can you give me chapter-and-verse?

Hello awneil,

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.

Best Regards,


It is - but how does that work? :confused:

But the function prototype is:

s16 adl_atUnSoSubscribe(ascii *UnSostr, adl_atUnSoHandler_t UnSohdl);

(and it’s not in adl_at.h, as the ADL User Guide says it should be)

So how do I pass an adl_strID_e in an ascii* parameter?? :open_mouth:

Is this allowed:

adl_atUnSoSubscribe( ADL_STR_WIND, my_handler );

Or this:

adl_atUnSoSubscribe( (ascii*)ADL_STR_WIND, my_handler );

Or must I do this:

adl_atUnSoSubscribe( adl_strGetResponse(ADL_STR_WIND), my_handler );

(not forgetting to release the memory afterwards, of course…)

Oh, these minor little details that Wavecom love to hide… :angry:

Do they think that Open-AT makes life too easy, so they need to leave us these little challenges to figure out?? :unamused:

I kind of guessed it’d be like that - thanks for the confirmation! :slight_smile:

Surely, the whole point of an API like ADL is that we shouldn’t have to work this stuff out by trial-and-error - it should be properly documented??! :angry: :angry:

yes, you are right!

First i thought it is a function overloading, but when i looked in the the header
there is only one signature for the adl_atUnsoSubscribe function.

So the proper use i think it should look like that with adl_srtID_e :

ascii *s_p;
adl_atUnSoSubscribe( s_p = adl_strGetResponse( ADL_STR_WIND ), my_handler );
adl_memRelease( s_p );

And you are right the documentation and the info about OAT which we are receiving is not enough. (and it has errors…)

I sometimes stumble upon bug list but why cant i receive that regularly? It could be very helpful as well.

Much more and proper documentation needed for everyone! :exclamation:

Keep up! :wink: