Getting two instances of hids_mouse on nrf connect

When I run the peripheral_hids_mouse sample, I scan/connect on nrf connect and see an instance of the peripheral. then if I clear and scan again in the Discovered devices panel, I see another Nordic_HIDS_mouse and can connect with it again. This only happens twice. The IDs are different (see image below), and neither matches the Device ID seen on the terminal (in bold): 

Starting Bluetooth Peripheral HIDS mouse sample
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fe8
I: data wra: 0, 0
I: SoftDevice Controller build revision:
I: 89 9a 50 8a 95 01 9c 58 |..P....X
I: fc 39 d2 c1 10 04 ee 02 |.9......
I: 64 ce 25 be |d.%.
I: HW Platform: Nordic Semiconductor (0x0002)
I: HW Variant: nRF52x (0x0002)
I: Firmware: Standard Bluetooth controller (0x00) Version 137.20634 Build 2617349514
I: No ID address. App must call settings_load()
Bluetooth initialized
I: Identity: F5:63:BC:03:3B:4C (random)
I: HCI: version 6.0 (0x0e) revision 0x10f3, manufacturer 0x0059
I: LMP: version 6.0 (0x0e) subver 0x10f3
Regular advertising started
Connected DD:07:FC:FC:5B:D9 (random)
Regular advertising started
Connected DD:07:FC:FC:5B:D9 (random)

thoughts?

Parents
  • Hmm, interesting.

    I think CONFIG_BT_MAX_CONN is set to 2 (or more than 1) in this sample to have a parallel advertiser even after there is a connection. This might allow a second connection, but I am not sure if this is intentional and tested. if you want to to be sure that you want only 1 connection then make sure that you set CONFIG_BT_MAX_CONN=1 and handle any failure of advertising_start while in connection as not an error but just expected.

Reply
  • Hmm, interesting.

    I think CONFIG_BT_MAX_CONN is set to 2 (or more than 1) in this sample to have a parallel advertiser even after there is a connection. This might allow a second connection, but I am not sure if this is intentional and tested. if you want to to be sure that you want only 1 connection then make sure that you set CONFIG_BT_MAX_CONN=1 and handle any failure of advertising_start while in connection as not an error but just expected.

Children
Related