You are not logged in.

#1 2010-09-07 00:43:32

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Can someone with a Logitech G5 test this thing?

http://wiki.archlinux.org/index.php/Get … h_G5_mouse

This article mentions g5hack. Does this program work well for you?

I find that I have to add a sleep in between each command sent to the device.

In other words:

--- a/g5_hiddev.c 2010-01-12 20:41:29.000000000 +0100
+++ b/g5_hiddev.c 2010-09-07 02:31:27.833162684 +0200
@@ -21,6 +21,7 @@
  * the driver gets the button event looks in its table, which resolution to use
  * sends it to the mouse sets the leds and the resolution
  */
+#include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -169,6 +170,7 @@
 
       /* disable speed buttons */
       send_msg(fd,0x00, 0x80, 0x01, 0x00, 0x00, 0x00);
+       sleep(1);
          
       /* the g5 has only 4 resolutions: 400, 800, 1600, 
        * 2000. the rest of the resolutions available in the 
@@ -261,15 +263,18 @@
             break;
       }
 
+       sleep(1);
       /* foobar: */
          /* at lowest speed ("-" button does not function anymore) */
-         /* send_msg(fd,0x00, 0x81, 0x51, 0x00, 0x00, 0x00); */
+         send_msg(fd,0x00, 0x81, 0x51, 0x00, 0x00, 0x00);
 
+       sleep(1);
          /* turn off all speed leds */
-         /* send_msg(fd,0x00, 0x80, 0x51, 0x11, 0x01, 0x00); */
+         send_msg(fd,0x00, 0x80, 0x51, 0x11, 0x01, 0x00);
 
+       sleep(1);
          /* turn on all speed leds */
-         /* send_msg(fd,0x00, 0x80, 0x51, 0x22, 0x02, 0x00); */
+         send_msg(fd,0x00, 0x80, 0x51, 0x22, 0x02, 0x00);
 
        } /* G5 */
 

If someone can confirm for another G[3579] whether these sleeps really help, I'll try to make a new version that only sends commands given on the command line.

Offline

Board footer

Powered by FluxBB