Hi Rohit,
please find the below function to read multiple line response.
Step1 :
you can declare one array
static char strUrcResBuff[1024];
Step 2:
please write At response handler function as below
//---------------------------------------------------------------------------------//
static s32 ATResponse_Handler(char line, u32 len, void userData)
{
char* pHead = NULL;
pHead = Ql_RIL_FindString(line, len,userData);
if(pHead)
Ql_memset(strUrcResBuff, 0x0, sizeof(strUrcResBuff));
Ql_strcat((strUrcResBuff),line);
if (Ql_RIL_FindLine(line, len, “OK”))
{
return RIL_ATRSP_SUCCESS;
}
else if (Ql_RIL_FindLine(line, len, “ERROR”))
{
return RIL_ATRSP_FAILED;
}
else if (Ql_RIL_FindString(line, len, “+CME ERROR”))
{
return RIL_ATRSP_FAILED;
}
else if (Ql_RIL_FindString(line, len, “+CMS ERROR:”))
{
return RIL_ATRSP_FAILED;
}
return RIL_ATRSP_CONTINUE; //continue wait
}
//---------------------------------------------------------------------------------//
so response from AT command will stored in strUrcResBuff array.
Step 3: You can send AT commands using Ql_RIL_SendATCmd function.
for using above response handler you have send command like below
ret = Ql_RIL_SendATCmd(“AT+CUSD=1,”*123#"\r\n",Ql_strlen(“AT+CUSD=1,”*123#"\r\n"), ATResponse_Handler, " +CUSD: ", 0);
where +CUSD: is first line desire response. so if desire response received strUrcResBuff will clear all old data and store new response
similar for AT+QENG?
ret = Ql_RIL_SendATCmd(“AT+QENG?\r\n”, Ql_strlen(“AT+QENG?\r\n”), ATResponse_Handler, " +QENG: 1,0 ", 0);
please find the below snaps.

