Giter Club home page Giter Club logo

harpoond's Introduction

harpoond

Provides basic support to control Corsair Harpoon Mouse's LEDs. Being able to reliably turn off the mouse LED and set its color (static) is what you can expect.

It's not the goal of this project to offer all features present in iCUE, for that OpenRGB and ckb-next are more suited. Bluetooth support is also out of scope.

Attention: if you found this project it's very likely that you already own this mouse, if not don't buy it. If you still can return it do so.

I admit this is not pricey mouse, but its quality is terrible considering the price point. The dongle is a joke, my 10-year-old logitech M305 is much more reliable. In less than one year double clicks (aka ghost clicks) started, I just didn't return it because I bought while abroad.

Finally, the fact that it cannot persist settings and reset them after 60 seconds seems to be by design so users will have iCUE running all the time, which is either stupid or shady.

How to build and use

Linux

You need to have installed a C compiler and libsub, on Arch that's possible with pacman -S gcc libusb, while on Ubuntu/Debian apt install gcc libusb-1.0-0-dev.

git clone https://github.com/andreldm/harpoond
cd harpoond
# Tweak values in harpoond.c, where it says "Set custom configuration"
make
sudo make install
systemctl --user enable --now harpoond.service

Windows

While it's possible to build this project with Visual Studio, I recommend MSYS2 because it's easier to get libusb to work and requires no code changes.

In a mingw64 shell, run:

pacman -S git make pkg-config mingw-w64-x86_64-gcc mingw-w64-x86_64-libusb
git clone https://github.com/andreldm/harpoond
cd harpoond
# Tweak values in harpoond.c, where it says "Set custom configuration"
make -f Makefile.msys2
# Press Win + R, execute shell:startup, create a shortcut to harpoon.exe in that folder

Uninstall

Linux

systemctl --user disable --now harpoond.service
sudo make uninstall

Windows

Just remove the shortcut from the startup folder and delete the source folder.

harpoond's People

Contributors

andreldm avatar benjamin-loison avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

harpoond's Issues

libusb.h error No such file or directory

Hello Andre, how are you?

I'm using Pop!_OS distro and I have to do some workaround because I had some trouble with libusb.h while executing make. It returns an error with the message No such file or directory.

I run sudo apt-get install libusb-1.0-0-dev and then updated the harpoond.c from #include <libusb.h> to #include <libusb-1.0/libusb.h>.

Now everything is working as expected.
I'm just posting this if some else faces the same problem, including me in the future.

Desligar o RGB

Oi Andre, tudo bem?

Vi que você é BR, então facilita aqui.

Eu fiz o git clone do projeto e dei uma olhada no harpoond.c, lá pela linha 116, e tentei alterar os valores.
De fato, eles mudaram de cor, mas não consegui desabilitar...

Você consegue me ajudar?

Abraços!

Possible Bug - DPI Setting

This issue is looking at the following block:

    transfer(device, 12, device->command_prefix,
         0x06, 0x00, 0x06, 0x00, 0x00, 0x00,
         0x00,  /* Indicator LED's red */
         0x00,  /* Main LED's red */
         0xff,  /* Indicator LED's green */
         0x00,  /* Main LED's green */
         0xff,  /* Indicator LED's blue */
         0x00); /* Main LED's blue */

    transfer(device, 5, 0x01, 0x20, 0x00, 0x08, 0x70); /* Set DPI (708 hex = 1800) */

I'm using the corsair harpoon w/ the wireless dongle and I was able to alter the middle click indicator LED by changing the first transfer, but when attempting to drop the DPI to 500 or even 10 I don't seem to get any change.

I'm on Arch Linux, but libusb is cross-platform so I reckon that shouldn't matter.

I appreciate all the research you're doing on this to get some working cross-platform support for the Harpoon!

Spam in dmesg kernel log while daemon is running

When running the daemon as systemd service I'm getting an endless amount of the following message in my dmesg:

...
[ 3093.821158] hid-generic 0003:1B1C:1B5E.04E9: hiddev98,hidraw4: USB HID v1.11 Device [Corsair CORSAIR HARPOON RGB WIRELESS Gaming Mouse] on usb-0000:02:00.0-1/input1
[ 3095.828085] hid-generic 0003:1B1C:1B5E.04EA: hiddev98,hidraw4: USB HID v1.11 Device [Corsair CORSAIR HARPOON RGB WIRELESS Gaming Mouse] on usb-0000:02:00.0-1/input1
...

Which I assume is caused by the keep_alive function which initializes and ungrabs the device.

Cannot set Main LED's Blue

I tried to change the Main LED's Blue, e.g. to 0xff, but doesn't work.
It's the same with wired or dongle mode.
The Red and Green combinations works though.

Is it one of the ignored values or is it just my mouse?
I just bought it yesterday.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.