This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

After pair&connect request device disconnect

Hi support Team,

I create custom ble-service with help of example project ble_app_att_mtu_throughput (nRF5_SDK_17.0.2)its working successfully.Now i need to add security so i refer the ble_app_gls example and then compiled successfully.

Then,

  • I connect to my device with nRF Connect

The system launches me an explicit PopUp of paring request to my device  i click the pair after that device will be disconnect and message will appear in nRF-Connect  "Couldn't pair with NRF_example(device name in sdk_config.h) because of an incorrect PIN or passkey" but  not appear popup window for me to enter passkey.

Any idea where i'm stuck.

Thanks,

Stark.

  • Hi Stark

    Adding bonding to an example that doesn't already have it is quite tricky, since you have to include a lot of different libraries, and ensure they are all configured correctly. 

    Would it be an option to start out with an example that has bonding already (such as the ble_app_hrm example), and then add your custom service to that?

    Best regards
    Torbjørn

  • Thanks for replay,

    Actually in my case amts service suits for me so i need to be add pairing and security.

    Found some error,

    when i call nrf_ble_qwr_conn_handle_assign it will return invalid state i think VERIFY_MODULE_INITIALIZED(); is not initialized .I have called  nrf_ble_qwr_init()  within services_init()  is called before conn_params_init() and  also checked error code from nrf_ble_qwr_init it is returning NRF_SUCCESSFULL

    Can you please let me know how to solve it or reason for the error?

  • Hi 

    Are you able to share your main file with me, so I can see how the QWR library is initialized and used?

    I can make the case private if you want, in case you don't want to share your code in a public case. 

    Best regards
    Torbjørn

  • Hi ovrebekk,

    thanks for support,

    Self fixed,I write the code in c++  so i separate some the files,now i combine everything  in same file now qwr module  successfully initialized and  pair and connect  also working fine.

    Thanks,

    Stark.

  • Great, I will close the case then Slight smile

Related