Keyboard very slow to reconnect after sleep using inbuilt Pi 3 bluetooth

Hi Folks,

I am using a Rii Mini i8+ little bluetooth keyboard connecting to the built in bluetooth adapter in my Pi 3. It works great except for one rather frustrating detail. Like most bluetooth devices, the keyboard drops into power saving/sleep mode after a few minutes of no use. This is expected, and, normally these sorts of things take a second or 2 to reconnect, which is fine. In this case however it can take up to 20 seconds, which is rather annoying :slight_smile:

In the kernel log (dmesg), it shows that it is creating a new input device on each connect, as per the paste below.

Has anyone else had similar issues? I have 2 different Pi 3s which I installed independently which both have the same issue. I have a second Rii Mini i8+ arriving soon, so I can test that it isn’t the keyboard, but I don’t think it is.

If anyone has any ideas, I’d be delighted to hear them.

There are 2 points of interest in the log below:

  1. The following error is repeated on each sleep/reconnect cycle
    apple 0005:05AC:022C.0016: unknown main item tag 0x0

  2. A new device is created on each reconnect
    /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.0015/input/input22 /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.0016/input/input23

Note particularly 0005:05AC:022C.00 15 → 0005:05AC:022C.00 16
and
input 22 → input 23

[183058.227319] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.0015/input/input22
    [183058.229194] apple 0005:05AC:022C.0015: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0
    [198394.997020] apple 0005:05AC:022C.0016: unknown main item tag 0x0
    [198394.997462] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.0016/input/input23
    [198394.998395] apple 0005:05AC:022C.0016: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0
    [199100.886741] apple 0005:05AC:022C.0017: unknown main item tag 0x0
    [199100.887208] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.0017/input/input24
    [199100.888124] apple 0005:05AC:022C.0017: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0
    [200234.921150] apple 0005:05AC:022C.0018: unknown main item tag 0x0
    [200234.921926] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.0018/input/input25
    [200234.923592] apple 0005:05AC:022C.0018: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0
    [202425.309642] apple 0005:05AC:022C.0019: unknown main item tag 0x0
    [202425.310114] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.0019/input/input26
    [202425.311223] apple 0005:05AC:022C.0019: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0
    [204517.092344] apple 0005:05AC:022C.001A: unknown main item tag 0x0
    [204517.093201] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.001A/input/input27
    [204517.094835] apple 0005:05AC:022C.001A: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0
    [243062.539668] apple 0005:05AC:022C.001B: unknown main item tag 0x0
    [243062.540513] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.001B/input/input28
    [243062.542125] apple 0005:05AC:022C.001B: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0
    [245677.684981] apple 0005:05AC:022C.001C: unknown main item tag 0x0
    [245677.685744] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.001C/input/input29
    [245677.687330] apple 0005:05AC:022C.001C: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0
    [246814.122126] apple 0005:05AC:022C.001D: unknown main item tag 0x0
    [246814.122622] input: Bluetooth 3.0 Macro Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:05AC:022C.001D/input/input30
    [246814.125063] apple 0005:05AC:022C.001D: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth 3.0 Macro Keyboard] on b8:27:eb:9e:b3:b0

Thanks! :grinning:

Kent.

It’s better to test with a completely different device.

  • Test with a different device, like a standard BT keyboard. If issue persists, try another Bluetooth adapter.
  • Post complete log files, instead of snippets, as the current level of information of detail provided isn’t sufficient.

It may be a quirk of this remote controller.

Sam

I’ll get on the case - I’m travelling now, but should be able to check it out on the weekend.

Hi,
I have same problem with my Samsung keyboard since the beginning of using it more than one year ago. I changed the Raspberry 2 (I had usb bluetooth adapter) with Raspberry 3 that have internal Bluetooth adapter and problem persist.
Here is my dmesg:
[852946.506106] Bluetooth: hci0: Frame reassembly failed (-84)
[852946.506133] Bluetooth: hci0: Frame reassembly failed (-84)
[853206.617242] sd 5:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x08
[853206.617272] sd 5:0:0:0: [sda] tag#0 Sense Key : 0x4 [current] [descriptor]
[853206.617288] sd 5:0:0:0: [sda] tag#0 ASC=0x0 ASCQ=0x0
[853206.617309] sd 5:0:0:0: [sda] tag#0 CDB: opcode=0xa1 a1 06 20 00 00 00 00 00 00 e5 00 00
[854461.931557] hid-generic 0005:04E8:2075.0003: unknown main item tag 0x0
[854461.931914] input: Samsung Wireless Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:04E8:2075.0003/input/input4
[854461.932759] hid-generic 0005:04E8:2075.0003: input,hidraw0: BLUETOOTH HID v1.00 Keyboard [Samsung Wireless Keyboard] on b8:27:eb:d1:e2:28
[855006.624107] sd 5:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x08
[855006.624140] sd 5:0:0:0: [sda] tag#0 Sense Key : 0x4 [current] [descriptor]
[855006.624157] sd 5:0:0:0: [sda] tag#0 ASC=0x0 ASCQ=0x0
[855006.624178] sd 5:0:0:0: [sda] tag#0 CDB: opcode=0xa1 a1 06 20 00 00 00 00 00 00 e5 00 00
[855484.144017] hid-generic 0005:04E8:2075.0004: unknown main item tag 0x0
[855484.144373] input: Samsung Wireless Keyboard as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:04E8:2075.0004/input/input5
[855484.145230] hid-generic 0005:04E8:2075.0004: input,hidraw0: BLUETOOTH HID v1.00 Keyboard [Samsung Wireless Keyboard] on b8:27:eb:d1:e2:28