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

static passkey with SDK 10

The example on github for static passkey imnplementation with nus is written for SDK 7.I think API have changed form SDK 7 to SDK 10. Any one has implemented it in SDK 10? I am fairly new to the BLE development and still learning the API..

Please help..

Update:I managed to make modifications as per the old code,now atleast direct connection is not possible.

1]On connecting, the nrf resets 2]If i try to bond, the nrf Master control app will throw a Notification that "invalid Pin or Passkey Entry"..

What could be the reason?ANy TimeOut settings?

Update 2: I am now able to initiate passkey requirement on the App side[static key].But, Even without bonding, even if the device are only connected, i am able to use the RX and TX characteristics.

What i want is that unless the static key is exchanged, no information must be exchanged.

Q1]Am i confusing myself between Bonding & Connection establishment? Q2]DO I have to handle the above requiemnt in application or is it a BLE Stack implementation? Also, in the future i will be using NRF as a master and not a Mobile device...

Please help....

  • FormerMember
    0 FormerMember

    You can implement static passkey by following the this message sequence chart.

    For development, I would recommend you to use the latest version of the SDK, SDK 11. Also note that the module that handles bonding, the peer_manager, is not included in the ble_app_uart example in the SDK.

    1)

    Connecting: Initiating a connection sets up a connection between two devices.

    Bonding: Setting up an encrypted link between two devices. When bonding, the encryption information is stored in the devices so that there will not be any key exchange upon a re-connection.

    2) When setting up the characteristics, you have to set the security required to interact with that characteristic using the macros BLE_GAP_CONN_SEC_MODE_SET_MACROS.

  • Thanks for the answer Kristin.Now i atleast understand connection-bonding.I will try to use the SDK11 for my application.My other question is how to setup a master[NUS] on the nRF51-DK with a static passkey mechanism.I just need a headstart and i will try to implement it myself.....

  • FormerMember
    0 FormerMember in reply to FormerMember

    As you probably know, there is a UART central example in the SDK, ble_app_uart_c (without bonding implemented). This tutorial shows how to include the device manager module in an project. However, the device manager module was replaced by the peer manager in SDK 11. But I would think that adding the peer manager module to a project should be done approximately the same way as adding the device manager module to a project.

    The experimental central example ble_app_rscs_c uses the peer manager module, it can be useful to take a look that example as well.

Related