Send at command and show results

Hi
I wanted to write a program to send At command to a command
I get a result in the application
I work with modules Q24Plus

Do you mean send AT Command to modem? Yes you can send AT command to modem from your open AT program using adl_atCmdCreate (read ADL_USER_GUIDE first).

This is my example program to read modem IMEI (using AT+WIMEI?) and show the result to UART (as ADL_AT_RSP).

adl_atCmdCreate("AT+WIMEI?", ADL_AT_PORT_TYPE(ADL_PORT_UART1, FALSE), wimei_response_handler, "+WIMEI", NULL);

don’t forget to create response handler too

bool wimei_response_handler(adl_atResponse_t *response) {
	ascii *imei;
	ascii buff[1024];

	/* allocate memory */
	imei = adl_memGet(response->StrLength);
	
	/* get 1st argument from response string "+WIMEI: 012345678901234" */
	wm_strGetParameterString(imei, response->StrData, 1);
	
	/* Show modem IMEI to UART */
	wm_sprintf(buff, "\r\nModem WIMEI : %s\r\n", imei);
	adl_atSendResponse(ADL_AT_RSP, buff);

	return (FALSE);
}

for better understanding to it’s API, don’t forget to read ADL_USER_GUIDE carefully.
:smiley: :smiley: :smiley:

Of course - RTFM, as always :exclamation:

In addition, look at the Examples included with the tools…

Thank you very much
Dear lqmanhkeem