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

How to get a pairing prompt immediately after connecting?

I'm trying out the ble_app_gls demo with the Nordic Master Control Panel app (on Android). What I see is that the MCP can connect to the device without bringing up a pairing dialog or asking for the passkey. The pairing dialog and passkey prompt only come up when enabling notifications on a characteristic, or trying to write to a characteristic.

How do I modify this example so that the passkey prompt comes up immediately after connecting?

(nRF51 dongle, SDK 10.0.0, SD110)

Parents
  • Hi Alex,

    You can request bonding from the peripheral (using sd_ble_gap_authenticate() ) but not all the phones support this (reject the request) for example iOS device won't accept that.

    So you should let the phone trigger the bonding. To do that you need to use your app to do a read/write on an encrypted characteristic so that the phone will automatically start bonding. The MCP doesn't do read/write automatically because it's simply a generic app.

    Another option is to add HID service to your device so that the phone treats it as a HID device, but this is not something I would recommend.

  • @sbailes: It worked fine for me with MCP v3.10 could you try to update to the latest MCP version ? If the issue remain, please send us a sniffer trace.

Reply Children
No Data
Related