Re: [Bluez-devel] [PATCH] Updated sco flow control feature

Jose Vasconcellos
2006-10-23T20:09:20Z

Hi Fabien,

Very interesting. I interpreted this to mean that if synchronous
channels are supported, then synchronous flow control is required.
Some form of feedback from the HCI device is required to main
synchronization. If you use timers you run occasional the risk of
getting out of sync.

All this speculation can be clarified if someone with an actual UART
dongle can speak up. The patch that I posted should work as long
as the device implements synchronous flow control. Maybe the
solution is to not support SCO on UART until someone can take
responsibility.

One thing is clear, the current code is wrong. It allows application
programs to easily cause Linux to panic. I'm very surprised that this
condition has been allowed.

BTW, the IEEE spec is the base for bluetooth.

Jose

Fabien Chevalier wrote:
> Hello Jose,
>
> The documents i used as reference are the ones from bluetooth SIG. I
> don't know who copied the others, but they are closely similar to the
> one from IEEE :-)
> Concerning SCO flow control over UART link, it is stated nowhere it is
> mandatory nor optionnal. :-(
>
> However, having a look at the Bluetooth 2.0+EDR spec (available on
> www.bluetooth.com), section 6.26 "Supported commands" describes the
> bitmask that lists the supported hci commands for a given
> implementation, stating that *It is implied that if a command is listed
> as supported, the feature underlying that command is also supported.*
>
> And guess what ?.... in the bitmask there is a bit for the "Write
> Synchronous flow control enable" command. ;-)
>
> *** cut here ***
> 0 Read Hold Mode Activity
> 1 Write Hold Mode Activity
> 2 Read Transmit Power Level
> 3 Read Synchronous Flow Control Enable
> 10
> 4 Write Synchronous Flow Control Enable
> 5 Set Host Controller To Host Flow Control
> 6 Host Buffer Size
> 7 Host Number Of Completed Packets
> *** cut here ***
>
> Having analysed all these informations, my guess is that it is
> synchronous flow control is 'optionnal', even for uart links.
>
> Cheers,
>
> Fabien