Skip to content

Commit

Permalink
DBus Failure and revert to HCI message
Browse files Browse the repository at this point in the history
  • Loading branch information
wcbonner committed Aug 13, 2024
1 parent 13e4922 commit dba95e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
7 changes: 7 additions & 0 deletions goveebttemplogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bdaddr_t, std::string> 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);
Expand Down

0 comments on commit dba95e0

Please sign in to comment.