Skip to content

Accept BLESecurity when taking the BLEDevice #52

@LarryMerino

Description

@LarryMerino

I was thinking of creating different security profiles based on some feature (for example) but the BLEDevice does not accept BLESecurity when taking it.

It is possible to do something like this?:

...
#[cfg(feature = "low_security")]
let ble_security = BLESecurity::builder()
            .security()
            .set_auth(true, true, true)
            .set_passkey(123456)
            .set_io_cap(SecurityIOCap::DisplayOnly);

#[cfg(feature = "high_security")]
let ble_security = BLESecurity::builder()
            .security()
            .set_auth(true, true, true)
            .set_passkey(952384)
            .set_io_cap(SecurityIOCap::DisplayOnly);

let ble_device = BLEDevice::take_with_security_conf(ble_security);
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions