You are not logged in.

#1 2018-01-12 07:46:03

robsmith11
Member
Registered: 2016-09-10
Posts: 23

Frequent bluetooth keyboard disconnects

I have two bluetooth keyboards that both work perfectly with my android tablet, but randomly every 5-15 minutes will stop responding for about 15 seconds before reconnecting when I use them with my Dell XPS 13 9350 laptop running Arch.

This laptop came with a Broadcom wifi/bluetooth chip, which I thought might have buggy drivers/firmware, so I swapped it for a new Intel chip, but my problem persists.

When this issue occurs, I see this output in dmesg:

[42712.221880] hid-generic 0005:04E8:7021.0004: unknown main item tag 0x0
[42712.222147] input: Bluetooth 3.0 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/bluetooth/hci0/hci0:256/0005:04E8:7021.0004/input/input30
[42712.224964] hid-generic 0005:04E8:7021.0004: input,hidraw1: BLUETOOTH HID v0.01 Keyboard [Bluetooth 3.0 Keyboard] on 00:28:f8:d6:c0:3f

Is there anything else I can do to debug this issue?


EDIT:
Here's the output of btmon during one of the random disconnect (note the time between last recorded key press and it recovering is almost exactly 20 seconds..):

> ACL Data RX: Handle 256 flags 0x02 dlen 14                                                                                #236 [hci0] 163.218718
      Channel: 65 len 10 [PSM 0 mode 0] {chan 0}
        a1 01 00 00 2b 00 00 00 00 00                    ....+.....
> ACL Data RX: Handle 256 flags 0x02 dlen 14                                                                                #237 [hci0] 163.421257
      Channel: 65 len 10 [PSM 0 mode 0] {chan 0}
        a1 01 00 00 00 00 00 00 00 00                    ..........
