Logitech G110 ??

I bought G110 which is the light version of the extra-ultra-super expensive G19.
It does not feature LCD screen.
Multimedia keys work out of the box.
However G keys produce the same scan code with the corresponding F keys (12 in total)
and M keys do not provide any IIRC.
I edited the libg15.c (or whatever) and entered the keyboard name, device and product id and features (only G keys)
but now the G keys do not provide ANY scan code.

Does anyone have a clue how to use the G keys?
I can donate a reasonable/humble amount of money to a responsible and experienced member of the forum in order to buy the keyboard.
I could also accept to install windows to find out info but I am not at all experienced reverse engineer.
(actually I am still doing my thesis for -forward- engineer :D:D:D )

tx

made it works

you were correct to edit the libg15.c to identify the keyboard but you were missing some other changes to make in order to decode the keys.

the g110 produces 4 bytes codes instead of 5 or 9 for other logitech keyboards.

you have to modify the getPressedKeys method to handle a 4 bytes return value in his switch.

you also have to create a new function processKeyEvent4Byte to decode the keys.

simple as that!

hope this helps

Excellent!

Sounds awesome. Can you provide a patch? I have a G19 available to me and it would be interesting to see if they share the same keycodes.

g110 patch

hi,

here is the g110 patch. As you said you have a G19 so you will have to add it to the device list at the top of the file so it is recognized.

--- libg15-1.2.7/libg15.c 2008-11-11 08:51:26.000000000 -0500
+++ new libg15-1.2.7/libg15.c 2010-03-16 07:23:27.174737274 -0400
@@ -44,6 +44,7 @@
const libg15_devices_t g15_devices[] = {
DEVICE("Logitech G15",0x46d,0xc222,G15_LCD|G15_KEYS),
DEVICE("Logitech G11",0x46d,0xc225,G15_KEYS),
+ DEVICE("Logitech G110",0x46d,0xc22b,G15_KEYS),
DEVICE("Logitech Z-10",0x46d,0x0a07,G15_LCD|G15_KEYS|G15_DEVICE_IS_SHARED),
DEVICE("Logitech G15 v2",0x46d,0xc227,G15_LCD|G15_KEYS|G15_DEVICE_5BYTE_RETURN),
DEVICE("Logitech Gamepanel",0x46d,0xc251,G15_LCD|G15_KEYS|G15_DEVICE_IS_SHARED),
@@ -762,6 +763,69 @@
}
}

+static void processKeyEvent4Byte(unsigned int *pressed_keys, unsigned char *buffer)
+{
+ int i;
+
+ *pressed_keys = 0;
+
+ g15_log(stderr,G15_LOG_WARN,"Keyboard: %x, %x, %x, %x\n",buffer[0],buffer[1],buffer[2],buffer[3]);
+
+ if (buffer[0] == 0x02)
+ {
+ if (buffer[1]&0x01)
+ *pressed_keys |= G15_KEY_G1;
+
+ if (buffer[1]&0x02)
+ *pressed_keys |= G15_KEY_G2;
+
+ if (buffer[1]&0x04)
+ *pressed_keys |= G15_KEY_G3;
+
+ if (buffer[1]&0x08)
+ *pressed_keys |= G15_KEY_G4;
+
+ if (buffer[1]&0x10)
+ *pressed_keys |= G15_KEY_G5;
+
+ if (buffer[1]&0x20)
+ *pressed_keys |= G15_KEY_G6;
+
+ if (buffer[1]&0x40)
+ *pressed_keys |= G15_KEY_G7;
+
+ if (buffer[1]&0x80)
+ *pressed_keys |= G15_KEY_G8;
+
+ if (buffer[2]&0x01)
+ *pressed_keys |= G15_KEY_G9;
+
+ if (buffer[2]&0x02)
+ *pressed_keys |= G15_KEY_G10;
+
+ if (buffer[2]&0x04)
+ *pressed_keys |= G15_KEY_G11;
+
+ if (buffer[2]&0x08)
+ *pressed_keys |= G15_KEY_G12;
+
+ if (buffer[2]&0x10)
+ *pressed_keys |= G15_KEY_M1;
+
+ if (buffer[2]&0x20)
+ *pressed_keys |= G15_KEY_M2;
+
+ if (buffer[2]&0x40)
+ *pressed_keys |= G15_KEY_M3;
+
+ if (buffer[2]&0x80)
+ *pressed_keys |= G15_KEY_MR;
+
+ if (buffer[3]&0x1)
+ *pressed_keys |= G15_KEY_LIGHT;
+
+ }
+}

int getPressedKeys(unsigned int *pressed_keys, unsigned int timeout)
{
@@ -780,6 +844,9 @@
}

switch(ret) {
+ case 4:
+ processKeyEvent4Byte(pressed_keys, buffer);
+ return G15_NO_ERROR;
case 5:
processKeyEvent5Byte(pressed_keys, buffer);
return G15_NO_ERROR;

Try running libg15 with

Try running libg15 with maximum debuglevel and see if it registers the keypresses. Also g15daemon too and see if it has anything interresting. If those fail you might want to dig deeper and look what the kernel sees.
I do not really know how to do all this, but there's been people doing similar somewhere here on the forums (rolleyes), might have some luck there..
Also do you know if the G110 has It's own processor in it like the G19 (which runs linux AFAIK)? Or did they strip that out together with the LCD?

I'm attempting this as well with the G19.

Despite having it's own CPU, the G19 doesn't appear to have a lot of 'intelligence' inside it - the screen appears to be updated as raw 16-bit data on every frame (ie there's nothing 'running' on the keyboard to maintain the screen), and the M1-M3, MR backlights are just set using a bitmask.

However, it seems to actually upload the macro profile to the keyboard on connection, which would explain what the CPU's for (like the Razer), in which case that would mean the G keys would have to be configured over USB, rather than just being able to grab their IDs from a driver. According to Logitech's website, the G110 has;

"Onboard memory
It saves your profiles so you can take your personal preferences with you."

Which would suggest the same thing.