• Stars
    star
    166
  • Rank 227,829 (Top 5 %)
  • Language
    C
  • Created over 10 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tool for working with Logitech Unifying receivers and devices (mirror)
Logitech Unifying tool for Linux

See also the article on <https://lekensteyn.nl/logitech-unifying.html>

Logitech documents

I have learned a bit from the kernel source code hid-logitech-dj, but the
"official" Logitech specification (HID++ 1.0) was much more useful. These
documents can be found on <https://lekensteyn.nl/files/logitech/>.


Debuggers
usbmon.awk - initial debugging tool used for tapping usbmon from debugfs
hidraw.c   - successor of usbmon.awk that can parse packets of usb payload.
read-dev-usbmon.c - Reads data from /dev/usbmonX and show interpreted data in a
  more human-readable way.

Note: as a quick-n-dirty hack, I included hidraw.c at some point into the
read-dev-usbmon program. Otherwise, I had no way to show the difference between
a send or receive packet without adding to the same stdout stream. If I included
it in the stderr pipe, then it would be interleaved with stdout in an
unpredictable manner. This means that hidraw.c is currently unusable, it does
not process data correctly.

Usage of USB debugger:
1. Use `lsusb -d 046d:c52b` to determine the bus number. If the output is "Bus
   001 ..", your usb monitor device is at /dev/usbmon1.
2. sudo chgrp $USER /dev/usbmon1
3. sudo chmod g+r /dev/usbmon1
4. ./read-dev-usbmon /dev/usbmon1
5. Profit!


Pairing tool (ltunify)
ltunify allows you to pair new devices, unpair existing devices or view
information for those devices. In order to build the ltunify binary and install
it to `$HOME/bin/ltunify`:

    make ltunify
    make install-home

If you intend to package ltunify or otherwise install it system-wide with a
udevrule, you can use:

    make ltunify
    make install DESTDIR=$pkgdir bindir=/usr/bin udevrulesdir=/lib/udev/rules.d

Once installed, run `ltunify --help` for available options.

Usage of the pairing tool is pretty straight-forward. Example session:

    $ ./ltunify list
    /dev/hidraw0: Permission denied
    Logitech Unifying Receiver device is not accessible.
    Try running this program as root or enable read/write permissions
    for /dev/hidraw0
    $ sudo chgrp $USER /dev/hidraw0 && sudo chmod g+rw /dev/hidraw0 
    $ ./ltunify list
    Devices count: 1
    Connected devices:
    idx=1   Mouse   M525
    $ ./ltunify info 1
    Device index 1
    Mouse
    Name: M525
    Wireless Product ID: 4013
    Serial number: DAFA335E
    Device was unavailable, version information not available.
    $ ./ltunify unpair 1
    Device 0x01 Mouse successfully unpaired
    $ ./ltunify list
    Devices count: 0
    Connected devices:
    $ ./ltunify pair
    Please turn your wireless device off and on to start pairing.
    Found new device, id=0x01 Mouse
    $ ./ltunify list
    Devices count: 1
    Connected devices:
    idx=1   Mouse   M525

TODO
- organize code in multiple files
- simplify code
- HID++ 2.0 debugging (transparent if possible)

~ Peter Wu <[email protected]>

More Repositories

1

apk-downloader

APK Downloader Chrome Extension
JavaScript
321
star
2

pacemaker

Heartbleed (CVE-2014-0160) client exploit
Python
319
star
3

dmg2img

DMG2IMG allows you to convert a (compressed) Apple Disk Images (imported from http://vu1tur.eu.org/dmg2img). Note: the master branch contains imported code, but lacks bugfixes/features from the develop branch. "develop" branch is recommended!
C
178
star
4

lglaf

LG Download Mode utility and documentation
Python
137
star
5

qt5printers

GDB Pretty printers for Qt5
Python
132
star
6

acpi-stuff

Tools for analysing ACPI DSDT/SSDT tables and notes
HTML
54
star
7

netns

Network Namespace management for Linux
Shell
48
star
8

wireguard-dissector

Wireshark dissector (written in Lua) for dissecting the WireGuard tunneling protocol.
Lua
46
star
9

luagcrypt

luagcrypt is a Lua interface to the libgcrypt library, written in C.
C
26
star
10

parse8xp

Convert between source code and TI83/TI84/TI84+/TI84s programs (in .8xp format)
Python
22
star
11

kdnet

Windows Kernel Debugger over Network (Wireshark dissector and maybe more)
Lua
20
star
12

el4000

Energy Logger 4000 utility
Python
16
star
13

clang-alloc-free-checker

Clang static analyzer plugin for checking memory issues in Wireshark/GLib applications (allocator mismatch and memleaks)
C++
14
star
14

make-gapps-zip

Documentation and tools for reproducible update.zip builds
Python
12
star
15

lua-unicode

Patched Lua library to add UTF-8 support on Windows.
CMake
12
star
16

windows-bootstrap

Scripts and tools to automate a Windows 7 installation for QEMU
PowerShell
11
star
17

hex-viewer

Hex viewer for modern browsers with bit annotation functionality
JavaScript
10
star
18

ssh-blocker

Block IP addresses based on SSH logs
C
10
star
19

noscript-nsa

NSA - NoScript Anywhere (Firefox Mobile add-on)
JavaScript
8
star
20

wireshark-fuzztools

Tools to assist in fuzzing (or triaging from oss-fuzz)
Python
7
star
21

chromium-quic

Subset of chromium repo: net/quic/ net/tools/quic/ net/third_party/quic/
C++
7
star
22

aur

Personal PKGBUILDs, from AUR and official repositories
Shell
4
star
23

rsyncbackup

Simple interface for encrypted offline backups with snapshots support
Shell
3
star
24

archdir

Bootstrap a QEMU/KVM VM for building Arch Linux packages
Shell
3
star
25

dnsallow

dnsallow enables whitelisting of IP addresses based on DNS responses.
C
3
star
26

wireshark-ansible

ansible configuration for setting up a gerrit + buildbot nine cluster
Python
3
star
27

qemu-tools

Miscellaneous tools related to QEMU
Python
2
star
28

pystubgen

Generates Python source code from a module for documentation purposes
Python
2
star
29

wgll

Low-level prototyping tool for WireGuard
Python
2
star
30

ls-l.info

Test domain
HTML
1
star
31

iot19-leshan

Practical assignment for the TU/e 2017 course on IoT (2IMN15) - Group 19
Java
1
star