> ACL Data RX: Handle 256 flags 0x02 dlen 14                                                                                #238 [hci0] 164.096246
      Channel: 65 len 10 [PSM 0 mode 0] {chan 0}
        a1 01 00 00 28 00 00 00 00 00                    ....(.....
> ACL Data RX: Handle 256 flags 0x02 dlen 14                                                                                #239 [hci0] 164.254743
      Channel: 65 len 10 [PSM 0 mode 0] {chan 0}
        a1 01 00 00 00 00 00 00 00 00                    ..........
> HCI Event: Disconnect Complete (0x05) plen 4                                                                              #240 [hci0] 184.256542
        Status: Success (0x00)
        Handle: 256
        Reason: Connection Timeout (0x08)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                                       {0x0003} [hci0] 184.256603
        BR/EDR Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Reason: Connection timeout (0x01)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                                       {0x0002} [hci0] 184.256603
        BR/EDR Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Reason: Connection timeout (0x01)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                                       {0x0001} [hci0] 184.256603
        BR/EDR Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Reason: Connection timeout (0x01)
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1                                                                       #241 [hci0] 184.371099
        Scan enable: Page Scan (0x02)
> HCI Event: Command Complete (0x0e) plen 4                                                                                 #242 [hci0] 184.372363
      Write Scan Enable (0x03|0x001a) ncmd 2
        Status: Success (0x00)
> HCI Event: Connect Request (0x04) plen 10                                                                                 #243 [hci0] 185.701541
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Class: 0x000540
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x10
        Link type: ACL (0x01)
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7                                                               #244 [hci0] 185.701622
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                                                                                   #245 [hci0] 185.702374
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8                                                                                      #246 [hci0] 185.844374
        Status: Success (0x00)
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Role: Master (0x00)
> HCI Event: Connect Complete (0x03) plen 11                                                                                #247 [hci0] 186.030533
        Status: Success (0x00)
        Handle: 256
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2                                                          #248 [hci0] 186.030714
        Handle: 256
> HCI Event: Command Status (0x0f) plen 4                                                                                   #249 [hci0] 186.031365
      Read Remote Supported Features (0x01|0x001b) ncmd 1
        Status: Success (0x00)
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1                                                                       #250 [hci0] 186.031448
        Scan enable: No Scans (0x00)
> HCI Event: Command Complete (0x0e) plen 4                                                                                 #251 [hci0] 186.033358
      Write Scan Enable (0x03|0x001a) ncmd 2
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                                                                 #252 [hci0] 186.036421
        Handle: 256
        Max slots: 5
> HCI Event: Read Remote Supported Features (0x0b) plen 11                                                                  #253 [hci0] 186.039422
        Status: Success (0x00)
        Handle: 256
        Features: 0xbf 0x06 0x86 0x78 0x18 0x1e 0x59 0x87
          3 slot packets
          5 slot packets
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Sniff mode
          Power control requests
          Channel quality driven data rate (CQDDR)
          Paging parameter negotiation
          Power control
          Broadcast Encryption
          Enhanced inquiry scan
          Interlaced inquiry scan
          Interlaced page scan
          RSSI with inquiry results
          AFH capable slave
          AFH classification slave
          Sniff subrating
          Pause encryption
          AFH capable master
          AFH classification master
          Extended Inquiry Response
          Secure Simple Pairing
          Encapsulated PDU
          Non-flushable Packet Boundary Flag
          Link Supervision Timeout Changed Event
          Inquiry TX Power Level
          Enhanced Power Control
          Extended features
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3                                                           #254 [hci0] 186.039443
        Handle: 256
        Page: 1
> HCI Event: Command Status (0x0f) plen 4                                                                                   #255 [hci0] 186.040365
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Extended Features (0x23) plen 13                                                                   #256 [hci0] 186.046422
        Status: Success (0x00)
        Handle: 256
        Page: 1/1
        Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          Secure Simple Pairing (Host Support)
< HCI Command: Remote Name Request (0x01|0x0019) plen 10                                                                    #257 [hci0] 186.046465
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 256 flags 0x00 dlen 10                                                                                #258 [hci0] 186.046471
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
> HCI Event: Command Status (0x0f) plen 4                                                                                   #259 [hci0] 186.047380
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Link Key Request (0x17) plen 6                                                                                 #260 [hci0] 186.050413
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22                                                                 #261 [hci0] 186.050437
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Link key: f1d28a086486e3cacef8bfa597d32a59
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                      #262 [hci0] 186.051353
        Num handles: 1
        Handle: 256
        Count: 1
> ACL Data RX: Handle 256 flags 0x02 dlen 16                                                                                #263 [hci0] 186.052359
      L2CAP: Information Response (0x0b) ident 1 len 8
        Type: Extended features supported (0x0002)
        Result: Success (0x0000)
        Features: 0x00000280
          Fixed Channels
          Unicast Connectionless Data Reception
> HCI Event: Command Complete (0x0e) plen 10                                                                                #264 [hci0] 186.052367
      Link Key Request Reply (0x01|0x000b) ncmd 1
        Status: Success (0x00)
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
< ACL Data TX: Handle 256 flags 0x00 dlen 10                                                                                #265 [hci0] 186.052395
      L2CAP: Information Request (0x0a) ident 2 len 2
        Type: Fixed channels supported (0x0003)
> ACL Data RX: Handle 256 flags 0x02 dlen 20                                                                                #266 [hci0] 186.057128
      L2CAP: Information Response (0x0b) ident 2 len 12
        Type: Fixed channels supported (0x0003)
        Result: Success (0x0000)
        Channels: 0x0000000000000006
          L2CAP Signaling (BR/EDR)
          Connectionless reception
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                      #267 [hci0] 186.060426
        Num handles: 1
        Handle: 256
        Count: 1
> HCI Event: Remote Name Req Complete (0x07) plen 255                                                                       #268 [hci0] 186.065422
        Status: Success (0x00)
        Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Name: Bluetooth 3.0 Keyboard
@ MGMT Event: Device Connected (0x000b) plen 42                                                                         {0x0003} [hci0] 186.065468
        BR/EDR Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Flags: 0x00000000
        Data length: 29
        Name (complete): Bluetooth 3.0 Keyboard
        Class: 0x000540
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x10
@ MGMT Event: Device Connected (0x000b) plen 42                                                                         {0x0002} [hci0] 186.065468
        BR/EDR Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Flags: 0x00000000
        Data length: 29
        Name (complete): Bluetooth 3.0 Keyboard
        Class: 0x000540
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x10
@ MGMT Event: Device Connected (0x000b) plen 42                                                                         {0x0001} [hci0] 186.065468
        BR/EDR Address: 20:73:65:4C:3B:04 (OUI 20-73-65)
        Flags: 0x00000000
        Data length: 29
        Name (complete): Bluetooth 3.0 Keyboard
        Class: 0x000540
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x10
> HCI Event: Encryption Change (0x08) plen 4                                                                                #269 [hci0] 186.090432
        Status: Success (0x00)
        Handle: 256
        Encryption: Enabled with E0 (0x01)
< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2                                                                #270 [hci0] 186.090502
        Handle: 256
> HCI Event: Command Complete (0x0e) plen 7                                                                                 #271 [hci0] 186.091359
      Read Encryption Key Size (0x05|0x0008) ncmd 1
        Status: Success (0x00)
        Handle: 256
        Key size: 16

EDIT2:
I've enabled debugging in bluetooth.service and get a little more output:

Jan 12 10:16:20 xps bluetoothd[7937]: src/adapter.c:dev_disconnected() Device 20:73:65:4C:3B:04 disconnected, reason 1
Jan 12 10:16:20 xps bluetoothd[7937]: src/adapter.c:adapter_remove_connection()
Jan 12 10:16:20 xps bluetoothd[7937]: plugins/policy.c:disconnect_cb() reason 1
Jan 12 10:16:20 xps bluetoothd[7937]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 20:73:65:4C:3B:04 type 0 status 0xe
Jan 12 10:16:20 xps bluetoothd[7937]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
Jan 12 10:16:20 xps bluetoothd[7937]: src/device.c:device_bonding_failed() status 14
Jan 12 10:16:20 xps bluetoothd[7937]: src/adapter.c:resume_discovery()
Jan 12 10:16:20 xps bluetoothd[7937]: profiles/input/device.c:ctrl_watch_cb() Device 20:73:65:4C:3B:04 disconnected
Jan 12 10:16:20 xps bluetoothd[7937]: profiles/input/device.c:intr_watch_cb() Device 20:73:65:4C:3B:04 disconnected
Jan 12 10:16:20 xps bluetoothd[7937]: src/service.c:change_state() 0x55764aad6840: device 20:73:65:4C:3B:04 profile input-hid state changed: connec
Jan 12 10:16:20 xps bluetoothd[7937]: profiles/input/device.c:input_device_enter_reconnect_mode() path=/org/bluez/hci0/dev_20_73_65_4C_3B_04 reconn
Jan 12 10:16:22 xps bluetoothd[7937]: src/adapter.c:connected_callback() hci0 device 20:73:65:4C:3B:04 connected eir_len 29
Jan 12 10:16:22 xps bluetoothd[7937]: profiles/input/server.c:connect_event_cb() Incoming connection from 20:73:65:4C:3B:04 on PSM 17
Jan 12 10:16:22 xps bluetoothd[7937]: profiles/input/device.c:input_device_set_channel() idev 0x55764aadab40 psm 17
Jan 12 10:16:22 xps bluetoothd[7937]: profiles/input/server.c:confirm_event_cb()
Jan 12 10:16:22 xps bluetoothd[7937]: profiles/input/server.c:connect_event_cb() Incoming connection from 20:73:65:4C:3B:04 on PSM 19
Jan 12 10:16:22 xps bluetoothd[7937]: profiles/input/device.c:input_device_set_channel() idev 0x55764aadab40 psm 19
Jan 12 10:16:22 xps bluetoothd[7937]: src/service.c:change_state() 0x55764aad6840: device 20:73:65:4C:3B:04 profile input-hid state changed: discon
Jan 12 10:16:22 xps bluetoothd[7937]: plugins/policy.c:service_cb() Added input-hid reconnect 0
Jan 12 10:16:22 xps bluetoothd[7937]: profiles/input/device.c:encrypt_notify()
Jan 12 10:16:22 xps kernel: hid-generic 0005:04E8:7021.000F: unknown main item tag 0x0
Jan 12 10:16:22 xps kernel: input: Bluetooth 3.0 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/bluetooth/hci0/hci0:256/0005:04E8:70
Jan 12 10:16:22 xps kernel: hid-generic 0005:04E8:7021.000F: input,hidraw1: BLUETOOTH HID v0.01 Keyboard [Bluetooth

EDIT3:
I'm pretty sure this a firmware bug for the Intel 8265 wireless chip I bought.. where should I report it?

Last edited by robsmith11 (2018-01-12 10:54:58)

Offline

Board footer

Powered by FluxBB