Error: Cannot find the g403 wireless mouse
So i compiled the program (installed gcc before). using: sudo ./g403hub get the message: Error finding the g403 prodigy mouse
Mouse is connected via USB. Same message with USB-Bluetooth-Adapter, using Lubuntu 18.04.
I've pushed an additional method of finding it https://github.com/ysph/g403-GUI-control/commit/7b52c94d2185064893864b8200e9c538e700af0e. Please, try to compile and run again.
If the problem persists, then the application cannot find the corresponding Vendor and Product ID. Try the following command
lsusb | egrep "G403|Logitech"
It should print the following line in your terminal, in my case it is
Bus 00X Device 00X: ID 046d:c083 Logitech, Inc. G403 Prodigy Gaming Mouse
An important part of it is
046d:c083
If you don't mind, could you show me your output?
I tryed to compile it. Following Error:
main.c: In function ‘main’: main.c:101:5: warning: implicit declaration of function ‘libusb_set_option’; did you mean ‘libusb_get_version’? [-Wimplicit-function-declaration] libusb_set_option(global_context, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_ERROR); ^~~~~~~~~~~~~~~~~ libusb_get_version main.c:101:39: error: ‘LIBUSB_OPTION_LOG_LEVEL’ undeclared (first use in this function); did you mean ‘LIBUSB_ERROR_NO_MEM’? libusb_set_option(global_context, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_ERROR); ^~~~~~~~~~~~~~~~~~~~~~~ LIBUSB_ERROR_NO_MEM main.c:101:39: note: each undeclared identifier is reported only once for each function it appears in
Also trying "lsusb | egrep "G403|Logitech" ":
Bus 002 Device 006: ID 046d:c082 Logitech, Inc. Bus 002 Device 007: ID 046d:c539 Logitech, Inc.
c082 = USB-cable; c539 = Bluetooth-Adapter
I made a tweak regarding that issue https://github.com/ysph/g403-GUI-control/commit/ef9acc9e0b1b1a7eb7806657ccbadb2100a62aa8, seems like libusb version there was a bit old. Try to compile again.
New try for compile, same message like before. apt-cache policy libusb-1.0* :
libusb-1.0-0: Installiert: 2:1.0.21-2 Installationskandidat: 2:1.0.21-2 Versionstabelle: *** 2:1.0.21-2 500 500 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 Packages 100 /var/lib/dpkg/status
That's quite strange. This C directive doesn't allow here using libusb_set_option() funciton, which was introduced only in 1.0.22 of libusb (you use 1.0.21 in which libusb_set_debug() is used).
https://github.com/ysph/g403-GUI-control/blob/7e987f9b2873a2de0df65e69a9d8b56501fa4f95/main.c#L104-L108
I'd try to do
git pull && gcc main.c -lusb-1.0 && sudo ./a.out
or comment lines from 104 up to 108 in the main.c file and compile again.
Now compiling works (version 7e987f9, nothing changed by me). I got the a.out (no more g403hub?). started with: sudo ./a.out Following error
Error during control transfer: LIBUSB_ERROR_PIPE Now, the color of your logo is #0077ff
=> No color-changing
I tested it with both, same error (USB-cable changed to c082 (line 8))
Since I do not have wireless version of the g403 mouse (c082 and c539, mine is c083 (it also works for me)) at hand, it's hard to know and test what control bytes should be transmitted to mouse by program. I've tried to find that information on the internet, but quite failed.
There are a diverse number of software that support various mouses, but they still don't have support for the g403 wireless mouse.
If you are interested to participate and make changing colors and stuff on mouse possible on linux, please let me know.
Also, I've made a patch that would prevent the error from happening. https://github.com/ysph/g403-GUI-control/commit/1b7521b019fe258d559e40ce361ff8ef77a02a57
git pull && gcc main.c -lusb-1.0 && sudo ./a.out
So i tested the changes => no error, but the logo doesn't change.
Changing the color of my mouse is fun, but not a must have. I will continue to watch your program. Particapte will be hard for me, cause i'm not a coder.
Confia!