g13 tux logo   g13

g13 Libraries



About
This project has a Linux kernel driver and a set of libraries for interacting with the Logitech G13 gamepad.



Linux G13 Driver

These libraries depend upon the Linux G13 driver. This driver is not yet in the mainline kernel.

Building a Fedora 12 Kernel with the G13 driver
The Fedora project has a page for advanced users on building custom kernels here: http://fedoraproject.org/wiki/Docs/CustomKernel
To build a Fedora 12 kernel with the current version of the G13 driver you will need to do the following:
  1. Follow the instructions on the link above to set up an RPM package building environment.
  2. For step 2 (Get the Source) you can either use yumdownloader or get a copy of the kernel SRPM here:
    http://mirrors.kernel.org/fedora/updates/12/SRPMS/kernel-2.6.32.9-70.fc12.src.rpm
  3. Install the build dependencies for your kernel source
     su -c 'yum-builddep kernel-2.6.32.9-70.fc12.src.rpm' 
    
  4. Install the SRPM into your ~/rpmbuild directory.
     rpm -Uvh kernel-2.6.32.9-70.fc12.src.rpm 
    
  5. Copy these files into ~/rpmbuild/SOURCES
  6. On the Fedora page you can ignore the steps labelled Prepare the Kernel Source Tree, Copy the Source Tree and Generate a Patch, Configure Kernel Options, and Prepare Build Files as these steps are taken care of by the files you copied from miskatonic.cs.nmsu.edu.
  7. Build the kernel. The Fedora page lists many options. I usually use the following from ~/rpmbuild/SPECS:
     rpmbuild -bb -with firmware -without debug kernel.spec 
    
    This will build the rpms in ~/rpmbuild/RPMS/{some-arch_like_i686} and they will be built with the tag g13 in the rpm name, such as kernel-2.6.32.9-70.g13.1.fc12.i686.rpm.
  8. Install the rpms. I usually use something like the following from the ~/rpmbuild/RPMS/i686 directory:
     su -c 'yum localinstall --nogpgcheck kernel-2.6.32.9-70.g13.1.fc12.i686.rpm kernel-firmware-2.6.32.9-70.g13.1.fc12.i686.rpm' 
    
    Of course, if you also want the other packages like PAE, kernel-headers or kernel-devel add those as well. But, to use the G13 driver and the G13 libraries the above command should be sufficient.
Fedora 12 kernels with the driver
I will try and provide SRPMS and RPMS for the current Fedora 12 kernel that incorporate the driver soon. When I have them built you will find them here: http://miskatonic.cs.nmsu.edu/g13/
Other Linux distributions
How to incorporate this patch into your kernel is beyond the scope of this documentation. If you're not familiar with how to patch and rebuild your kernel from the above patch you are probably better off waiting until your distribution provides the driver.



Status
  • Linux G13 driver - version 0.0.5 submitted for inclusion in the hid tree; version 0.0.6 will be submitted soon
  • Fedora 12 Kernels with G13 driver - Not built yet
  • libg13 - working and tested
  • libg13mm - not yet ready
  • libg13-cairo - working and tested
  • libg13-cairomm - not in svn yet
  • libg13-gtk - not in svn yet
  • libg13-gtkmm - not in svn yet
  • libg13-papyrus - not in svn yet



Libraries
  • libg13 - A C library that uses libudev and libsysfs to interact with the Linux g13 driver
    • This library includes functions to examine and control:
      • Backlight color
      • M1, M2, M3 and MR led states
      • Switch between keymaps 1, 2 and 3
      • Key values for each keymap
      • Unique device identifiers
      • LCD framebuffer
      • State save/restore
      • et. al.
  • libg13mm - A C++ library that uses libg13 to interact with the Linux g13 driver
    • This library encapsulates the g13 device as a class and provides methods to examine and control the various aspects of the g13 device.
  • libg13-cairo - A C library for drawing on the G13 LCD framebuffer with the cairo library
  • libg13-cairomm - A C++ library for drawingon the G13 LCD framebuffer with the cairomm library
  • libg13-gtk - A C library of Gtk+ widgets for interacting with the g13 driver
  • libg13-gtkmm - A C++ library of Gtkmm widgets for interacting with the g13 driver
  • libg13-papyrus - A C++ library for drawing on the G13 LCD framebuffer with the papyrus library



g13 Sourceforge Project Page
The g13 sourceforge project page can be found here:
http://sourceforge.net/projects/g13
News



Download g13 packages or get the source code

Source Code
There aren't any releases yet, but when there are you'll find them at the link below. Releases - (.bz2, .gz, .zip) can be found here
Subversion Repository



Dependencies... and where to get them
libudev: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
libsysfs: http://linux-diag.sourceforge.net/Sysfsutils.html
gtk Logo Gtk: http://gtk.org
Gtkmm: http://gtkmm.org
cairo Logo cairo: http://www.cairographics.org
cairomm Logo cairomm: http://www.cairographics.org/cairomm
papyrus Logo papyrus: http://libpapyrus.sourceforge.net



Documentation, Tutorials, Guides, Quick Start, et. al.
API Reference
The API documentation (including the pages you are reading now) have been generated with Doxygen.
devhelp
The built documentation also includes a devhelp index. The index is installed automatically in the g13-doc RPM and can be browsed simply by starting devhelp.
The most current documentation for the g13 libraries is available online here:
Key sections within the API reference



Mailing Lists



Bugs
View reported bugs in the bug tracker
Submit a bug report here



Patches
Patches are always welcome!!!
View submitted patches
Submit patches here



Feature Requests
Submit feature requests here



License
The g13 libraries are released under the GPLv3

Generated on Wed Mar 24 10:13:17 2010 for g13 by doxygen 1.6.1