1 month, 2 weeks ago.

How can I save Bonding information when I reset Board?(STM_WB55)

To Dear.

I use BLE::securityManager

and I call API like below.

but When I reset Board. Pairing flow restart.

I think "preserveBondingStateOnReset" is the function about My question.

but It is not working. is there another option?

error = _ble_interface.securityManager().init( true, enableBonding false, requireMITM SecurityManager::IO_CAPS_NONE, iocaps NULL, passkey true, signing NULL dbfilepath ); if(error) { printf("Error during security manager initialisation\r\n"); _event_queue.break_dispatch(); return; }

error= _ble_interface.securityManager().preserveBondingStateOnReset(true); if (error) { printf("Error during preserveBondingStateOnReset %d\r\n", error); }

_ble_interface.securityManager().setSecurityManagerEventHandler(this); error = gap.enablePrivacy(true);

if(error) { printf("Error enabling privacy.\r\n"); _event_queue.break_dispatch(); return; }


if (!set_advertising_parameters()) { return; }

if (!set_advertising_data()) { return; } Gap::PeripheralPrivacyConfiguration_t configuration_p = { /* use_non_resolvable_random_address */ true, Gap::PeripheralPrivacyConfiguration_t::PERFORM_PAIRING_PROCEDURE }; _ble_interface.gap().setPeripheralPrivacyConfiguration(&configuration_p);

Gap::CentralPrivacyConfiguration_t configuration_c = { /* use_non_resolvable_random_address */ true, advertising MAC address fixed : ethan Gap::CentralPrivacyConfiguration_t::RESOLVE_AND_FORWARD }; _ble_interface.gap().setCentralPrivacyConfiguration(&configuration_c);

Comment on this question
Be the first to answer this question.

You need to log in to post a question