All of lore.kernel.org
 help / color / mirror / Atom feed
* bug report - bluetoothctl ble connection
@ 2016-06-29  6:57 Seulki Shin
  2016-06-29  7:09 ` Seulki Shin
  0 siblings, 1 reply; 4+ messages in thread
From: Seulki Shin @ 2016-06-29  6:57 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

Hi Bluez,

I found a pairing/connection bug in bluetoothctl.

* Steps to reproduce:

[bluetoothctl] scan on
[bluetoothctl] pair ble_device
[bluetoothctl] connect ble_device
[bluetoothctl] exit

Right after exiting from bluetoothctl, Disconnect happens like below.

< HCI Command: Disconnect (0x01|0x0006) plen 3                [hci0] 156.978499
        Handle: 128
        Reason: Remote User Terminated Connection (0x13)
> HCI Event: Command Status (0x0f) plen 4                     [hci0] 156.995345
      Disconnect (0x01|0x0006) ncmd 1
        Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4                [hci0] 157.005387
        Status: Success (0x00)
        Handle: 128
        Reason: Connection Terminated By Local Host (0x16)
@ Device Disconnected: 00:22:D0:8D:22:6D (1) reason 2

* My observation1:
This is not the case of the hcitool. It works.

* My observation2:
Right after receiving GATT services, bluez does some more work.
But the Value doesn't look like normal.

......

> ACL Data RX: Handle 128 flags 0x02 dlen 22                  [hci0] 132.295271
      ATT: Read Response (0x0b) len 17
        Value: 506f6c6172204837203844323236443146
......

* I attached full hci logs.

Thanks,
Seulki

[-- Attachment #2: bluez540-bluetoothctl-connection-bug.txt --]
[-- Type: text/plain, Size: 29814 bytes --]

[bluetooth]# pair 00:22:D0:8D:22:6D
Attempting to pair with 00:22:D0:8D:22:6D
< HCI Command: LE Create Connection (0x08|0x000d) plen 25     [hci0] 127.129700
        Scan interval: 60.000 msec (0x0060)
        Scan window: 30.000 msec (0x0030)
        Filter policy: White list is not used (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:22:D0:8D:22:6D (Polar Electro Oy)
        Own address type: Public (0x00)
        Min connection interval: 50.00 msec (0x0028)
        Max connection interval: 70.00 msec (0x0038)
        Connection latency: 0x0000
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                     [hci0] 127.155360
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                     [hci0] 127.165646
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 128
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:22:D0:8D:22:6D (Polar Electro Oy)
        Connection interval: 67.50 msec (0x0036)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x01
< HCI Command: LE Read Remote Used Fe.. (0x08|0x0016) plen 2  [hci0] 127.166344
        Handle: 128
@ Device Connected: 00:22:D0:8D:22:6D (1) flags 0x0000
[bluetooth]# > HCI Event: Command Status (0x0f) plen 4                     [hci0] 127.185618
      LE Read Remote Used Features (0x08|0x0016) ncmd 1
        Status: Success (0x00)
[CHG] Device 00:22:D0:8D:22:6D Connected: yes
[Polar H7 8D226D1F]# [  148.400000] Bluetooth: SMP security requested but not available
> HCI Event: LE Meta Event (0x3e) plen 12                     [hci0] 127.365393
      LE Read Remote Used Features (0x04)
        Status: Success (0x00)
        Handle: 128
        Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          LE Encryption
< ACL Data TX: Handle 128 flags 0x00 dlen 7                   [hci0] 127.395186
      ATT: Exchange MTU Request (0x02) len 2
        Client RX MTU: 517
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 127.435292
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 7                   [hci0] 127.505784
      ATT: Exchange MTU Response (0x03) len 2
        Server RX MTU: 23
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 127.507210
      ATT: Read By Group Type Request (0x10) len 6
        Handle range: 0x0001-0xffff
        Attribute group type: Primary Service (0x2800)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 127.565376
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 24                  [hci0] 127.635360
      ATT: Read By Group Type Response (0x11) len 19
        Attribute data length: 6
        Attribute group list: 3 entries
        Handle range: 0x0001-0x000b
        UUID: Generic Access Profile (0x1800)
        Handle range: 0x000c-0x000f
        UUID: Generic Attribute Profile (0x1801)
        Handle range: 0x0010-0x0015
        UUID: Heart Rate (0x180d)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 127.636634
      ATT: Read By Group Type Request (0x10) len 6
        Handle range: 0x0016-0xffff
        Attribute group type: Primary Service (0x2800)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 127.705847
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 18                  [hci0] 127.775389
      ATT: Read By Group Type Response (0x11) len 13
        Attribute data length: 6
        Attribute group list: 2 entries
        Handle range: 0x0016-0x0024
        UUID: Device Information (0x180a)
        Handle range: 0x0025-0x0027
        UUID: Battery Service (0x180f)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 127.776892
      ATT: Read By Group Type Request (0x10) len 6
        Handle range: 0x0028-0xffff
        Attribute group type: Primary Service (0x2800)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 127.835226
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 26                  [hci0] 127.905871
      ATT: Read By Group Type Response (0x11) len 21
        Attribute data length: 20
        Attribute group list: 1 entry
        Handle range: 0x0028-0xffff
        UUID: Unknown (6217ff4b-fb31-1140-ad5a-a45545d7ecf3)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 127.907867
      ATT: Read By Group Type Request (0x10) len 6
        Handle range: 0x0001-0xffff
        Attribute group type: Secondary Service (0x2801)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 127.975425
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 128.045235
      ATT: Error Response (0x01) len 4
        Read By Group Type Request (0x10)
        Handle: 0x0001
        Error: Unsupported Group Type (0x10)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 128.046258
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0001-0x000b
        Attribute type: Include (0x2802)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 128.105842
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 128.175403
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0001
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 128.176807
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x000c-0x000f
        Attribute type: Include (0x2802)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 128.245280
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 128.315339
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x000c
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 128.316741
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0010-0x0015
        Attribute type: Include (0x2802)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 128.375385
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 128.445324
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0010
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 128.446438
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0016-0x0024
        Attribute type: Include (0x2802)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 128.515324
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 128.585301
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0016
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 128.586680
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0025-0x0027
        Attribute type: Include (0x2802)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 128.645360
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 128.715410
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0025
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 128.716792
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0028-0xffff
        Attribute type: Include (0x2802)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 128.785348
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 128.855366
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0028
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 128.856761
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0001-0x000b
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 128.915406
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 27                  [hci0] 128.985341
      ATT: Read By Type Response (0x09) len 22
        Attribute data length: 7
        Attribute data list: 3 entries
        Handle: 0x0002
        Value: 0e0300002a
        Handle: 0x0004
        Value: 020500012a
        Handle: 0x0006
        Value: 0a0700022a
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 128.986932
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0007-0x000b
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 129.055197
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 20                  [hci0] 129.125309
      ATT: Read By Type Response (0x09) len 15
        Attribute data length: 7
        Attribute data list: 2 entries
        Handle: 0x0008
        Value: 080900032a
        Handle: 0x000a
        Value: 020b00042a
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 129.126839
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x000b-0x000b
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 129.185314
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 129.255314
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x000b
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 129.256579
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x000c-0x000f
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 129.325387
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 13                  [hci0] 129.395318
      ATT: Read By Type Response (0x09) len 8
        Attribute data length: 7
        Attribute data list: 1 entry
        Handle: 0x000d
        Value: 200e00052a
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 129.396749
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x000e-0x000f
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 129.455304
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 129.525336
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x000e
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 9                   [hci0] 129.526782
      ATT: Find Information Request (0x04) len 4
        Handle range: 0x000f-0x000f
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 129.595399
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 10                  [hci0] 129.665307
      ATT: Find Information Response (0x05) len 5
        Format: UUID-16 (0x01)
        Handle: 0x000f
        UUID: Client Characteristic Configuration (0x2902)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 129.666754
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0010-0x0015
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 129.725372
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 20                  [hci0] 129.795296
      ATT: Read By Type Response (0x09) len 15
        Attribute data length: 7
        Attribute data list: 2 entries
        Handle: 0x0011
        Value: 101200372a
        Handle: 0x0014
        Value: 021500382a
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 129.796796
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0015-0x0015
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 129.865367
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 129.935360
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0015
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 9                   [hci0] 129.936833
      ATT: Find Information Request (0x04) len 4
        Handle range: 0x0013-0x0013
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 129.995346
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 10                  [hci0] 130.065273
      ATT: Find Information Response (0x05) len 5
        Format: UUID-16 (0x01)
        Handle: 0x0013
        UUID: Client Characteristic Configuration (0x2902)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 130.066458
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0016-0x0024
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 130.135303
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 27                  [hci0] 130.205378
      ATT: Read By Type Response (0x09) len 22
        Attribute data length: 7
        Attribute data list: 3 entries
        Handle: 0x0017
        Value: 021800232a
        Handle: 0x0019
        Value: 021a00242a
        Handle: 0x001b
        Value: 021c00252a
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 130.206783
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x001c-0x0024
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 130.265351
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 27                  [hci0] 130.335391
      ATT: Read By Type Response (0x09) len 22
        Attribute data length: 7
        Attribute data list: 3 entries
        Handle: 0x001d
        Value: 021e00262a
        Handle: 0x001f
        Value: 022000272a
        Handle: 0x0021
        Value: 022200282a
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 130.337000
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0022-0x0024
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 130.605387
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 13                  [hci0] 130.675323
      ATT: Read By Type Response (0x09) len 8
        Attribute data length: 7
        Attribute data list: 1 entry
        Handle: 0x0023
        Value: 022400292a
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 130.676749
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0024-0x0024
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 130.735264
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 130.805434
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0024
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 130.807092
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0025-0x0027
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 130.875346
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 13                  [hci0] 130.945396
      ATT: Read By Type Response (0x09) len 8
        Attribute data length: 7
        Attribute data list: 1 entry
        Handle: 0x0026
        Value: 022700192a
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 130.946899
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0027-0x0027
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 131.005365
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 131.075303
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0027
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 131.076788
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0028-0xffff
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 131.145193
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 27                  [hci0] 131.215333
      ATT: Read By Type Response (0x09) len 22
        Attribute data length: 21
        Attribute data list: 1 entry
        Handle: 0x0029
        Value: 022a002d8e7086d93a8013fbb1ecc84cff1762
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 131.216806
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x002a-0xffff
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 131.545435
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 27                  [hci0] 131.615402
      ATT: Read By Type Response (0x09) len 22
        Attribute data length: 21
        Attribute data list: 1 entry
        Handle: 0x002b
        Value: 282c00f3a1a8bdd37c2a7ed091bb914dff1762
< ACL Data TX: Handle 128 flags 0x00 dlen 11                  [hci0] 131.616852
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x002c-0xffff
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 131.685370
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 131.755371
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x002c
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 9                   [hci0] 131.756845
      ATT: Find Information Request (0x04) len 4
        Handle range: 0x002d-0xffff
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 131.815259
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 10                  [hci0] 131.885310
      ATT: Find Information Response (0x05) len 5
        Format: UUID-16 (0x01)
        Handle: 0x002d
        UUID: Client Characteristic Configuration (0x2902)
< ACL Data TX: Handle 128 flags 0x00 dlen 9                   [hci0] 131.886695
      ATT: Find Information Request (0x04) len 4
        Handle range: 0x002e-0xffff
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 131.955372
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9                   [hci0] 132.025333
      ATT: Error Response (0x01) len 4
        Find Information Request (0x04)
        Handle: 0x002e
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 9                   [hci0] 132.049013
      ATT: Write Request (0x12) len 4
        Handle: 0x000f
          Data: 0200
[CHG] Device 00:22:D0:8D:22:6D UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 00:22:D0:8D:22:6D UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 00:22:D0:8D:22:6D UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 00:22:D0:8D:22:6D UUIDs: 0000180d-0000-1000-8000-00805f9b34fb
[CHG] Device 00:22:D0:8D:22:6D UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device 00:22:D0:8D:22:6D UUIDs: 6217ff4b-fb31-1140-ad5a-a45545d7ecf3
[CHG] Device 00:22:D0:8D:22:6D ServicesResolved: yes
[Polar H7 8D226D1F]# > HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 132.085474
        Num handles: 1
        Handle: 128
        Count: 1
[NEW] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service000c
        Generic Attribute Profile
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service000c/char000d
        Service Changed
[NEW] Descriptor
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service000c/char000d/desc000f
        Client Characteristic Configuration
[NEW] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0010
        Heart Rate
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0010/char0011
        Heart Rate Measurement
[NEW] Descriptor
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0010/char0011/desc0013
        Client Characteristic Configuration
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0010/char0014
        Body Sensor Location
[NEW] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016
        Device Information
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char0017
        System ID
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char0019
        Model Number String
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char001b
        Serial Number String
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char001d
        Firmware Revision String
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char001f
        Hardware Revision String
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char0021
        Software Revision String
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char0023
        Manufacturer Name String
[NEW] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0025
        Battery Service
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0025/char0026
        Battery Level
[NEW] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0028
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0028/char0029
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0028/char002b
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0028/char002b/desc002d
        Client Characteristic Configuration
[Polar H7 8D226D1F]# > ACL Data RX: Handle 128 flags 0x02 dlen 5                   [hci0] 132.155101
      ATT: Write Response (0x13) len 0
< ACL Data TX: Handle 128 flags 0x00 dlen 7                   [hci0] 132.155551
      ATT: Read Request (0x0a) len 2
        Handle: 0x0003
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 132.225264
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 22                  [hci0] 132.295271
      ATT: Read Response (0x0b) len 17
        Value: 506f6c6172204837203844323236443146
< ACL Data TX: Handle 128 flags 0x00 dlen 7                   [hci0] 132.295908
      ATT: Read Request (0x0a) len 2
        Handle: 0x0005
> HCI Event: Number of Completed Packets (0x13) plen 5        [hci0] 132.355314
        Num handles: 1
        Handle: 128
        Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 7                   [hci0] 132.765416
      ATT: Read Response (0x0b) len 2
        Value: 4103
[CHG] Device 00:22:D0:8D:22:6D Appearance: 0x0341
[Polar H7 8D226D1F]# info 00:22:D0:8D:22:6D
Device 00:22:D0:8D:22:6D
        Name: Polar H7 8D226D1F
        Alias: Polar H7 8D226D1F
        Appearance: 0x0341
        Paired: no
        Trusted: no
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Heart Rate                (0000180d-0000-1000-8000-00805f9b34fb)
        UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (6217ff4b-fb31-1140-ad5a-a45545d7ecf3)
        ManufacturerData Key: 0x006b
        ManufacturerData Value: 0x33
        ManufacturerData Value: 0x0e
        ManufacturerData Value: 0x78
        ManufacturerData Value: 0x9d
[Polar H7 8D226D1F]# connect 00:22:D0:8D:22:6D
Attempting to connect to 00:22:D0:8D:22:6D
Connection successful
[Polar H7 8D226D1F]# exit
[DEL] Controller 00:50:43:F1:E9:4F ARTIK530 [default]
[DEL] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service000c
        Generic Attribute Profile
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service000c/char000d
        Service Changed
[DEL] Descriptor
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service000c/char000d/desc000f
        Client Characteristic Configuration
[DEL] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0010
        Heart Rate
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0010/char0011
        Heart Rate Measurement
[DEL] Descriptor
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0010/char0011/desc0013
        Client Characteristic Configuration
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0010/char0014
        Body Sensor Location
[DEL] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016
        Device Information
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char0017
        System ID
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char0019
        Model Number String
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char001b
        Serial Number String
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char001d
        Firmware Revision String
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char001f
        Hardware Revision String
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char0021
        Software Revision String
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0016/char0023
        Manufacturer Name String
[DEL] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0025
        Battery Service
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0025/char0026
        Battery Level
[DEL] Primary Service
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0028
        Vendor specific
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0028/char0029
        Vendor specific
[DEL] Characteristic
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0028/char002b
        Vendor specific
[DEL] Descriptor
        /org/bluez/hci0/dev_00_22_D0_8D_22_6D/service0028/char002b/desc002d
        Client Characteristic Configuration
[root@localhost ~]# hci< HCI Command: Disconnect (0x01|0x0006) plen 3                [hci0] 156.978499
        Handle: 128
        Reason: Remote User Terminated Connection (0x13)
> HCI Event: Command Status (0x0f) plen 4                     [hci0] 156.995345
      Disconnect (0x01|0x0006) ncmd 1
        Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4                [hci0] 157.005387
        Status: Success (0x00)
        Handle: 128
        Reason: Connection Terminated By Local Host (0x16)
@ Device Disconnected: 00:22:D0:8D:22:6D (1) reason 2

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

* Re: bug report - bluetoothctl ble connection
  2016-06-29  6:57 bug report - bluetoothctl ble connection Seulki Shin
@ 2016-06-29  7:09 ` Seulki Shin
  2016-06-29  7:48   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 4+ messages in thread
From: Seulki Shin @ 2016-06-29  7:09 UTC (permalink / raw)
  To: linux-bluetooth

* test envrionment:
Fedora release 22 (Twenty Two)
Kernel 4.1.15-00035-gd1a75bb on an armv7l (ttyAMA3)
[root@localhost ~]# bluetoothctl -v
5.39

> Hi Bluez,
>
> I found a pairing/connection bug in bluetoothctl.
>
> * Steps to reproduce:
>
> [bluetoothctl] scan on
> [bluetoothctl] pair ble_device
> [bluetoothctl] connect ble_device
> [bluetoothctl] exit
>
> Right after exiting from bluetoothctl, Disconnect happens like below.
>
> < HCI Command: Disconnect (0x01|0x0006) plen 3                [hci0] 156.978499
>         Handle: 128
>         Reason: Remote User Terminated Connection (0x13)
>> HCI Event: Command Status (0x0f) plen 4                     [hci0] 156.995345
>       Disconnect (0x01|0x0006) ncmd 1
>         Status: Success (0x00)
>> HCI Event: Disconnect Complete (0x05) plen 4                [hci0] 157.005387
>         Status: Success (0x00)
>         Handle: 128
>         Reason: Connection Terminated By Local Host (0x16)
> @ Device Disconnected: 00:22:D0:8D:22:6D (1) reason 2
>
> * My observation1:
> This is not the case of the hcitool. It works.
>
> * My observation2:
> Right after receiving GATT services, bluez does some more work.
> But the Value doesn't look like normal.
>
> ......
>
>> ACL Data RX: Handle 128 flags 0x02 dlen 22                  [hci0] 132.295271
>       ATT: Read Response (0x0b) len 17
>         Value: 506f6c6172204837203844323236443146
> ......
>
> * I attached full hci logs.
>
> Thanks,
> Seulki

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

