Hi Marcel, Thanks a lot for sharing valuable information. On Tue, Jun 28, 2016 at 11:36 PM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote: > Hi Seulki, > >> Recently, I have noticed supervision timeout is not enough to pair devices. >> >> How can I configure supervision timeout? Is there any configuration file? >> >> First, I have checked "main.conf" but I couldn't find any related properties. >> I also found /sys/kernel/debug/bluetooth/hci0 has a bunch of system settings. >> But I am not sure editing those files is a right approach. > > the supervision timeout will trigger if the baseband will not even ack packets. A longer timeout is most likely not going to help you either to pair. Why do you think it would? > > Can you provide btmon traces to see why a disconnect is happening? > > Regards > > Marcel > 1. I thought Supervision timeout was setting up too short like below. (420msec) < HCI Command: LE Create Connection (0x08|0x000d) plen 25 [hci0] 1360.262067 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) 2. I found Attribute Not Found error message which had not been noticed before. < ACL Data TX: Handle 128 flags 0x00 dlen 11 [hci0] 1363.521878 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] 1363.591184 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1363.660998 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] 1363.661926 ATT: Find Information Request (0x04) len 4 Handle range: 0x000f-0x000f > HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 1363.730944 Num handles: 1 Handle: 128 Count: 1 3. Because of Connection Timeout message, I suspected supervision timeout. > HCI Event: Disconnect Complete (0x05) plen 4 [hci0] 1364.131002 Status: Success (0x00) Handle: 128 Reason: Connection Timeout (0x08) @ Device Disconnected: 00:22:D0:8D:22:6D (1) reason 1 4. I attached full hci dump. 5. Version information: Fedora release 22 (Twenty Two) Kernel 4.1.15-00035-gd1a75bb on an armv7l (ttyAMA3) [root@localhost ~]# bluetoothctl -v 5.39 Thanks, Seulki
< HCI Command: LE Create Connection (0x08|0x000d) plen 25 [hci0] 1360.262067 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] 1360.281019 LE Create Connection (0x08|0x000d) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 19 [hci0] 1360.291040 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 F.. (0x08|0x0016) plen 2 [hci0] 1360.291734 Handle: 128 @ Device Connected: 00:22:D0:8D:22:6D (1) flags 0x0000 > HCI Event: Command Status (0x0f) plen 4 [hci0] 1360.311306 LE Read Remote Used Features (0x08|0x0016) ncmd 1 Status: Success (0x00) > HCI Event: LE Meta Event (0x3e) plen 12 [hci0] 1360.551105 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] 1360.580324 ATT: Exchange MTU Request (0x02) len 2 Client RX MTU: 517 > HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 1360.960945 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 7 [hci0] 1360.971065 ATT: Exchange MTU Response (0x03) len 2 Server RX MTU: 23 < ACL Data TX: Handle 128 flags 0x00 dlen 11 [hci0] 1360.971966 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] 1361.031002 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 24 [hci0] 1361.091078 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] 1361.091971 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] 1361.160941 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 18 [hci0] 1361.230942 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] 1361.231805 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] 1361.430855 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 26 [hci0] 1361.501505 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] 1361.503739 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] 1361.571086 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1361.630877 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] 1361.631599 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] 1361.701485 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1361.771009 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] 1361.771853 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] 1361.970949 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1361.981062 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] 1361.981904 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] 1362.040940 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1362.110958 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] 1362.111818 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] 1362.171004 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1362.240975 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] 1362.241821 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] 1362.440869 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1362.511003 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] 1362.511848 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] 1362.580974 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1362.650997 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] 1362.651848 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] 1362.710952 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 27 [hci0] 1362.921008 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] 1362.921901 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] 1362.980995 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 20 [hci0] 1363.050994 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] 1363.051867 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] 1363.120946 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1363.250965 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] 1363.251843 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] 1363.460868 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 13 [hci0] 1363.521125 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] 1363.521878 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] 1363.591184 Num handles: 1 Handle: 128 Count: 1 > ACL Data RX: Handle 128 flags 0x02 dlen 9 [hci0] 1363.660998 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] 1363.661926 ATT: Find Information Request (0x04) len 4 Handle range: 0x000f-0x000f > HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 1363.730944 Num handles: 1 Handle: 128 Count: 1 > HCI Event: Disconnect Complete (0x05) plen 4 [hci0] 1364.131002 Status: Success (0x00) Handle: 128 Reason: Connection Timeout (0x08) @ Device Disconnected: 00:22:D0:8D:22:6D (1) reason 1