FcmDataHandler function, size of received data

Hello, I have read in ADL doc(page 105) that ‘Data’ argument in FcmDataHandler() for UART is 120 bytes.

bool FcmDataHandler (u16 DataLen, u8 * Data){

    ascii buff123[200];
    ascii buff_num[6];

    wm_sprintf (buff_num, "No %d",DataLen);
    wm_strncat(buff123,buff_No, 6);    

    wm_strncat(buff123,(ascii *) (Data), (u16)DataLen);
    return TRUE;

But I am expecting to received 200 characters on UART. And DataLen is always 56 characters. the rest 144 characters are missing.

How do I buffer this 200 using this functions? I don’t understand this credits mention in documentation.

Can someone give example?


Page numbers are meaningless without knowing the specific version of the document.

I’m sure it doesn’t say that!

They should be delivered in subsequent events…


It says (in ADL guide for R7.4) that 120 bytes is the maximum buffer size.

There’s no guarantee that there will be this many bytes in the data packet - only that there won’t be any more than this. As awneil says, additional data will be delivered in subsequent events.

OpenAT is an Event Driven API - you have to deal with asynchronous events as they arrive and keep checking until the API says that there’s no more {data or events}. You can’t assube that if you send 200 bytes that it will all be there at the same time. You may even get the data one byte per event (yep, it happened to me on a slow link).

Also, make sure that you’re using RS232 flow control on your UART device. If not, you may simple lose data when the Wavecom module can’t accept any more (for whatever reason).

ciao, Dave

In fact, the ADL User Guide, v6.11, itself says it quite clearly:

Reference: WM_DEV_OAT_UGD_080
Revision: 004
Date: October 14, 2008

In that revision, it’s on page 98/449.

Thanks for answers.
I did as you said, and it is working.
Thanks davidc for advice for using RS232 flow control on your UART. I am going to implement this as well in order to not to lose any data.