public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* How to automatically initiate sniff mode
@ 2009-02-16 23:42 Nick Pelly
  2009-02-17  2:37 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Pelly @ 2009-02-16 23:42 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

We have come across a headset (HTC M200) that does not send out a
sniff mode request when in idle. Our Bluez based stack also does not
send a sniff mode request, so we sit in a higher power state that
necessary. (20mA instead of 1mA).

Some quick research suggests that we would need to send HCI Sniff Mode
Command (OCF 0x03) to initiate sniff mode, and that this is not yet
done in the Bluez code base. We do send the HCI Write Default Link
Policy Settings Command but, as I understand, this is only applied to
incoming sniff mode requests by the link manager and will not initiate
an LMP sniff request.

We compared to two non-bluez mobile stacks and found the other phones
did automatically initiate an LMP sniff mode request.

Is there a reason for Bluez not automatically sending HCI Sniff Mode
Command, or is it just a case of no-one getting around to hitting the
problem / implementing a fix? Or have I missed something simple?

Cheers,
Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to automatically initiate sniff mode
  2009-02-16 23:42 How to automatically initiate sniff mode Nick Pelly
@ 2009-02-17  2:37 ` Marcel Holtmann
  2009-02-17  2:45   ` Nick Pelly
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2009-02-17  2:37 UTC (permalink / raw)
  To: Nick Pelly; +Cc: linux-bluetooth

Hi Nick,

> We have come across a headset (HTC M200) that does not send out a
> sniff mode request when in idle. Our Bluez based stack also does not
> send a sniff mode request, so we sit in a higher power state that
> necessary. (20mA instead of 1mA).
> 
> Some quick research suggests that we would need to send HCI Sniff Mode
> Command (OCF 0x03) to initiate sniff mode, and that this is not yet
> done in the Bluez code base. We do send the HCI Write Default Link
> Policy Settings Command but, as I understand, this is only applied to
> incoming sniff mode requests by the link manager and will not initiate
> an LMP sniff request.
> 
> We compared to two non-bluez mobile stacks and found the other phones
> did automatically initiate an LMP sniff mode request.
> 
> Is there a reason for Bluez not automatically sending HCI Sniff Mode
> Command, or is it just a case of no-one getting around to hitting the
> problem / implementing a fix? Or have I missed something simple?

actually BlueZ has automatically sniff mode since a long-long time ago.
It also would do sniff-subrate in case of Bluetooth 2.1 modules. However
you have to enable it since by default it is off.

Check /sys/class/bluetooth/hci0 for idle_timeout, sniff_max_interval and
sniff_min_interval. Use idle_timeout and the others to control the
interval values.

Regards

Marcel



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to automatically initiate sniff mode
  2009-02-17  2:37 ` Marcel Holtmann
@ 2009-02-17  2:45   ` Nick Pelly
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Pelly @ 2009-02-17  2:45 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

On Mon, Feb 16, 2009 at 6:37 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Nick,
>
>> We have come across a headset (HTC M200) that does not send out a
>> sniff mode request when in idle. Our Bluez based stack also does not
>> send a sniff mode request, so we sit in a higher power state that
>> necessary. (20mA instead of 1mA).
>>
>> Some quick research suggests that we would need to send HCI Sniff Mode
>> Command (OCF 0x03) to initiate sniff mode, and that this is not yet
>> done in the Bluez code base. We do send the HCI Write Default Link
>> Policy Settings Command but, as I understand, this is only applied to
>> incoming sniff mode requests by the link manager and will not initiate
>> an LMP sniff request.
>>
>> We compared to two non-bluez mobile stacks and found the other phones
>> did automatically initiate an LMP sniff mode request.
>>
>> Is there a reason for Bluez not automatically sending HCI Sniff Mode
>> Command, or is it just a case of no-one getting around to hitting the
>> problem / implementing a fix? Or have I missed something simple?
>
> actually BlueZ has automatically sniff mode since a long-long time ago.
> It also would do sniff-subrate in case of Bluetooth 2.1 modules. However
> you have to enable it since by default it is off.
>
> Check /sys/class/bluetooth/hci0 for idle_timeout, sniff_max_interval and
> sniff_min_interval. Use idle_timeout and the others to control the
> interval values.
>

Ah, thank you! I was looking on the userspace side.

Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-17  2:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-16 23:42 How to automatically initiate sniff mode Nick Pelly
2009-02-17  2:37 ` Marcel Holtmann
2009-02-17  2:45   ` Nick Pelly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox