diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a2ec0d..91d03ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ if (POLICY CMP0115) endif() project (GoveeBTTempLogger - VERSION 2.20240610.0 + VERSION 2.20240710.0 DESCRIPTION "Listen and log Govee Thermometer Bluetooth Low Energy Advertisments" HOMEPAGE_URL https://github.com/wcbonner/GoveeBTTempLogger ) diff --git a/GoveeBTTempLogger.sln b/GoveeBTTempLogger.sln index 8f39aaa..d92399b 100644 --- a/GoveeBTTempLogger.sln +++ b/GoveeBTTempLogger.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30907.101 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.35013.160 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GoveeBTTempLogger", "GoveeBTTempLogger.vcxproj", "{87469263-8DEA-4963-9E12-C4F20FA83479}" EndProject @@ -13,8 +13,8 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {87469263-8DEA-4963-9E12-C4F20FA83479}.Debug|ARM.ActiveCfg = Debug|ARM - {87469263-8DEA-4963-9E12-C4F20FA83479}.Debug|ARM.Build.0 = Debug|ARM + {87469263-8DEA-4963-9E12-C4F20FA83479}.Debug|ARM.ActiveCfg = Debug|ARM64 + {87469263-8DEA-4963-9E12-C4F20FA83479}.Debug|ARM.Build.0 = Debug|ARM64 {87469263-8DEA-4963-9E12-C4F20FA83479}.Debug|x86.ActiveCfg = Debug|x86 {87469263-8DEA-4963-9E12-C4F20FA83479}.Debug|x86.Build.0 = Debug|x86 {87469263-8DEA-4963-9E12-C4F20FA83479}.Debug|x86.Deploy.0 = Debug|x86 diff --git a/goveebttemplogger.cpp b/goveebttemplogger.cpp index 31d2aad..99e565f 100644 --- a/goveebttemplogger.cpp +++ b/goveebttemplogger.cpp @@ -3223,6 +3223,11 @@ int main(int argc, char **argv) char LocalName[HCI_MAX_NAME_LENGTH] = { 0 }; hci_read_local_name(BlueToothDevice_Handle, sizeof(LocalName), LocalName, bt_TimeOut); + // TODO: get controller address and put it in the log. Useful for machines with multiple controllers to verify which is being used + bdaddr_t TheLocalBlueToothAddress({ 0 }); + hci_read_bd_addr(BlueToothDevice_Handle, &TheLocalBlueToothAddress, bt_TimeOut); + ControllerAddress = ba2string(TheLocalBlueToothAddress); + if (ConsoleVerbosity > 0) { if (!ControllerAddress.empty()) @@ -3238,6 +3243,10 @@ int main(int argc, char **argv) std::cout << std::endl; } } + else + if (!ControllerAddress.empty()) + std::cerr << "Controller Address: " << ControllerAddress << std::endl; + auto btRVal = bt_LEScan(BlueToothDevice_Handle, true, BT_WhiteList); if (btRVal < 0) ExitValue = EXIT_FAILURE;