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

Trouble connection multiple times : Bonding, error: 133

Hi, 

I am trying to integrate the CTS (Clock Time Service) within my application. My current application is heavily based on the BLE UART from SDK 17.1 and I tried to integrate parts of the exemple cts from the same SDK.

I don't have any trouble connecting once or twice but systematically, the third connection resulting in the following error : 

<info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133

As CTS needs bonding (or is it pairing) to work, the pairing method I use is very similar to the one in CTS.

Furthermore, I am trying to use an Apple smartphone with a custom application and the BLE service send the callback "Readin not permitted" and I think this issue is linked with the pairing problem.

Best Regards,

Charles

Parents
  • Thank you for the explanation. 

    Is the nRFConnect app you're seeing this 133 error message in the iOS, Android, or Desktop version of nRFConnect?

    Since you're using the peer manager and connect/disconnect multiple times, I think what's happening is that you either start or complete pairing, then disconnect and one of the devices thinks they're paired while the other does not. Try making sure you delete bonding information on both devices before reconnecting. On the nRF side, you can do something like calling the following delete_bonds() function as part of your disconnect procedure, and then make sure you delete bond info manually in the nRFConnect app (top right dropdown folder has an option to do so).

    /**@brief Clear bond information from persistent storage.
     */
    static void delete_bonds(void)
    {
        ret_code_t err_code;
    
        NRF_LOG_INFO("Erase bonds.");
        err_code = pm_peers_delete();
        APP_ERROR_CHECK(err_code);
    }

    Best regards,

    Simon

  • Hi,

    Thanks, as the application would be used regularly, what is the way of using the bond information ? So that it is not necessary to delete the bonds on both devices ?

  • Hi again,

    If you do advertising and connection like the ble_app_uart example project  does, the device shouldn't pair to the application at all.

    Best regards,

    SImon

  • But don't I want to be bonded for using CTS and Apple devices ?

Reply Children
No Data
Related