RPi
Attention : le support de la RPi doit être considéré comme expérimental. Soyez prêt à affronter des problèmes si vous exécutez GIMX sur la RPi.
GIMX peut s'exécuter sur beaucoup de cibles GNU/Linux, et le Raspberry Pi est l'une d'entre elles !
Contents
Considérations matérielles
Utiliser un HUB USB seulement si tous les ports USB sont occupés sur la RPi.
Il est fortement recommandé d'utiliser un HUB avec alimentation externe.
Mise à jour du firmware
Comme les premiers firmware avaient de gros soucis de gestion de l'USB, il est recommandé de mettre à jour le firmware avant d'utiliser GIMX.
Ceci est aussi utile pour utiliser un volant Logitech avec retour de force (le module uhid était absent dans les firmwares plus anciens).
Taper la commande suivante :
sudo rpi-update && sudo reboot
Firmware testé :
pi@raspberrypi ~ $ uname -a Linux raspberrypi 4.1.9+ #819 PREEMPT Thu Oct 1 20:31:26 BST 2015 armv6l GNU/Linux
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
-->
USB adapter using the on-board UART interface
Hardware requirements
The on-board UART runs at 0V/3.3V levels, and the AVR USB board has to run at 5V to operate at 16MHz (running at 3.3V would only allow to operate at 8MHz).
Connecting the RPi and the AVR USB board directly may damage the hardware!
One cheap solution is to use a voltage divider:
- Connect both GNDs
- It's safe to connect the TXD pin of the RPi to the Rx pin of the AVR USB board (the GIMX firmwares configure the Rx pin as an input)
- To connect the Tx pin of the AVR USB board to the RXD pin of the RPi, you'll need to convert the voltage level from 0..5V to 0..3.3V.
This can be done with a simple resistive divider:
Vin is the Tx pin of the AVR USB board, Vout is the RXD pin of the RPi, R1=2.2kΩ , R2=3.3kΩ
- Do not connect any other pin!
Sotware adjustments
By default, the RPi sends debug messages on the UART port. To use it for GIMX, we should execute:
sudo raspi-config
Then select:
"Advanced Options", "Serial", "No", "Finish"
Open the /boot/config.txt with the nano editor:
sudo nano /boot/config.txt
Add the following line at the end of the file:
init_uart_clock=8000000
Create a symbolic link to make gimx-launcher find the port:
sudo ln -s /dev/ttyAMA0 /dev/ttyUSB0
GIMX installation
sudo apt-get install gdebi wget http://gimx.fr/download/gimx-raspbian -O gimx.deb sudo gdebi gimx.deb
If you get a "Dependency is not satisfiable: ..." error message, upgrade Raspbian:
sudo apt-get update && sudo apt-get upgrade
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
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>