mirror of https://github.com/labapart/gattlib
parent
00cbc1ab87
commit
ea1fe15857
|
@ -228,11 +228,14 @@ int gattlib_connect(void *adapter, const char *dst,
|
|||
// pairing information about the targetted device.
|
||||
GATTLIB_LOG(GATTLIB_ERROR, "Device '%s' cannot be found (%d, %d)", dst, error->domain, error->code);
|
||||
ret = GATTLIB_NOT_FOUND;
|
||||
} else {
|
||||
} else if ((error->domain == 238) && (error->code == 60952)) {
|
||||
GATTLIB_LOG(GATTLIB_ERROR, "Device '%s': %s", dst, error->message);
|
||||
ret = GATTLIB_ERROR_TIMEOUT;
|
||||
} else {
|
||||
GATTLIB_LOG(GATTLIB_ERROR, "Device connected error (device:%s): %s",
|
||||
conn_context->device_object_path,
|
||||
error->message);
|
||||
ret = GATTLIB_ERROR_DBUS_WITH_ERROR(error);;
|
||||
ret = GATTLIB_ERROR_DBUS_WITH_ERROR(error);
|
||||
}
|
||||
|
||||
g_error_free(error);
|
||||
|
|
|
@ -60,6 +60,8 @@ class DBusError(GattlibException):
|
|||
def __str__(self) -> str:
|
||||
if self.domain == 238 and self.code == 60964:
|
||||
return f"DBus Error: le-connection-abort-by-local"
|
||||
elif self.domain == 238 and self.code == 60952:
|
||||
return f"DBus Error: Timeout was reached"
|
||||
elif self.domain == 238 and self.code == 60964:
|
||||
return f"DBus Error: Timeout was reached"
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue