summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-08-07 23:22:17 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-08-22 22:59:27 +0200
commit1be74e886059ef53656bbae7b98e9b133b73b968 (patch)
tree725690d230be2f9cfd12cccbc1dca63794567f6a
parentf12d03e32d581f9575dbddbf3f29976d0918b882 (diff)
downloadupower-1be74e886059ef53656bbae7b98e9b133b73b968.tar.gz
hidpp: pick up devices that just got paired
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@gmail.com>
-rw-r--r--src/linux/up-device-unifying.c3
1 files changed, 3 insertions, 0 deletions
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 |