aboutsummaryrefslogtreecommitdiffstats
path: root/api/direct_bt
diff options
context:
space:
mode:
Diffstat (limited to 'api/direct_bt')
-rw-r--r--api/direct_bt/HCITypes.hpp23
-rw-r--r--api/direct_bt/MgmtTypes.hpp1
2 files changed, 24 insertions, 0 deletions
diff --git a/api/direct_bt/HCITypes.hpp b/api/direct_bt/HCITypes.hpp
index 9e008255..0f7070dd 100644
--- a/api/direct_bt/HCITypes.hpp
+++ b/api/direct_bt/HCITypes.hpp
@@ -190,6 +190,29 @@ namespace direct_bt {
OPERATION_CANCELLED_BY_HOST = 0x44,
PACKET_TOO_LONG = 0x45,
+ // MgmtStatus -> HCIStatusCode
+
+ FAILED = 0xc3,
+ CONNECT_FAILED = 0xc4,
+ AUTH_FAILED = 0xc5,
+ NOT_PAIRED = 0xc6,
+ NO_RESOURCES = 0xc7,
+ TIMEOUT = 0xc8,
+ ALREADY_CONNECTED = 0xc9,
+ BUSY = 0xca,
+ REJECTED = 0xcb,
+ NOT_SUPPORTED = 0xcc,
+ INVALID_PARAMS = 0xcd,
+ DISCONNECTED = 0xce,
+ NOT_POWERED = 0xcf,
+ CANCELLED = 0xd0,
+ INVALID_INDEX = 0xd1,
+ RFKILLED = 0xd2,
+ ALREADY_PAIRED = 0xd3,
+ PERMISSION_DENIED = 0xd4,
+
+ // Direct-BT
+
INTERNAL_TIMEOUT = 0xfd,
INTERNAL_FAILURE = 0xfe,
UNKNOWN = 0xff
diff --git a/api/direct_bt/MgmtTypes.hpp b/api/direct_bt/MgmtTypes.hpp
index 76c0f159..3ff5b2a5 100644
--- a/api/direct_bt/MgmtTypes.hpp
+++ b/api/direct_bt/MgmtTypes.hpp
@@ -97,6 +97,7 @@ namespace direct_bt {
PERMISSION_DENIED = 0x14
};
std::string getMgmtStatusString(const MgmtStatus opc) noexcept;
+ HCIStatusCode getHCIStatusCode(const MgmtStatus mstatus) noexcept;
enum MgmtOption : uint32_t {
EXTERNAL_CONFIG = 0x00000001,