modify RFCOMM_DISC_TIMEOUT
Hi Marcel
I think that i've finally found the origin of the errors. The kernel log shows:
(...)
<4> Unknown HCI packet type 01
(...)
This message is dropped every five minutes (aproximately) and the packet type is not always 01. It seems that the serial communication (UART) with the bluetooth module (EYMF2CAMM from TAIYO YUDEN) isn't very confiable. Do you agree?
I used to attach the hci device using this command:
/bluez/bluezmain hciattach -n /dev/tts/2 any 115200 and always works.
Then I configured the kernel with BCSP support and tried to attach the device using:
/bluez/bluezmain hciattach -n /dev/tts/2 bcsp 115200 /bluez/bluezmain hciattach -n /dev/tts/2 swave 115200
but none of them work at all. The error message is [hcid] Can't init device hci0. Connection timed out(110)
What do you think about it?
Thanks for your interest.
Best Regards
CarlosAM
----- Original Message -----
From: "Marcel Holtmann" <[email protected]>
To: "Carlos AM" <[email protected]>
Cc: "BlueZ Mailing List" <[email protected]>
Sent: Friday, July 23, 2004 11:39 AM
Subject: Re: [Bluez-devel] modify RFCOMM_DISC_TIMEOU
Quoted 3 lines
Hi Carlos,
Quoted 1 line
I run a rfcomm server built on top of bluez using sockets, the client
runs a
Quoted 1 line
Quoted 1 line
different bluetooth protocol implementation that is very buggy and
sometimes
Quoted 1 line
Quoted 1 line
stops the rfcomm comunication without sending a DISC. So the rfcomm
server
Quoted 1 line
Quoted 1 line
waits for 20 seconds (
RFCOMM_DISC_TIMEOUT) and then closes the
connections
Quoted 16 lines
Quoted 8 lines
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);Quoted 7 lines
}
//go to listen againIf 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.
Quoted 9 lines
what you want is an idle timeout detection. The
RFCOMM_DISC_TIMEOUTis not meant for doing this. Show us the output of "hcidump -x -t" while this happens.Regards
Marcel
Carlos AM
Naxus Conectividad Móvil
Marcel Holtmann
maintainerHi Carlos,
Quoted 9 lines
I think that i've finally found the origin of the errors. The kernel log
shows:(...)
<4> Unknown HCI packet type 01
(...)
Quoted 7 lines
This message is dropped every five minutes (aproximately) and the packet
type is not always 01. It seems that the serial communication (UART) with
the bluetooth module (EYMF2CAMM from TAIYO YUDEN) isn't very confiable. Do
you agree?
out of sync H4 streams are really a big problem. This can happen if you can't enable automatic flow control. To avoid this you have to use BCSP if it is a CSR based chip.
Quoted 8 lines
Then I configured the kernel with BCSP support and tried to attach the device using:
/bluez/bluezmain hciattach -n/dev/tts/2bcsp 115200 /bluez/bluezmain hciattach -n/dev/tts/2swave 115200but none of them work at all. The error message is [hcid] Can't init device
hci0. Connection timed out(110)
The swave will only work if your chip is Silicon Wave based and the BCSP method only works if you switch from H4 to BCSP first with the correct PS key settings. Contact your module manufacturer.
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel