MatMoul / g810-led-python

Old Linux led controller for the Logitech G810 Keyboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

g810-led-python

Old Linux led controller for the Logitech G810 Keyboard

This is my first code for reverse engineering of the G810.

This project is now unmaintained but it's a good tutorial for sendind USB raw data in Python.

Please check for the new C++ version here: https://github.com/MatMoul/g810-led




Work only as root or with sudo.

Dependencies :

  • Python2
  • pyusb make sure you install PyUSB v1.0.0:

On Debian / Ubuntu derivatives:

apt-get install python-pip

pip install pyusb # (PyUSB-1.0.0.tar.gz)

Use :
g810-led {key} {color}
g810-led {profilefile}

Samples :
g810-led F1 ff0000
g810-led /etc/g810-led/profile1
g810-led sampleprofile1 g810-led sampleprofile2

Install (Copy g810-led in /usr/bin) :
cp g810-led /usr/bin

Profiles :
mkdir /etc/g810-led
cp sampleprofile1 /etc/g810-led/profile

SystemD unit in Arch Linux (For set profile at boot time) :
cat << EOF > /usr/lib/systemd/system/g810-led.service
[Unit]
Description=Set Logitech G810 Led Profile

[Service]
ExecStart=/bin/g810-led /etc/g810-led/profile

[Install]
WantedBy=multi-user.target
EOF

systemctl start g810-led
systemctl enable g810-led

About

Old Linux led controller for the Logitech G810 Keyboard

License:GNU General Public License v3.0


Languages

Language:Python 100.0%