Mouse LED Control in Python

semagraw at gmail.com semagraw at gmail.com
Sun Jul 30 16:26:40 EDT 2006


I found this link that describes the byte arrays to control the
IM/Email Leds on my Logitech MX610 mouse:

http://www.kdedevelopers.org/node/2029

The link to the tarball is dead so I can't look at that.  Is there
anyway to do what the link says in Python? If you follow the link
above, it talks about 'sending the byte array to 0x10 (16)'.  I'm not
sure if that is possible in python.  Can anyone help or point me in the
right direction?  I'd also be willing to have this be done in another
language and just call different programs from a python program when I
need something specific done (IM light on, for example).



Text from the link if you can't be bothered to follow it:

"I've figured out the IM led now. As before, you send 6 bytes to report
ID 0x10
(16), followed by the "confirm" message.

The magic values are:
unsigned char confirm[6] = { 0x01, 0x80, 0x52, 0x00, 0x00, 0x00 };
unsigned char email_off[6] = { 0x01, 0x80, 0x52, 0x06, 0x00, 0x00 };
unsigned char email_on[6] = { 0x01, 0x80, 0x52, 0x05, 0x00, 0x00 };
unsigned char email_pulse[6] = { 0x01, 0x80, 0x52, 0x04, 0x00, 0x00 };
unsigned char email_flash[6] = { 0x01, 0x80, 0x52, 0x03, 0x00, 0x00 };
unsigned char email_instanton[6] = { 0x01, 0x80, 0x52, 0x02, 0x00, 0x00
};
unsigned char email_instantoff[6] = { 0x01, 0x80, 0x52, 0x01, 0x00,
0x00 };

unsigned char im_off[6] = { 0x01, 0x80, 0x52, 0x00, 0x06, 0x00 };
unsigned char im_on[6] = { 0x01, 0x80, 0x52, 0x00, 0x05, 0x00 };
unsigned char im_pulse[6] = { 0x01, 0x80, 0x52, 0x00, 0x04, 0x00 };
unsigned char im_flash[6] = { 0x01, 0x80, 0x52, 0x00, 0x03, 0x00 };
unsigned char im_instantoff[6] = { 0x01, 0x80, 0x52, 0x00, 0x01, 0x00
};
unsigned char im_instanton[6] = { 0x01, 0x80, 0x52, 0x00, 0x02, 0x00
};"


Thanks,

Jeff




More information about the Python-list mailing list