{"id":13645508,"url":"https://github.com/cvuchener/hidpp","last_synced_at":"2025-04-21T14:31:22.781Z","repository":{"id":2163601,"uuid":"45838123","full_name":"cvuchener/hidpp","owner":"cvuchener","description":"Collection of HID++ tools","archived":false,"fork":false,"pushed_at":"2023-05-31T16:51:22.000Z","size":460,"stargazers_count":84,"open_issues_count":7,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-02T01:25:28.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cvuchener.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-09T13:00:19.000Z","updated_at":"2024-07-15T15:00:30.000Z","dependencies_parsed_at":"2024-08-02T01:38:27.409Z","dependency_job_id":null,"html_url":"https://github.com/cvuchener/hidpp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvuchener%2Fhidpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvuchener%2Fhidpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvuchener%2Fhidpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvuchener%2Fhidpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvuchener","download_url":"https://codeload.github.com/cvuchener/hidpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223868283,"owners_count":17217065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:02:36.150Z","updated_at":"2024-11-09T18:31:32.509Z","avatar_url":"https://github.com/cvuchener.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"HID++ library and tools\n=======================\n\nI wrote this library as a personal hack tool for testing Logitech's HID++ protocol. It also contains tools for configuring complex mouse profiles in persistent or temporary memory.\n\nFor simpler profiles, you may prefer to use [libratbag](https://github.com/libratbag/libratbag).\n\nDocumentation for HID++ 1.0 mice, can be found on [my G500 repository](https://github.com/cvuchener/g500/tree/master/doc). Other varied documents (HID++ 1.0 receivers, HID++ 2.0 devices) from Logitech can be found on [this Google drive](https://drive.google.com/folderview?id=0BxbRzx7vEV7eWmgwazJ3NUFfQ28). Peter Wu has some HID++ 2.0 features documentation on [his website](https://lekensteyn.nl/files/logitech/).\n\n\nBuilding\n--------\n\nBuilding requires a C++17 compiler and cmake.\n\nThe library can be built with different HID backend (using the `HID_BACKEND` cmake variable, default is set according the current operating system).\n - `linux` uses Linux hidraw and **libudev**.\n - `windows` uses Microsoft Windows HID API.\n\nProfile tools use **TinyXML2** for parsing and writing profiles.\n\nUse cmake to build the library and tools.\n\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n\nLibrary and tools can be installed with `make install`.\n\nWhen building with Microsoft Visual C++ (MSVC), you must also provide a library for **getopt** (vcpkg has [one](https://vcpkg.info/port/getopt)). Shared library builds are not currently supported with MSVC, use `-DBUILD_SHARED_LIBS=OFF` when configuring cmake.\n\n### CMake options\n\n - `BUILD_TOOLS` (default: `ON`): build the command line tools alongside the library.\n - `INSTALL_UDEV_RULES` (default: `OFF`): install an udev rule for adding user access to HID++ devices. This will add a file in `/etc/udev/rules.d` (not in `CMAKE_INSTALL_PREFIX`). Run `udevadm control --reload` and `udevadm trigger` after the installation for updating udev rules and already present devices.\n\n\nCommands\n--------\n\nMost commands use a device path for interacting with the device. For some devices (wireless or older HID++ 1.0 devices), you need to add a *device index* with the `-d` or `--device` in order to access the device instead of the receiver. Use `hidpp-list-devices` to discover plugged devices and their respective device path and index.\n\n### Check HID++ protocol\n\n    hidpp-check-device *device_path*\n\nThis command print the protocol version of the device if it supports HID++. Otherwise it return a non-zero code.\n\n\n### List HID++ devices\n\n    hidpp-list-devices\n\nList every HID++ devices that can be opened (run as root if the device is not visible).\n\n\n### Discover HID++ features or registers\n\n    hidpp-list-features *device_path*\n\nList every feature or register available on the device. For HID++ 1.0, register are discovered by trying to read or write them, this command does not try writing unless the `-w` or `--write` options are given.\n\n\n### Dump and write HID++ 1.0 device memory\n\n    hidpp10-dump-page *device_path* *page*\n\nDump the content of page *page* in the HID++ 1.0 device memory in stdout.\n\n    hidpp10-write-page *device_path* *page*\n\nWrite the content of stdin in page *page* of the HID++ 1.0 device.\n\n\n### On-board profiles\n\nProfiles are stored in XML format, see *profile_format.md* for details.\n\n    hidpp-persistent-profiles *device_path* read [*file*]\n\nRead the persistent profiles from the device and write them in XML format in *file* or stdout.\n\n    hidpp-persistent-profiles *device_path* write [*file*]\n\nWrite the persistent profiles from the XML in *file* or stdin to the device.\n\nSupported devices:\n - G9 (experimental, untested)\n - G9x, G500, G500s\n - G700, G700s (experimental, untested)\n - HID++2.0 or later supporting On-board profiles (feature 0x8100) with profile format 1, 2 or 3 (only format 2 was tested with a G502 spectrum, other formats may be incomplete) and macro format 1. Use `hidpp20-onboard-profiles-get-description` to get the format used by the device.\n\n\n### HID++ 1.0 profile management\n\n    hidpp10-load-temp-profile *device_path* [*file*]\n\nWrite the profile from the XML in *file* or stdin to the device temporary memory and load it.\n\n    hidpp10-active-profile *device_path* current\n\nGet the index of the current profile (or `default` if the factory default is loaded).\n\n    hidpp10-active-profile *device_path* load *index*\n\nLoad the profile *index* from persistent memory.\n\n    hidpp10-active-profile *device_path* load-default\n\nLoad the factory default profile.\n\n    hidpp10-active-profile *device_path* load-address *page* [*offset*]\n\nLoad the profile at the given address (default value for *offset* is 0).\n\n    hidpp10-active-profile reload\n\nReload the current profile from persistent memory (useful to get back to the last profile after `hidpp10-load-temp-profile`).\n\n\n### Changing mouse resolution\n\n    hidpp-mouse-resolution *device_path* get\n\nGet the current resolution from the mouse.\n\n    hidpp-mouse-resolution *device_path* set *x_dpi* [*y_dpi*]\n\nSet the current resolution for the mouse. If only one resolution is given, both axes use *x_dpi*. Some mice do not support per-axis resolution.\n\n    hidpp-mouse-resolution *device_path* info\n\nPrint informations about supported resolutions.\n\nSupported devices: G5, G9, G9x, G500, G500x, G700, G700s, HID++2.0 or later devices with “Adjustable DPI” feature (0x2201).\n\n\n### Advanced HID++ 1.0 commands\n\n    hidpp10-raw-command *device_path* *command* read|write short|long [*parameters*...]\n\nUsed for raw interaction with HID++ 1.0 register *command*. Parameters are hexadecimal and default are zeroes.\n\n\n### Advanced HID++ 2.0 or later commands\n\n    hidpp20-call-function *device_path* *feature_index* *function* [*parameters*...]\n\nCall the low-level function given by `feature_index` and `function`. Parameters are hexadecimal and default are zeroes.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvuchener%2Fhidpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvuchener%2Fhidpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvuchener%2Fhidpp/lists"}