RPi

From GIMX

Revision as of 19:15, 1 October 2015 by Matlo (talk | contribs) (Fix for USB issues)

Jump to: navigation, search

Warning: RPi support should be considered as experimental. Be prepared to face issues if you try GIMX on the RPi.

GIMX can run on many Linux targets, and the the Raspberry Pi is one of them!

Tested setup

* Raspberry Pi: model B, 256MB
* Distro: Raspbian wheezy (2013-07-26-wheezy-raspbian)
* Self-powered USB hub: Belkin 7 ports F4U017 (self-powered = with an external power supply)
* Keyboard: n25te plugged on the USB hub
* Mouse: Logitech G500 plugged on the USB hub
* PS3: FAT - FW 4.41
* Bluetooth dongle: Pluscom BT20 (CSR Bluecore4-rom) plugged on the USB hub
* DIY USB adapter: Teensy 2.0 + CP2102 plugged on the USB hub

Firmware update

As early firmwares had severe USB issues it is recommended to update the firmware before using GIMX.
Type the following command and reboot:

sudo rpi-update

Tested Rpi firmware:

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 4.1.8+ #818 PREEMPT Tue Sep 29 01:20:55 BST 2015 armv6l GNU/Linux
pi@raspberrypi ~ $ /opt/vc/bin/vcgencmd version
Sep 29 2015 13:06:19 
Copyright (c) 2012 Broadcom
version 3bbf5122d0c4ff421c92d72871dbc8fa104a976d (clean) (release)

UHID kernel module

If you plan to use a Logitech force feedback wheel, you will have to build the uhid.ko module for your kernel.
Install the right version of gcc, as explained here: link.
Update your kernel:

sudo rpi-update

In case the kernel was updated, reboot:

sudo reboot

Install the rpi-source tool:

sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-update

Run rpi-source:

rpi-source

This step may take a while to complete.
Install ncurses:

sudo apt-get install libncurses5-dev

Enable the UHID module compilation:

cd linux
make menuconfig

Select Device Drivers>HID support>User-space I/O driver support for HID subsystem. The line should start with '<M>'.
To speed up the compilation, you can disable all other modules in the HID support section and subsections.
Save the config to the default location and exit.
Build the module:

make prepare
make scripts
make M=drivers/hid

Install it:

sudo cp drivers/hid/uhid.ko /lib/modules/`uname -r`/kernel/drivers/hid/
sudo depmod -a


GIMX installation

sudo apt-get install gdebi
wget http://gimx.fr/download/gimx-raspbian.html -O gimx.deb
sudo gdebi gimx.deb

Stop/disable triggerhappy service

Triggerhappy is a daemon that opens every input device for reading, and that consumes a few percent of the CPU time.

It seems a good idea to stop it while running GIMX.

To stop triggerhappy:

sudo service triggerhappy stop

To disable triggerhappy:

sudo update-rc.d triggerhappy disable

Run GIMX

Read the Quick start page to learn how to run GIMX through the GUI.
A good idea is to run GIMX directly from a terminal, without starting a graphical session.
This can be done over the network, using a ssh client.
Ideally, GIMX should be launched without using the Ethernet port (because it is connected on the USB bus).
More details on command line options on this page.

Bluetooth

Before running GIMX, it is necessary to install the bluez package:

sudo apt-get install bluez

In a terminal:

gimx -t Sixaxis -c <config file> -b <PS3 bdaddr>

The dongle address has to be changed before running the above commands.

DIY USB adapter

In a terminal:

gimx -c <config file> -p /dev/<ttyUSB port>