diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a68744..4f4b42f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ if (POLICY CMP0115) endif() project (GoveeBTTempLogger - VERSION 3.20240813.1 + VERSION 3.20240813.2 DESCRIPTION "Listen and log Govee Thermometer Bluetooth Low Energy Advertisments via BlueZ and DBus" HOMEPAGE_URL https://github.com/wcbonner/GoveeBTTempLogger ) diff --git a/goveebttemplogger.cpp b/goveebttemplogger.cpp index a2b64f1..89b16da 100644 --- a/goveebttemplogger.cpp +++ b/goveebttemplogger.cpp @@ -3802,6 +3802,13 @@ int main(int argc, char **argv) std::cerr << "Connected to D-Bus as \"" << dbus_bus_get_unique_name(dbus_conn) << "\"" << std::endl; // https://dbus.freedesktop.org/doc/api/html/group__DBusBus.html#ga8c10339a1e62f6a2e5752d9c2270d37b std::map BlueZAdapterMap; bUse_HCI_Interface = !bluez_find_adapters(dbus_conn, BlueZAdapterMap); + if (bUse_HCI_Interface && BlueZAdapterMap.empty()) + { + if (ConsoleVerbosity > 0) + std::cout << "[" << getTimeISO8601() << "] Could not get list of adapters from BlueZ over DBus. Reverting to HCI interface." << std::endl; + else + std::cerr << "Could not get list of adapters from BlueZ over DBus. Reverting to HCI interface." << std::endl; + } if (!BlueZAdapterMap.empty()) { std::string BlueZAdapter(BlueZAdapterMap.cbegin()->second);