Return-Path: Subject: Re: [PATCH] Bluetooth: Add mgmt command for fast connectable mode From: Marcel Holtmann To: Antti Julku Cc: johan.hedberg@gmail.com, ext Claudio Takahasi , linux-bluetooth@vger.kernel.org Date: Wed, 10 Aug 2011 06:55:57 -0700 In-Reply-To: <4E425061.6080206@nokia.com> References: <1308737516-3303-1-git-send-email-antti.julku@nokia.com> <1309309092.2208.25.camel@aeonflux> <4E3A5BFB.1050201@nokia.com> <4E425061.6080206@nokia.com> Content-Type: text/plain; charset="UTF-8" Message-ID: <1312984559.3373.122.camel@aeonflux> Mime-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Antti, > > This issue was discussed in the IRC. It seem that for LE, fast > > connection is needed only on the initiator side for outgoing connections > > (LE scan/connection establishment parameters), since 4.0 spec forbids LE > > connections between dual mode devices. So fast connectable mode on the > > LE acceptor side would be only used for testing purposes, or if spec is > > changed, or if single mode hw is supported in the future. > > > > For BR/EDR, as Dmitriy explained, the fast connectable use case is to > > make headset to be able to connect faster when there is an incoming call > > (user switches headset on when call is alerting). It's an enhancement > > for headset connection time and usability. > > > > It is currently implemented in hciops by changing page scan settings > > while incoming call is alerting. HCI commands Write Page Scan Activity > > and Write Page Scan Type are used to change page scan type from standard > > to interlaced and interval 1.28 s => 22.5 ms. This makes the incoming > > connection about 1 s faster. Settings are changed only for a short time > > to minimize impact on power consumption. > > > > In my opinion BR and LE cases are quite different, so I think it would > > make sense to keep these separate and not to put them in one mgmt > > command. Could we just add a generic mgmt command for setting BR page > > scan parameters, for example "Set Page Scan Parameters Command" which > > would take parameters type (standard or interlaced), interval, and window? > > > > Br, > > Antti > > Any comments on this one? There has been lot of ideas about how the > "fast connectable mode" for incoming connections should be implemented > for management interface, and whether the same mgmt command should be > used for both BR and LE. It's not totally clear yet what is needed for > LE, but at least the Proximity profile requires changing the advertising > parameters to make connecting faster. > > Which option do you prefer? > > 1) Unified mgmt command for both BR and LE: fast connectable mode toggling. > + simple interface for both BR and LE > - scan/advertising parameters are hardcoded to kernel > - BR page scan and LE advertising are two different things, why to mix > them in same mgmt command? > - not even needed currently by LE: only if single mode dongles will be > supported, or spec is changed to allow dual mode device to accept LE > connections > > 2) Command for BR and LE as in option 1, in addition we could define 3 > values. e.g. slow, normal, fast. > + flexible to support LE advertising settings (when we support single > mode dongles) > > 3) The patch I sent, fast connectable mode only for BR. If on/off > toggling is enough for LE, it's easy to add LE support later. > > 4) Mgmt command for setting parameters for BR/LE/both to kernel, and > another for toggling fast connectable on/off > + more flexible than just toggling > - two mgmt commands needed > > 5) Mgmt command for changing BR page scan parameters, e.g "Set Page Scan > Parameters". > + simplest solution for BR, since it's currently only needed for > optimizing scan parameters for HFP connections > + generic interface which can be used also for other purposes, no need > to have concept of "fast connectable mode" in the kernel > + more flexible for user space, if values need to be changed, or > optimized for another purpose > - too low level stuff for mgmt interface? > - another solution needed for LE > > 6) Something else. I recap, then fast connectable mode is something that is controlled by one or multiple profiles. So this is just really a on/off switch. And if we support it then all profiles should just use the same settings for it. So far correct? Or do we need different values/parameters on a per profile basis? If I just assume the above, then we need a set of commands that can configure the settings of fast connectable mode. And that is done once when we start bluetoothd. After that it is really just toggle on and toggle off. And bluetoothd internally can keep a reference count for that. And then it makes sense to do the same for LE and BR/EDR. It is either on or off. Just the initial parameter set for LE is configured differently. Regards Marcel