[PATCH 9/9] hidpp: pick up devices that just got paired
Peter Wu
lekensteyn at gmail.com
Wed Aug 7 15:13:44 PDT 2013
When sending a ping request right after a device got paired, the ping
message gets lost (there is no response). Work around that by delaying
the initial packet exchange. 10 milliseconds seems to work, but let's
choose 30 ms to be fully safe.
Signed-off-by: Peter Wu <lekensteyn at gmail.com>
---
src/linux/up-device-unifying.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/linux/up-device-unifying.c b/src/linux/up-device-unifying.c
index 119c517..b07d515 100644
--- a/src/linux/up-device-unifying.c
+++ b/src/linux/up-device-unifying.c
@@ -235,6 +235,9 @@ up_device_unifying_coldplug (UpDevice *device)
hidpp_device_set_hidraw_device (unifying->priv->hidpp_device,
device_file);
+ /* give newly paired devices a chance to complete pairing */
+ g_usleep(30000);
+
/* coldplug initial parameters */
ret = hidpp_device_refresh (unifying->priv->hidpp_device,
HIDPP_REFRESH_FLAGS_VERSION |
--
1.8.3.4
More information about the devkit-devel
mailing list