Skip to content
Open
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions services/ble/Gap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,24 @@ namespace services
level4,
};

virtual void Pair() = 0;
// Values align with STM32 sdk ble core defs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should align with a specific manufacturer. if for some reason the manufacturer has a different values, the class implement this interface should be responsible for adapting it.

enum class SecureConnectionMode : uint8_t
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have the same three options for mitm and secureconnections:
notSupported,
supported,
enforced,

For some vendors, such as ST, we might not have the implementation for all combinations, which is fine.

{
notSupported,
supported,
enforced,
};

virtual void AllowPairing(bool allow) = 0;
enum class ManInTheMiddleMode : uint8_t
{
disabled,
enforced,
};

virtual void Pair() = 0;
virtual void AllowPairing(bool allow) = 0;
virtual void SetSecurityMode(SecurityMode mode, SecurityLevel level) = 0;
virtual void SetIoCapabilities(IoCapabilities caps) = 0;

virtual void AuthenticateWithPasskey(uint32_t passkey) = 0;
virtual void NumericComparisonConfirm(bool accept) = 0;
};
Expand Down
Loading