Problem with at+cusd


#1

Hello all!
Help me, please, with command at+cusd.
I send at+cusd=1,"*100#" and must have responses
+CUSD: 1,OK
+CUSD: 2,“Balans…”

My code is:

Send command
adl_atCmdCreate("AT+CUSD=1,“100#"",FALSE, evh_answer,"”,NULL);

bool evh_answer (adl_atResponse_t* ust)
{
TRACE((1,ust->StrData));
return TRUE;
}

As a result function evh_answer executes only one time (I get only response +CUSD: 1,OK)
and the second response I can show only in the Terminal Emulator.
What do I wrong?


#2

Hi,

The call back is called only once, because the other +CUSD responses are considered as unsollicited ones and not responses to AT+CUSD=? command.
I think it’s the reason why the call back is called after the first +CUSD response.
In order to filter all the +CUSD responses you need to subscribe to the +CUSD as unsollicited response (with adl_UnsoSubscribe ("+CUSD:",…) )
I hope it helps


#3

Thank you!IT WORKS :slight_smile: