Hi,
After upgrading to 0.9.21 on Arch Linux, I found the following log
messages in my journal:
UPower-Linux-WARNING **: failed to coldplug unifying device: invalid
response from device: 7
It turns out that the current implementation is very naive when reading
messages. The hidraw responses
This prevents the use of responses from other HID++ applications (such
as Solaar and ltunify).
Signed-off-by: Peter Wu
---
src/linux/hidpp-device.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/src/linux/hidpp-device.c b/src/linux/hidpp-device.c
index 6d02bf1..2d4e55
The HID++ 1.0 Illuminated Keyboard K800 does not support the d7
register, instead is uses 07. Its observed behaviour is documented in
the ltunify repository[1].
[1]: https://git.lekensteyn.nl/ltunify/tree/registers.txt
Signed-off-by: Peter Wu
---
src/linux/hidpp-device.c | 56 +
The d7 battery register does not magically re-appear, therefore skip
this register once it is detected that the register is unusable.
Signed-off-by: Peter Wu
---
src/linux/hidpp-device.c | 31 ++-
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/src/lin
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
---
src/linux/up-device-unifyi
When the USB receiver is just plugged in, devices may not be active
("unreachable") and therefore return RESOURCE_ERROR on requests. This
causes upower to fail on picking up new devices. As a workaround, assume
that all discovered devices will eventually become reachable (even if
they don't, for ex
This prevents matching the wrong response packet, for example when
a mouse is moved while a packet is read. As a result, the reads are
more reliable and log spam is reduced.
Signed-off-by: Peter Wu
---
src/linux/hidpp-device.c | 108 +--
1 file changed
Removed while refactoring hidpp_device_cmd, now that the message
validation is in place, introduce the 1.0 check again.
Signed-off-by: Peter Wu
---
src/linux/hidpp-device.c | 31 ---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/linux/hidpp-device
Before this patch, there was no structure at all in the messages that
were passed around. Some issues:
- (debug) Every message of length 7 was considered a request (and
length 20 were seen as responses). This is not the case for HID++
1.0.
- The length of the message payload (ignoring the
This reduces spam in stderr (which is logged to the systemd journal).
Signed-off-by: Peter Wu
---
src/linux/hidpp-device.c | 7 +++
src/linux/up-device-unifying.c | 16 ++--
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/linux/hidpp-device.c b/src/linu
10 matches
Mail list logo