* [PATCH] Bluetooth: use recommended LE connection parameters
@ 2011-07-27 21:40 Anderson Lizardo
2011-08-01 19:20 ` Gustavo Padovan
0 siblings, 1 reply; 3+ messages in thread
From: Anderson Lizardo @ 2011-07-27 21:40 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Lizardo
The new connection parameters now match the recommended values for
Proximity and Health Thermometer profiles. The previous values were
ramdomly chosen, and are either too low or too high for most cases.
New values:
Scan Interval: 60 ms
Scan Window: 30 ms
Minimum Connection Interval: 50 ms
Maximum Connection Interval: 70 ms
Supervision Timeout: 420 ms
See "Table 5.2: Recommended Scan Interval and Scan Window Values" and
"Table 5.3: Recommended Connection Interval Values" for both profiles
for details. Note that the "fast connection" parameters were chosen,
because we do not support yet dynamically changing these parameters from
initiator side.
Additionally, the Proximity profile recommends (section "4.4 Alert on
Link Loss"):
"It is recommended that the Link Supervision Timeout (LSTO) is set to 6x
the connection interval."
Minimum_CE_Length and Maximum_CE_Length were also changed from 0x0001 to
0x0000 because they are informational and optional, and old value was
not reflecting reality.
---
net/bluetooth/hci_conn.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index ea7f031..fa6820e 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -56,15 +56,15 @@ static void hci_le_connect(struct hci_conn *conn)
conn->sec_level = BT_SECURITY_LOW;
memset(&cp, 0, sizeof(cp));
- cp.scan_interval = cpu_to_le16(0x0004);
- cp.scan_window = cpu_to_le16(0x0004);
+ cp.scan_interval = cpu_to_le16(0x0060);
+ cp.scan_window = cpu_to_le16(0x0030);
bacpy(&cp.peer_addr, &conn->dst);
cp.peer_addr_type = conn->dst_type;
- cp.conn_interval_min = cpu_to_le16(0x0008);
- cp.conn_interval_max = cpu_to_le16(0x0100);
- cp.supervision_timeout = cpu_to_le16(0x0064);
- cp.min_ce_len = cpu_to_le16(0x0001);
- cp.max_ce_len = cpu_to_le16(0x0001);
+ cp.conn_interval_min = cpu_to_le16(0x0028);
+ cp.conn_interval_max = cpu_to_le16(0x0038);
+ cp.supervision_timeout = cpu_to_le16(0x002a);
+ cp.min_ce_len = cpu_to_le16(0x0000);
+ cp.max_ce_len = cpu_to_le16(0x0000);
hci_send_cmd(hdev, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: use recommended LE connection parameters
2011-07-27 21:40 [PATCH] Bluetooth: use recommended LE connection parameters Anderson Lizardo
@ 2011-08-01 19:20 ` Gustavo Padovan
2011-08-01 19:36 ` Anderson Lizardo
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Padovan @ 2011-08-01 19:20 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth
* Anderson Lizardo <anderson.lizardo@openbossa.org> [2011-07-27 18:40:09 -0300]:
> The new connection parameters now match the recommended values for
> Proximity and Health Thermometer profiles. The previous values were
> ramdomly chosen, and are either too low or too high for most cases.
>
> New values:
>
> Scan Interval: 60 ms
> Scan Window: 30 ms
> Minimum Connection Interval: 50 ms
> Maximum Connection Interval: 70 ms
> Supervision Timeout: 420 ms
>
> See "Table 5.2: Recommended Scan Interval and Scan Window Values" and
> "Table 5.3: Recommended Connection Interval Values" for both profiles
> for details. Note that the "fast connection" parameters were chosen,
> because we do not support yet dynamically changing these parameters from
> initiator side.
>
> Additionally, the Proximity profile recommends (section "4.4 Alert on
> Link Loss"):
>
> "It is recommended that the Link Supervision Timeout (LSTO) is set to 6x
> the connection interval."
>
> Minimum_CE_Length and Maximum_CE_Length were also changed from 0x0001 to
> 0x0000 because they are informational and optional, and old value was
> not reflecting reality.
> ---
> net/bluetooth/hci_conn.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
Applied, and also added the Signed-off-by line that you forgot. Thanks.
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: use recommended LE connection parameters
2011-08-01 19:20 ` Gustavo Padovan
@ 2011-08-01 19:36 ` Anderson Lizardo
0 siblings, 0 replies; 3+ messages in thread
From: Anderson Lizardo @ 2011-08-01 19:36 UTC (permalink / raw)
To: Anderson Lizardo, linux-bluetooth
Hi Gustavo,
On Mon, Aug 1, 2011 at 3:20 PM, Gustavo Padovan <padovan@profusion.mobi> wrote:
> Applied, and also added the Signed-off-by line that you forgot. Thanks.
Thanks, I will change my tree's .git/config so the sign-off is not missed.
Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-01 19:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-27 21:40 [PATCH] Bluetooth: use recommended LE connection parameters Anderson Lizardo
2011-08-01 19:20 ` Gustavo Padovan
2011-08-01 19:36 ` Anderson Lizardo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).