This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/LAUNCHXL-CC1352P: Setting the password by user and clear the paired devices

Part Number: LAUNCHXL-CC1352P

Tool/software: TI C/C++ Compiler

Hi,

Hope you do well,

I am developing an application using the BLE Project zero code:

I can able to do send and receive the data. Now, I need to set the BLE password by the user and clear the paired device list.

Please suggest to me how to do this.

Thanks

  • Hi,

    The BLE password is compared in the function ProjectZero_processPasscode(). Please review this Simple Link Academy lab to see how you can use a non-static password.

    To clear the GapBond list, please use this code: GAPBondMgr_SetParameter(GAPBOND_ERASE_ALLBONDS, NULL, NULL);

    If you only want to clear the connection list, the Project Zero provides the following function: ProjectZero_clearConnListEntry()

    Regards,

  • Hi,

    Thanks for your reply,

    I already got the results for changing the password.

    Now, Where should I give this line to erase the bond? I have inserted this line in the ProjectZero_Init() but, No use.

     Thank you,

  • Hi,

    You should be fine as long as you are executing GAPBondMgr_SetParameter() after having called GAPBondMgr_Register().

    Let me know if this is not the case :)

    FYI, a mass erase of the device (using Flash Programmer) does the trick too.

    Regards,

  • Hi,

    It not working, I tried to call this function here.
            uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
            uint8_t mitm = TRUE;
            uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
            uint8_t bonding = FALSE;
            GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t),
                                    &pairMode);
            GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
            GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t),
                                    &ioCap);
            GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t),
                                    &bonding);
            GAPBondMgr_SetParameter(GAPBOND_ERASE_ALLBONDS, NULL, NULL);

    And Also, I tried to call this function here later.
        VOID GAPBondMgr_Register(&ProjectZero_BondMgrCBs);
        GAPBondMgr_SetParameter(GAPBOND_ERASE_ALLBONDS, NULL, NULL);

    But, both give nothing.

    Just for a clarification : Like all the Bluetooth working,

    After clearing the trusted list from TI. Then, again I am trying to connect via the BLE scanner app. This time the pairing and passkey authentication should take place, right?

  • Hi,

    The pairing and authentication are not always required. This depends on the rights required by the user to access the data.

    For details, please review the SimpleLink Academy labs dedicated to BLE security.

    Best regards,