Q2686 UART2 write Issue

Hai,
Am using Q2686G.
The firmware version is :: R74_00gg.Q2686G
Application OS :: 06.21
Boot loader version :: V08b0e.

Am trying to read/write in UART2.

I filled the required structure, and called “adl_odOpen( DF_UART_CLID, &settings );” .

I filled the structure as follows,
" evt_setting.op = G_IOC_OP_SET;
evt_setting.valid_cb = (eUartEvId_t)(UART_CB_ON_TX_COMPLETE ||UART_CB_ON_RX_DATA_AVAILABLE);

  evt_setting.user_data = (void*)-1L;  // not used

evt_setting.cb_list[0].evt_hdl = (pGEvtNotif_t)&CallBack_OnTxComplete;
evt_setting.cb_list[2].evt_hdl = (pGEvtNotif_t)&CallBack_OnRxDataAvailable;
evt_setting.cb_list[0].user_data = (void*)UART_CB_ON_TX_COMPLETE;
evt_setting.cb_list[2].user_data = (void*)UART_CB_ON_RX_DATA_AVAILABLE; "

then am filling sUartSettings_t ,sUartLc_t ;

In a task am reading data and writing back to same port.

" ret=uart_if->read(uart1_hdl,buffer,32);
adl_atSendResponse ( ADL_AT_UNS, “\n After READ” );
uart_if->write(uart1_hdl,buffer,strlen(buffer)); "

Am setting event in event handler,“CallBack_OnRxDataAvailable” using "adl_eventSet( dataReadyEvent, 1 ); " and inside read/write task, am waiting in while using “adl_eventWait(dataReadyEvent,1,NULL,ADL_EVENT_WAIT_ANY,ADL_EVENT_NO_TIMEOUT);”.

First time, if i send character, its doing read. but, after that, the program get blocked in “adl_eventWait” call, even though i send characters to UART2.

Am doing “adl_eventClear(dataReadyEvent,1,NULL);” after read.

why the first time alone its reading, after that not?

Thank you

Unless you have a really, really compelling reason to do it this way, I would strongly recommend that you use FCM instead!

See also: https://forum.sierrawireless.com/t/q2686g-uart2-write/4828/1

thank you, using FCM, implemented echo.