summaryrefslogtreecommitdiff
path: root/ltunify.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-14ltunify: fix harmless compiler warningHEADmasterPeter Wu1-1/+4
bInterfaceNumber is expected to return the `%02x` format according to the current kernel sources. Even if that is not true, a user can always manually specify the hidraw device if the wrong device is detected.
2020-06-14Release 0.3v0.3Peter Wu1-1/+1
2020-06-14ltunify: fix minor alignment warning with the receiver-info commandPeter Wu1-8/+6
Caught by UndefinedBehaviorSanitizer (UBSan): ltunify.c:785:32: runtime error: load of misaligned address 0x7ffc0e4c38a5 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
2020-06-14ltunify: add Nano receiver c534 (MK270) supportPeter Wu1-17/+59
Fix "Unknown protocol 0x0a in devcon notif" errors when trying to list or pair new devices connected to the Nano receiver with device ID c534. This receiver is limited to 2 devices only and does not allow unpairing. Update the hidraw autodetection since the first detected hidraw device is wrong. Check the interface number, similar to Solaar, this avoids more complicated HID descriptor parsing. To confirm whether a device supports the HID++ protocol, either use `sudo lsusb -v046d:` (without a kernel driver bound to it) or use hidrd-convert -o spec /sys/class/hidraw/hidrawX/device/report_descriptor output.txt to find a Vendor-Specific page.
2018-03-30Use correct index in process_notif_dev_connectRob Wu1-1/+1
`devices[dev_idx]` should have been `devices[dev_idx - 1]`, aka `dev`.
2014-02-19Warn when CONFIG_HIDRAW is disabledPeter Wu1-0/+4
2013-09-28ltunify: Add --version (-V) option, use git version if possiblePeter Wu1-6/+17
2013-09-28ltunify: fix crash on unrecognised parameterPeter Wu1-0/+1
2013-09-28ltunify: fix do_read failure when receiving unrelated messagesPeter Wu1-29/+59
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-08-30ltunify: ignore DJ reportsPeter Wu1-0/+6
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-21Fix missing device version information for hid10Peter Wu1-1/+1
This got broken in e2faf04 (version 0.2).
2013-08-06Fix wrong names for HID++ 1.0 error codesPeter Wu1-13/+13
2013-07-23Add NEWS file, update to 0.2v0.2Peter Wu1-1/+1
2013-06-05ltunify: fix wrong serial numberPeter Wu1-1/+1
2013-05-22ltunify: Add support for c52f nano receiverPeter Wu1-0/+22
2013-05-22ltunify: make hidraw device path more obviousPeter Wu1-6/+8
2013-05-22ltunify: make driver name matching more obviousPeter Wu1-12/+22
Use basename instead of memcmp with some calculations. Move the hiddraw device matching outside a block in preparation for adding multiple match conditions.
2013-04-30ltunify: preliminary HID++ 2.0 support, add TODOPeter Wu1-2/+22
2013-04-29ltunify: show HID++ versionPeter Wu1-0/+67
2013-04-29ltunify: introduce read timeoutsPeter Wu1-6/+23
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-27ltunify: print receiver serialPeter Wu1-6/+39
2013-04-26Fix logic flaw in array boundsPeter Wu1-2/+2
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-26Revert "ltunify: implement fkeyswap command"Peter Wu1-74/+1
This reverts commit 7f870c0ca5f27827a411d1ee7a11ef5103432413. The keyboard register is not too generic
2013-04-26Revert "ltunify: make fkeyswap default action status"Peter Wu1-5/+9
This reverts commit 0b12a96aa7209ac2e4b3a5bb7b96aff1e116474b. The keyboard register is not too generic.
2013-04-26ltunify: make fkeyswap default action statusfkeyswapPeter Wu1-9/+5
2013-04-26ltunify: implement fkeyswap commandPeter Wu1-1/+74
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-26ltunify: refactor numeric device checkPeter Wu1-11/+13
2013-04-25ltunify: alias args to avoid constructs like (*args)[0]Peter Wu1-7/+8
(*args)[0] is not very obvious, introduce a new variable to avoid one indirection.
2013-04-25ltunify: remove unused signal handler and debugging loopPeter Wu1-36/+0
2013-04-25ltunify: version 0.1v0.1Peter Wu1-1/+1
2013-04-25ltunify: fix device type validationPeter Wu1-1/+1
2013-04-25ltunify: fix spelling errors and outdated commentPeter Wu1-7/+7
2013-04-24ltunify: print device type that got unpairedPeter Wu1-1/+3
2013-04-24ltunify: allow friendly name as device indexPeter Wu1-11/+86
2013-04-24ltunify: fix copying one byte too much (caught by -fsanitze=address)Peter Wu1-1/+1
2013-04-24ltunify: put version info for receiver in "receiver-info"Peter Wu1-4/+4
2013-04-24ltunify: do not disable notifications if it was enabled beforePeter Wu1-12/+18
Just in case there are other users of this notification system.
2013-04-24ltunify: support --device and do not always print full helpPeter Wu1-26/+54
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-24Support passing a custom hidraw device with -dPeter Wu1-1/+8
2013-04-24ltunify: remove DEBUG envvar, use getoptPeter Wu1-15/+37
2013-04-24Fix compiler warningsPeter Wu1-2/+4
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-24ltunify: suggest loading hid-logitech-djPeter Wu1-0/+4
2013-04-08Updated README with ltunify sessionPeter Wu1-0/+1
2013-04-08ltunify: automatically detect hidraw devicePeter Wu1-12/+59
2013-04-08Initial checking of pairing toolPeter Wu1-0/+995