diff --git a/headers/os/bluetooth/HCI/btHCI_command.h b/headers/os/bluetooth/HCI/btHCI_command.h index 475ce8ba50..2560b5afd5 100644 --- a/headers/os/bluetooth/HCI/btHCI_command.h +++ b/headers/os/bluetooth/HCI/btHCI_command.h @@ -10,6 +10,11 @@ #define HCI_COMMAND_HDR_SIZE 3 +const char* GetCommand(uint16 command); +const char* GetManufacturer(uint16 manufacturer); +const char* GetHciVersion(uint16 ver); +const char* GetLmpVersion(uint16 ver); + struct hci_command_header { uint16 opcode; /* OCF & OGF */ uint8 clen; @@ -28,11 +33,11 @@ struct hci_command_header { #define OCF_READ_LOCAL_VERSION 0x0001 struct hci_rp_read_loc_version { uint8 status; - uint8 hci_ver; - uint16 hci_rev; - uint8 lmp_ver; + uint8 hci_version; + uint16 hci_revision; + uint8 lmp_version; uint16 manufacturer; - uint16 lmp_subver; + uint16 lmp_subversion; } __attribute__ ((packed)); #define OCF_READ_LOCAL_FEATURES 0x0003 diff --git a/headers/private/bluetooth/CommandManager.h b/headers/private/bluetooth/CommandManager.h index f8edce996c..b32aaeacfc 100644 --- a/headers/private/bluetooth/CommandManager.h +++ b/headers/private/bluetooth/CommandManager.h @@ -53,10 +53,6 @@ private: struct hci_command_header* fHeader; }; - -const char* GetCommand(uint16 command); -const char* GetManufacturer(uint16 manufacturer); - /* CONTROL BASEBAND */ void* buildReset(size_t* outsize); void* buildReadLocalName(size_t* outsize); diff --git a/src/kits/bluetooth/CommandManager.cpp b/src/kits/bluetooth/CommandManager.cpp index f4c4d50fb1..92f54fb458 100644 --- a/src/kits/bluetooth/CommandManager.cpp +++ b/src/kits/bluetooth/CommandManager.cpp @@ -548,6 +548,24 @@ const char* testingCommands[] = { }; +const char* hciVersion[] = { "1.0B" , "1.1 " , "1.2 " , "2.0 "}; +const char* lmpVersion[] = { "1.0 " , "1.1 " , "1.2 " , "2.0 "}; + + +const char* +GetHciVersion(uint16 ver) +{ + return hciVersion[ver]; +} + + +const char* +GetLmpVersion(uint16 ver) +{ + return lmpVersion[ver]; +} + + const char* GetCommand(uint16 command) {