This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE HID device fails to pair with Windows

Hello,

I'm working on a HID BLE device and it seems to work good with iOS devices. It fails to pair with Window. I'm adding what I can see with the sniffer. Basically after the `CONNECT_REQ` the communication seems to only transfer `Empty PDU messages`.

1	0.000000	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
2	0.001475	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
3	0.046830	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
4	0.051696	IntelCor_a0:f8:ec	06:05:04:9a:58:02	LE LL	38	SCAN_REQ
5	0.056580	06:05:04:9a:58:02	Broadcast	LE LL	37	SCAN_RSP
6	0.058140	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
7	0.058980	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
8	0.096552	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
9	0.097896	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
10	0.099359	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
11	0.146002	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
12	0.148605	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
13	0.149704	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
14	0.206132	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
15	0.207812	IntelCor_a0:f8:ec	06:05:04:9a:58:02	LE LL	60	CONNECT_REQ
16	4.766716	Master_0x69d449bc	Slave_0x69d449bc	LE LL	26	Empty PDU
17	4.768141	Slave_0x69d449bc	Master_0x69d449bc	LE LL	26	Empty PDU
18	4.826540	Master_0x69d449bc	Slave_0x69d449bc	LE LL	26	Empty PDU
19	4.827472	Slave_0x69d449bc	Master_0x69d449bc	LE LL	26	Empty PDU
20	5.007735	Master_0x69d449bc	Slave_0x69d449bc	LE LL	26	Empty PDU
21	5.008851	Slave_0x69d449bc	Master_0x69d449bc	LE LL	26	Empty PDU
22	5.067638	Master_0x69d449bc	Slave_0x69d449bc	LE LL	26	Empty PDU

For comparison here is pairing with iOS device:

1	0.000000	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
2	0.043640	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
3	0.044861	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
4	0.046473	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
5	0.093689	06:05:04:9a:58:02	Broadcast	LE LL	43	ADV_IND
6	0.098054	5f:e0:7d:53:8d:50	06:05:04:9a:58:02	LE LL	60	CONNECT_REQ
7	0.098754	Master_0x50657368	Slave_0x50657368	LE LL	32	Control Opcode: LL_VERSION_IND
8	0.099194	Slave_0x50657368	Master_0x50657368	LE LL	26	Empty PDU
9	0.126484	Master_0x50657368	Slave_0x50657368	LE LL	26	Empty PDU
10	0.127630	Slave_0x50657368	Master_0x50657368	LE LL	32	Control Opcode: LL_VERSION_IND
11	0.129010	Master_0x50657368	Slave_0x50657368	LE LL	26	Empty PDU
12	0.130463	Slave_0x50657368	Master_0x50657368	LE LL	26	Empty PDU
13	0.154594	Master_0x50657368	Slave_0x50657368	LE LL	35	Control Opcode: LL_FEATURE_REQ
14	0.155482	Slave_0x50657368	Master_0x50657368	LE LL	26	Empty PDU
15	0.183745	Master_0x50657368	Slave_0x50657368	LE LL	26	Empty PDU
16	0.186875	Slave_0x50657368	Master_0x50657368	LE LL	35	Control Opcode: LL_FEATURE_RSP
17	0.187896	Master_0x50657368	Slave_0x50657368	LE LL	26	Empty PDU
18	0.188823	Slave_0x50657368	Master_0x50657368	LE LL	26	Empty PDU

Any idea what could be happening here? Tell me if there is something more I can provide to help.

Parents Reply
  • Any idea why it says Data: missing?

    It looks like the windows computer doesn't understand that this is in fact a keyboard, and that it doesn't do the service discovery. Perhaps you can test the ble_app_hids_keyboard example, and look at how it sets up the advertising data? I suggest you try including the uuid in the advertisement, so that the computer understands what sort of device it is.

    BR,

    Edvin

Children
  • I've modified the advertising data. It doesn't send the Manufacturer specific data and it uses the Appearance AD packet set to Generic HID device. I've looked up this structure from a Logitech BLE HID device.

    I've noticed that the BLE device doesn't receive the DM_CONN_UPDATE_IND. It says that the pairing completed successfully but that's it. When connecting to iOS it gets DM_CONN_UPDATE_IND and things continue properly. Windows doesn't use the RPA address while iOS does. That's the only difference that comes to mind right now.

  • I suggest you check by using the advertisement from the ble_app_hids_keyboard example, and see if the windows PC connects properly to that. If yes, then there is something missing that the windows is looking for. If not, then there may be something weird with the computer itself. Start taking away things from the advertisement packet until you are left with what you are currently using. What do you remove that makes the computer not do the service discovery?

    Michalc said:
    I've noticed that the BLE device doesn't receive the DM_CONN_UPDATE_IND.

    Is that the Device Manager event? Or where does this event occur?

    Did you try to completely erase the board (nrfjprog --eraseall) before programming it again and connecting to the windows PC? Don't connect to the mac in between. Perhaps it is a device manager bonding related issue. 

Related