We've built a device with the nRF5 17.1.0 SDK on nRF52832 which operates as a HID keyboard. On iOS and Android this is working fine, and it's working fine sometimes on Windows, but not all the time, particularly on slower machines, so I'm trying to figure out what is failing. I've used the Bluetooth Virtual Sniffer (https://docs.microsoft.com/en-gb/windows-hardware/drivers/bluetooth/testing-btp-tools-btvs) to get a packet trace which I've attached (Wireshark). This is from when it is working fine as I can't reproduce the issues locally, but I'm still seeing a number of error responses such as to this find by type value request:
119 23.654527 localhost () c0:7d:0e:48:3b:0b (BT500S-6 v3.0.7-b.1 FAA6) ATT 18 Sent Find By Type Value Request, GATT Primary Service Declaration, Handles: 0x000e..0xffff
128 23.715589 c0:7d:0e:48:3b:0b (BT500S-6 v3.0.7-b.1 FAA6) localhost () ATT 14 Rcvd Error Response - Attribute Not Found, Handle: 0x000e (Unknown)
Why would the softdevice send that response? It seems windows is requesting primary services in a range 0xe to 0xffff - all my services are primary services in that range, but the SD returns attribute not found. For info, here is my list of attributes:
0x0E (14): Service Battery handle 0x10 (16): Service Battery Characteristic Battery value handle 0x11 (17): Service Battery Characteristic Battery CCCD handle 0x25 (37): Service AT State handle 0x27 (39): Service AT State Characteristic Digital port state value handle 0x28 (40): Service AT State Characteristic Digital port state CCCD handle 0x2A (42): Service AT State Characteristic Analog port state value handle 0x2B (43): Service AT State Characteristic Analog port state CCCD handle 0x2D (45): Service AT State Characteristic Device mode value handle 0x2E (46): Service AT State Characteristic Device mode CCCD handle 0x2F (47): Service AT Charging handle 0x31 (49): Service AT Charging Characteristic Charging state value handle 0x32 (50): Service AT Charging Characteristic Charging state CCCD handle 0x33 (51): Service AT Info handle 0x35 (53): Service AT Info Characteristic Mode features value handle 0x37 (55): Service AT Info Characteristic Digital availability value handle 0x39 (57): Service AT Info Characteristic Analog availability value handle 0x3E (62): Service AT Info Characteristic Pairing state value handle 0x3F (63): Service AT Info Characteristic Pairing state CCCD handle 0x40 (64): Service AT OTA handle 0x42 (66): Service AT OTA Characteristic SDK version value handle 0x43 (67): Service AT Parameters handle 0x45 (69): Service AT Parameters Characteristic Connection control value handle 0x46 (70): Service AT Programming handle 0x48 (72): Service AT Programming Characteristic Digital port config value handle 0x4A (74): Service AT Programming Characteristic Digital port config max length value handl 0x4C (76): Service AT Programming Characteristic Analog port config value handle 0x4E (78): Service AT Programming Characteristic Delay before repeat value handle 0x50 (80): Service AT Programming Characteristic Repeat rate value handle 0x52 (82): Service AT Programming Characteristic Idle power off value handle 0x54 (84): Service AT Programming Characteristic Connection configuration value handle 0x56 (86): Service AT Programming Characteristic Pairing method value handle 0x58 (88): Service AT Programming Characteristic Debounce time value handle 0x5A (90): Service AT Programming Characteristic OEM value handle 0x5C (92): Service AT Programming Characteristic Analog input config value handle 0x5E (94): Service AT Programming Characteristic Analog action value handle 0x5F (95): Service MIDI handle 0x61 (97): Service MIDI Characteristic MIDI value handle 0x62 (98): Service MIDI Characteristic MIDI CCCD handle 0x63 (99): Service HID handle 0x65 (101): Service HID Characteristic Protocol mode value handle 0x67 (103): Service HID Characteristic Output report 0 value handle 0x68 (104): Service HID Characteristic Output report 0 CCCD handle 0x74 (116): Service HID Characteristic Output report 0 report reference handle 0x6B (107): Service HID Characteristic Output report 0 value handle 0x6C (108): Service HID Characteristic Output report 0 CCCD handle 0x74 (116): Service HID Characteristic Output report 0 report reference handle 0x6F (111): Service HID Characteristic Output report 0 value handle 0x70 (112): Service HID Characteristic Output report 0 CCCD handle 0x74 (116): Service HID Characteristic Output report 0 report reference handle 0x73 (115): Service HID Characteristic Output report 0 value handle 0x74 (116): Service HID Characteristic Output report 0 report reference handle 0x76 (118): Service HID Characteristic Report map value handle 0x78 (120): Service HID Characteristic Boot kb input value handle 0x79 (121): Service HID Characteristic Boot kb input CCCD handle 0x7B (123): Service HID Characteristic Boot kb output value handle 0x7D (125): Service HID Characteristic Boot mouse input value handle 0x7E (126): Service HID Characteristic Boot mouse input CCCD handle 0x80 (128): Service HID Characteristic Information value handle 0x82 (130): Service HID Characteristic Control point value handle