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

Bonding Issue in SDK 10

Hello everyone,

I am trying to set the security parameters for bonding with PASSKEY (static)format it is getting executed very well(connected and bonded) for the SDK 9 btu when i implemented the same function for the SDK 10 it is only getting connected in the MCP when i click bonding its get disconencted automatically and gets reset can anyone try to suggest me some ideas inorder to resolve this errors

main.c

  • Hi,

    app_timer_stop() is asserting because the timer is not initialized, but you don't need to handle this event since you're using a static passkey. Just comment out the event in the on_ble_evt() handler. Also, SEC_PARAM_MITM should be set to '1' to require passkey for bonding.

  • Actually i dont want to use a static passkey but that is the only option i ahve gone through some forums so i comment out those event would it cause any problems for other part of the program execution? like battery service, link loss service ? because am going to add those service along with the passkey

  • Passkey is not a requirement on the services you mentioned.

  • non actually am trying to add some sort of security along with the services inorder to connect only with the respective devices so thats why i am adding passkey security if there is any other ways to set the passkey something like that device name as a passkey? moreover i tried the same example with the sdk 9 it is workigg fine but wtih SDK 10it is not getting bonded and also i have added the battery service based on the proximity example it is getting executed well only if i comment out this function timers_init(); in this case battery percentage remains 100 because there is something i have to changein the function for the timers

    /**@brief Function for the Timer initialization. *

    • @details Initializes the timer module. This creates and starts application timers. */ static void timers_init(void) { uint32_t err_code;

      // Initialize timer module. APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);

      // Create battery timer. err_code = app_timer_create(&m_battery_timer_id, APP_TIMER_MODE_REPEATED, battery_level_meas_timeout_handler); APP_ERROR_CHECK(err_code); }

  • There are some smaller api changes in the app timer API in SDK 10.0.0. I'd recommend using on of the reference examples, for instance ble_app_hrs, to see how timer instances are initialized.

Related