From 30c270a0130df7830930e7a8e44874f83875c44f Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Thu, 14 Sep 2023 20:15:29 -0400 Subject: [PATCH] device: allow return device 00 for BT device ff --- lib/logitech_receiver/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logitech_receiver/base.py b/lib/logitech_receiver/base.py index 6bae3422b8..bd5135f08e 100644 --- a/lib/logitech_receiver/base.py +++ b/lib/logitech_receiver/base.py @@ -524,7 +524,7 @@ def ping(handle, devnumber, long_message=False): reply = _read(handle, _PING_TIMEOUT) if reply: report_id, reply_devnumber, reply_data = reply - if reply_devnumber == devnumber: + if reply_devnumber == devnumber or reply_devnumber == devnumber ^ 0xff: # BT device returning 0x00 if reply_data[:2] == request_data[:2] and reply_data[4:5] == request_data[-1:]: # HID++ 2.0+ device, currently connected return ord(reply_data[2:3]) + ord(reply_data[3:4]) / 10.0