Help in understanding FCM w.r.t. adl_fcmSendData


#1

Hi,

I have a successful GPRS connection between 2 modems using the Q2686, communicating with each other via RS232 on UART1. I have set up TX and RX buffers. Data entering the RS232 port is first buffered, then I use wip_write to send the data, etc. wip_write returns the number of bytes sent, so when I get the next WIP_CEV_WRITE event, I can calculate how much data is left in my TX buffer, and send the next block accordingly. This all works OK.

However, I have a problem understanding the flow from a wip_read via adl_fcmSendData() to the RS232 port. What I want to do is to perform a wip_read, send the data out via adl_fcmSendData(), but add the data to my RX buffer that cannot be sent out via UART1. ( I understand about the need for sending more data out after a ADL_FCM_EVENT_RESUME). My question is, how do I know how much data had been sent by adl_fcmSendData() in order to know how much data is left to place in my RX buffer?

I know that I can enter the datalength in the adl_fcmSendData() function, but what I am doing is first performing a wip_read, and placing the data length received by the wip_read directly as a parameter into adl_fcmSendData(), which may be too much to be sent out in one go, so how do I know how much data was actually sent?

Please enlighten me. Thanks.


#2

adl_fcmSendData() will always send either all of the data that you pass to it, or none of the data - there is none of this partial sending that you get with wip_write.


#3

Thanks for that, awneil.