Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find the g403 wireless mouse #2

Open
Maskulinum opened this issue Jun 11, 2020 · 10 comments
Open

Error: Cannot find the g403 wireless mouse #2

Maskulinum opened this issue Jun 11, 2020 · 10 comments

Comments

@Maskulinum
Copy link

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.

@ysph
Copy link
Owner

ysph commented Jun 12, 2020

I've pushed an additional method of finding it 7b52c94.
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?

@Maskulinum
Copy link
Author

Maskulinum commented Jun 13, 2020

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

@ysph
Copy link
Owner

ysph commented Jun 13, 2020

I made a tweak regarding that issue ef9acc9, seems like libusb version there was a bit old.
Try to compile again.

@ysph ysph changed the title Error finding g403 Mouse Error: Cannot find the g403 mouse Jun 13, 2020
@Maskulinum
Copy link
Author

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

@ysph
Copy link
Owner

ysph commented Jun 14, 2020

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.

@Maskulinum
Copy link
Author

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

@Maskulinum
Copy link
Author

I tested it with both, same error (USB-cable changed to c082 (line 8))

@ysph
Copy link
Owner

ysph commented Jun 15, 2020

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. 1b7521b

git pull && gcc main.c -lusb-1.0 && sudo ./a.out

@ysph ysph changed the title Error: Cannot find the g403 mouse Error: Cannot find the g403 wireless mouse Jun 16, 2020
@Maskulinum
Copy link
Author

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.

@infamybsd
Copy link

Confia!
image

Repository owner deleted a comment from AntonioSalazar Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants