Serial link control


#1

Hii,
Iam using FCM handler to receive data from Pc.If it is a huge file ,internally the serial flow is splitted in to packets and for every packet it is coming to the handler,the time interval between two each packet is 100 ms.Is it posible to increase the packet interval?

Because i want to send those packets received from FCM handler through GPRS.so it is sending only first packet through GPRS,then iam getting “Sent Failed”.I doubt on that GPRS packet transmission is taking more than 100 ms eventhough i set soc.TcpTxDelay=0

bool fcmdata(u16 datalen,u8 *buffer)
{
s8 v=0;
u8 temp[128]={0};
u16 ss=0;

adl_atSendResponse ( ADL_AT_RSP,"\nFcm Handler :");
			
TRACE (( 1, "****datalen** = %d",datalen ));
strncpy(temp,buffer,datalen);
ss=strlen(temp);
temp[ss]='\0';
v=ed_SendDataExt(temp,ss,FALSE,ED_ID_TCPSOCKET_4); 
if(v>=0)
adl_atSendResponse ( ADL_AT_RSP,"\nsent successfully :");
	else
adl_atSendResponse ( ADL_AT_RSP,"\nsent Failed ");

}

so is it possible to increase the time interval of serial flow?

If it is possible,can u plz suggest me how to do that?

[/b]


#2

Sounds like a baud-buffersize-dependant timing issue.

Let’s assume the modem is using a 1k receive buffer size for the uart. At 115kBaud you’ll get round 10kB traffic per second, or 10 calls with a 1k buffer, resulting in an call interval of ~100ms.

IMO you have to deal with the handshaking lines for the UART.
Clearing the CTS line will tell the PC that your buffer is full, that’s exact the mechanism “normal” land line modems doing their job.

On entering the data handler clear the CTS line, on completion of GPRS transmission re-enable it.

brgds,
Heinz


#3

But how can you do that with ADL? :confused:

The handshaking lines are not even mentioned in the ADL User Guide. :frowning:

Well, not in v3.03, at least :angry:


#4

Hmmm, well, that’s right. :confused: I’d try to set the serial link to no handshake mode. IMO this will make the physical handshake pins being available as “ordinary” GPIO lines, and therefore accessible via ADL.

Don’t know at the moment, if there is a smarter way to do that.

HTH, Heinz


#5

I have a feeling that this won’t work. :frowning:

I haven’t tried it with Open-AT stuff, but I think I tried setting the modem to “No Handshake” using AT Commands, and found that it still insisted on having RTS asserted…? :frowning:

But I could be wrong.

See also: wavecom.com/modules/movie/sc … hlight=cts

wavecom.com/modules/movie/sc … hlight=dtr

wavecom.com/modules/movie/sc … hlight=dtr


#6

RTS is OK. That’s the way the PC is telling that he has data for transmission (RequestToSend).
If handshaking is enabled on the PC it will send only if CTS is set by the modem, too. The modem is “ClearToSend”.
If the modem drops CTS, the PC stops sending (ok, maybe after the few bytes remaining in the send buffer).

Heinz