Struct esp32_nimble::BLESecurity
source · pub struct BLESecurity { /* private fields */ }
Implementations§
source§impl BLESecurity
impl BLESecurity
sourcepub fn set_auth(&mut self, auth_req: AuthReq) -> &mut Self
pub fn set_auth(&mut self, auth_req: AuthReq) -> &mut Self
Set the authorization mode for this device.
sourcepub fn get_passkey(&self) -> u32
pub fn get_passkey(&self) -> u32
Get the current passkey used for pairing.
sourcepub fn set_passkey(&mut self, passkey: u32) -> &mut Self
pub fn set_passkey(&mut self, passkey: u32) -> &mut Self
Set the passkey the server will ask for when pairing.
- The passkey will always be exactly 6 digits. Setting the passkey to 1234 will require the user to provide ‘001234’
- a dynamic passkey can also be set by
crate::BLEServer::on_passkey_request
sourcepub fn set_io_cap(&mut self, iocap: SecurityIOCap) -> &mut Self
pub fn set_io_cap(&mut self, iocap: SecurityIOCap) -> &mut Self
Set the Input/Output capabilities of this device.
sourcepub fn set_security_init_key(&mut self, init_key: PairKeyDist) -> &mut Self
pub fn set_security_init_key(&mut self, init_key: PairKeyDist) -> &mut Self
If we are the initiator of the security procedure this sets the keys we will distribute.
sourcepub fn set_security_resp_key(&mut self, resp_key: PairKeyDist) -> &mut Self
pub fn set_security_resp_key(&mut self, resp_key: PairKeyDist) -> &mut Self
Set the keys we are willing to accept during pairing.
sourcepub fn resolve_rpa(&mut self) -> &mut Self
pub fn resolve_rpa(&mut self) -> &mut Self
Set up for pairing in RPA(Resolvable Private Address).