Thread (1 message) 1 message, 1 author, 2004-07-23

Re: [Bluez-devel] modify RFCOMM_DISC_TIMEOUT

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2004-07-23 09:39:14

Hi Carlos,
I run a rfcomm server built on top of bluez using sockets, the client runs a
different bluetooth protocol implementation that is very buggy and sometimes
stops the rfcomm comunication without sending a DISC. So the rfcomm server
waits for 20 seconds (RFCOMM_DISC_TIMEOUT) and then closes the connections
and become available again. The sending loop of the server is:

//using sockets
//send until write returns -1
 while(n>=0)
 {
    n=write(client,s,strlen(s));
    sleep(1);
 }
//go to listen again


If the client simply stops the communication, not disconnect, the server
must be available as soon as possible. 20 seconds it's too long for our
application.
what you want is an idle timeout detection. The RFCOMM_DISC_TIMEOUT is
not meant for doing this. Show us the output of "hcidump -x -t" while
this happens.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help