* Re: bug report - bluetoothctl ble connection
  2016-06-29  7:09 ` Seulki Shin
@ 2016-06-29  7:48   ` Luiz Augusto von Dentz
  2016-07-01  7:37     ` Seulki Shin
  0 siblings, 1 reply; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2016-06-29  7:48 UTC (permalink / raw)
  To: Seulki Shin; +Cc: linux-bluetooth

Hi Seulki,

On Wed, Jun 29, 2016 at 10:09 AM, Seulki Shin <sskcorea@gmail.com> wrote:
> * test envrionment:
> Fedora release 22 (Twenty Two)
> Kernel 4.1.15-00035-gd1a75bb on an armv7l (ttyAMA3)
> [root@localhost ~]# bluetoothctl -v
> 5.39
>
>> Hi Bluez,
>>
>> I found a pairing/connection bug in bluetoothctl.
>>
>> * Steps to reproduce:
>>
>> [bluetoothctl] scan on
>> [bluetoothctl] pair ble_device
>> [bluetoothctl] connect ble_device
>> [bluetoothctl] exit
>>
>> Right after exiting from bluetoothctl, Disconnect happens like below.
>>
>> < HCI Command: Disconnect (0x01|0x0006) plen 3                [hci0] 156.978499
>>         Handle: 128
>>         Reason: Remote User Terminated Connection (0x13)
>>> HCI Event: Command Status (0x0f) plen 4                     [hci0] 156.995345
>>       Disconnect (0x01|0x0006) ncmd 1
>>         Status: Success (0x00)
>>> HCI Event: Disconnect Complete (0x05) plen 4                [hci0] 157.005387
>>         Status: Success (0x00)
>>         Handle: 128
>>         Reason: Connection Terminated By Local Host (0x16)
>> @ Device Disconnected: 00:22:D0:8D:22:6D (1) reason 2
>>
>> * My observation1:
>> This is not the case of the hcitool. It works.

This works as intended as we track down the requester of connection
attempt if it exits before the connection is made we would stop
connecting.

>> * My observation2:
>> Right after receiving GATT services, bluez does some more work.
>> But the Value doesn't look like normal.
>>
>> ......
>>
>>> ACL Data RX: Handle 128 flags 0x02 dlen 22                  [hci0] 132.295271
>>       ATT: Read Response (0x0b) len 17
>>         Value: 506f6c6172204837203844323236443146
>> ......

Well this is a response to a read, if there is something wrong with
the value then either the attribute handle is not correct or it is the
remote fault.

>> * I attached full hci logs.
>>
>> Thanks,
>> Seulki
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Luiz Augusto von Dentz

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

* Re: bug report - bluetoothctl ble connection
  2016-06-29  7:48   ` Luiz Augusto von Dentz
@ 2016-07-01  7:37     ` Seulki Shin
  0 siblings, 0 replies; 4+ messages in thread
From: Seulki Shin @ 2016-07-01  7:37 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

Thanks for reply.
You are always very helpful and I appreciate that.

>>> ......
>>>
>>>> ACL Data RX: Handle 128 flags 0x02 dlen 22                  [hci0] 132.295271
>>>       ATT: Read Response (0x0b) len 17
>>>         Value: 506f6c6172204837203844323236443146
>>> ......
>
> Well this is a response to a read, if there is something wrong with
> the value then either the attribute handle is not correct or it is the
> remote fault.
>
I don't think remote device has a problem because I had tested this
device with prior version of bluez (5.29 and 5.39) and there was no
problem.

Thanks anyway,
Seulki

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

end of thread, other threads:[~2016-07-01  7:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29  6:57 bug report - bluetoothctl ble connection Seulki Shin
2016-06-29  7:09 ` Seulki Shin
2016-06-29  7:48   ` Luiz Augusto von Dentz
2016-07-01  7:37     ` Seulki Shin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.