Error when sendind data through UART1 on Q24PL

Hello

I’m using Q24PL, and i must use ut’s UART1 in order to program a GPS device.
I’ve successfully changed baud rate on UART1 to 9600 and subscribed it using this code AFTER changing baud:

bUART1Handler = -1;
bUART1Handler = adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART1,fnBCN13A_UART1CtrlHandler,fnBCN13A_UART1DataHandler);
//Change to data mode
adl_fcmSwitchV24State(bUART1Handler,ADL_FCM_V24_STATE_DATA);

After this i try to write on UART1 using this code:

u8*	pBuffer;
    s32       iSize;

    //Here i write some data in pBuffer like "$PUBX, etc..

    adl_fcmSendData(bUART1Handler, pBuffer, iSize+1);

And my send_data command always return ADL_RET_ERR_BAD_STATE, What am I doing wrong ?? Can anyone help ??

Best Regards
Leohen

You need to wait for the FLOW OPEN event after subscribing…

Anweil

Thanks for your help, it’s working now.

Best Regards
Leohen