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

HID Mouse example on nRF51822, bluetooth connection error!

Good morning.

I use Google Translator to transcribe my articles. Please understand if the context is not right.

I am currently testing HID Protocol with a mobile phone.

SoftDevice is using S110, The SDK is using version 9.0.0.

The problem is that after checking the operation after connecting with the mobile phone, unregistering (disconnecting) it from the mobile phone and trying to connect again, HID_Mouse will not appear when the mobile phone finds the connectable list.

In summary, when you connect to your mobile phone and check the operation, you can unregister it from your cell phone and try to connect again.

I do not know if I should look at the event handling part when disconnecting, or if there is a problem with advertising. Help

  • If you are having problem with the phone/computer losing the bond data, you could e.g. allow pairing request from an already bonded peer(the nrf have the old bond data, but the phone have lost it), by setting the .allow_repairing flag to true.

    case PM_EVT_CONN_SEC_CONFIG_REQ:
    {
        // Allow pairing request from an already bonded peer.
        pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};
        pm_conn_sec_config_reply(p_evt->conn_handle, &conn_sec_config);
    } break;
    
Related