Commit Graph

40 Commits

Author SHA1 Message Date
Peter Wu
1938dc08d1 Warn when CONFIG_HIDRAW is disabled 2014-02-19 11:13:40 +01:00
Peter Wu
f6523bc6bc ltunify: Add --version (-V) option, use git version if possible 2013-09-28 16:38:04 +02:00
Peter Wu
89dce89837 ltunify: fix crash on unrecognised parameter 2013-09-28 16:37:34 +02:00
Peter Wu
8fbf5f92d2 ltunify: fix do_read failure when receiving unrelated messages
When a touchpad event occurs while the device is being queried (e.g.
for features), then do_io (for do_read) would fail because the report
was not of the correct type (0x20 vs 0x11 for example). To fix this,
make do_read retry reads (within the allowed timeout).

Previously the expected report type was hidden in the msg parameter,
make this expected report type more explicit now in a new parameter.
2013-09-28 16:19:14 +02:00
Peter Wu
2e2b21d3cc ltunify: ignore DJ reports
Fixes the warning messages below:

$ ltunify unpair 2
Unexpected disconnection type 0000
Device 0x02 Touchpad successfully unpaired
$ ltunify pair
Please turn your wireless device off and on to start pairing.
Found new device, id=0x02 Touchpad
Dev conn notif is expected to be short, got 0x20 instead
Dev conn notif is expected to be short, got 0x20 instead
Dev conn notif is expected to be short, got 0x20 instead
Dev conn notif is expected to be short, got 0x20 instead
Dev conn notif is expected to be short, got 0x20 instead
2013-08-30 12:01:05 +02:00
Peter Wu
7e7bbbdabd Fix missing device version information for hid10
This got broken in e2faf04 (version 0.2).
2013-08-21 00:57:05 +02:00
Peter Wu
9591ee2254 Fix wrong names for HID++ 1.0 error codes 2013-08-06 15:45:19 +02:00
Peter Wu
63064a01f1 Add NEWS file, update to 0.2 2013-07-23 14:22:20 +02:00
Peter Wu
d39c477544 ltunify: fix wrong serial number 2013-06-05 12:35:09 +02:00
Peter Wu
b73fcc67e7 ltunify: Add support for c52f nano receiver 2013-05-22 12:34:11 +02:00
Peter Wu
c8916f18f6 ltunify: make hidraw device path more obvious 2013-05-22 12:04:55 +02:00
Peter Wu
446ac25139 ltunify: make driver name matching more obvious
Use basename instead of memcmp with some calculations. Move the hiddraw device
matching outside a block in preparation for adding multiple match conditions.
2013-05-22 11:47:51 +02:00
Peter Wu
e2faf04f8f ltunify: preliminary HID++ 2.0 support, add TODO 2013-04-30 17:40:53 +02:00
Peter Wu
793070ba82 ltunify: show HID++ version 2013-04-29 19:52:39 +02:00
Peter Wu
e9bb1ae6ff ltunify: introduce read timeouts
In case a message does not get a response (user pulled out the receiver,
thunder hit the device, coke has fallen on a keyboard, etc.), do not wait
`for(;;)`. (2 seconds because accessing registers may be slow)
2013-04-29 19:05:28 +02:00
Peter Wu
74fff88e80 ltunify: print receiver serial 2013-04-27 19:02:39 +02:00
Peter Wu
9e8da2dd01 Fix logic flaw in array bounds
Index 0xFF needs an array of size 0x100... This error was caught with
Address Sanitizer while trying to iterate through all registers 0x00..0xFF.
2013-04-26 23:15:40 +02:00
Peter Wu
13ade9eb5b Revert "ltunify: implement fkeyswap command"
This reverts commit 7f870c0ca5.

The keyboard register is not too generic
2013-04-26 12:03:51 +02:00
Peter Wu
542cc30472 Revert "ltunify: make fkeyswap default action status"
This reverts commit 0b12a96aa7.

The keyboard register is not too generic.
2013-04-26 12:03:31 +02:00
Peter Wu
0b12a96aa7 ltunify: make fkeyswap default action status 2013-04-26 00:35:45 +02:00
Peter Wu
7f870c0ca5 ltunify: implement fkeyswap command
Warning: I am sleepy so there may be bugs or ugly code. It is tested and works
on a K800 keyboard though (and of course it should abort when trying on my M525
mouse).
2013-04-26 00:27:23 +02:00
Peter Wu
1e0054ecac ltunify: refactor numeric device check 2013-04-26 00:18:41 +02:00
Peter Wu
ab928522b1 ltunify: alias args to avoid constructs like (*args)[0]
(*args)[0] is not very obvious, introduce a new variable to avoid one
indirection.
2013-04-25 22:56:35 +02:00
Peter Wu
2cc2f450de ltunify: remove unused signal handler and debugging loop 2013-04-25 22:55:03 +02:00
Peter Wu
3d95661a79 ltunify: version 0.1 2013-04-25 12:25:34 +02:00
Peter Wu
7a1643e6fa ltunify: fix device type validation 2013-04-25 12:25:14 +02:00
Peter Wu
f600f9ea3f ltunify: fix spelling errors and outdated comment 2013-04-25 12:02:43 +02:00
Peter Wu
fc791074d9 ltunify: print device type that got unpaired 2013-04-24 23:29:24 +02:00
Peter Wu
fefd502517 ltunify: allow friendly name as device index 2013-04-24 16:59:00 +02:00
Peter Wu
957ce488fc ltunify: fix copying one byte too much (caught by -fsanitze=address) 2013-04-24 16:52:22 +02:00
Peter Wu
26ea52e926 ltunify: put version info for receiver in "receiver-info" 2013-04-24 15:14:49 +02:00
Peter Wu
69aadeb0d7 ltunify: do not disable notifications if it was enabled before
Just in case there are other users of this notification system.
2013-04-24 14:56:22 +02:00
Peter Wu
42e144853f ltunify: support --device and do not always print full help
This changes the behavior of validate_args to return the number of command
arguments. The timeout value for "pair" is also validated and the version
number printed.
2013-04-24 14:49:43 +02:00
Peter Wu
bd0afb7f32 Support passing a custom hidraw device with -d 2013-04-24 12:54:44 +02:00
Peter Wu
32797bbe1d ltunify: remove DEBUG envvar, use getopt 2013-04-24 12:45:01 +02:00
Peter Wu
6f4b439a5f Fix compiler warnings
The memcpy bug is actually a real one-by-off. Since the msg_long struct is
contained in a union of hidpp_message, this does not lead to
write-past-boundaries (but it may read more than intended).

Some fields of version could be uninitialised (when the register query failed).
Explicitly clear the values to make clang happy.
2013-04-24 10:55:25 +02:00
Peter Wu
50dbefc2ae ltunify: suggest loading hid-logitech-dj 2013-04-24 10:22:39 +02:00
Peter Wu
d9fe85b6c9 Updated README with ltunify session 2013-04-08 18:27:45 +02:00
Peter Wu
515235530e ltunify: automatically detect hidraw device 2013-04-08 18:10:25 +02:00
Peter Wu
30f8961be0 Initial checking of pairing tool 2013-04-08 17:03:10 +02:00