Re: [PATCH 1/1] bluetooth: update default BLE connection interval bounds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 20 Aug 2019 11:01:41 -0600
Carey Sonsino <csonsino@xxxxxxxxx> wrote:

> Update the default BLE connection interval min/max bounds to the full 
> range of permitted values (6-3200, corresponding to 7.25-4000ms).
> 
> Commit c49a8682fc5d298d44e8d911f4fa14690ea9485e introduced a bounds 
> check on connection interval update requests, but the default min/max 
> values were left at 24-40 (30-50ms) which caused problems for devices 
> that want to negotiate connection intervals outside of those bounds.
> 
> Setting the default min/max connection interval to the full allowable 
> range in the bluetooth specification restores the default Linux behavior 
> of allowing remote devices to negotiate their desired connection 
> interval, while still permitting the system administrator to later 
> narrow the range.
> 
> Fixes c49a8682fc5d: (validate BLE connection interval updates)
> 
Trying pair XX:XX:XX:XX:XX:XX in bluetoothctl 
leads to create connection commands containing
le_conn_max_interval > le_supv_timeout (4000ms > 420ms) which the
controller does not like and is imho not allowed.

< HCI Command: LE Create Connection (0x08|0x000d) plen 25
    bdaddr XX:XX:XX:XX:XX:XX type 0
    interval 96 window 96 initiator_filter 0
    own_bdaddr_type 0 min_interval 6 max_interval 3200
    latency 0 supervision_to 42 min_ce 0 max_ce 0
> HCI Event: Command Status (0x0f) plen 4
    LE Create Connection (0x08|0x000d) status 0x12 ncmd 1
    Error: Invalid HCI Command Parameters


> Signed-off-by: Carey Sonsino <csonsino@xxxxxxxxx>
> 
> ---
> 
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index 04bc79359a17..f4f2f712c527 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -3181,8 +3181,8 @@ struct hci_dev *hci_alloc_dev(void)
>       hdev->le_adv_max_interval = 0x0800;
>       hdev->le_scan_interval = 0x0060;
>       hdev->le_scan_window = 0x0030;
> -    hdev->le_conn_min_interval = 0x0018;
> -    hdev->le_conn_max_interval = 0x0028;
> +    hdev->le_conn_min_interval = 0x0006;
> +    hdev->le_conn_max_interval = 0x0c80;
>       hdev->le_conn_latency = 0x0000;
>       hdev->le_supv_timeout = 0x002a;
>       hdev->le_def_tx_len = 0x001b;

hmm, what happened with the tabs here? I needed to manually apply it.

Regards,
Andreas




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux