Difference between revisions of "RPi"

From GIMX
Jump to: navigation, search
(Marked this version for translation)
Line 1: Line 1:
 
<translate>
 
<translate>
 +
<!--T:1-->
 
'''Warning: RPi support should be considered as experimental. Be prepared to face issues if you try GIMX on the RPi.'''
 
'''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 [http://www.raspberrypi.org/ the Raspberry Pi] is one of them!
 
GIMX can run on many Linux targets, and the [http://www.raspberrypi.org/ the Raspberry Pi] is one of them!
== Tested setup ==
+
== Tested setup == <!--T:2-->
 
  * Raspberry Pi: model B, 256MB
 
  * Raspberry Pi: model B, 256MB
 
  * Distro: [http://www.raspberrypi.org/downloads Raspbian Jessie] (2015-09-24)
 
  * Distro: [http://www.raspberrypi.org/downloads Raspbian Jessie] (2015-09-24)
Line 11: Line 12:
 
  * PS3: FAT - FW 4.41
 
  * PS3: FAT - FW 4.41
  
  * Bluetooth dongle: Pluscom BT20 (CSR Bluecore4-rom) plugged on the USB hub
+
  <!--T:3-->
 +
* Bluetooth dongle: Pluscom BT20 (CSR Bluecore4-rom) plugged on the USB hub
  
  * DIY USB adapter: Teensy 2.0 + CP2102 plugged on the USB hub
+
  <!--T:4-->
 +
* DIY USB adapter: Teensy 2.0 + CP2102 plugged on the USB hub
  
== Firmware update ==
+
== Firmware update == <!--T:5-->
 
As early firmwares had severe USB issues it is recommended to update the firmware before using GIMX.<br />
 
As early firmwares had severe USB issues it is recommended to update the firmware before using GIMX.<br />
 
Updating the firmware may also be useful if you plan to use a Logitech force feedback wheel (the uhid kernel module was missing in earlier firmwares).<br />
 
Updating the firmware may also be useful if you plan to use a Logitech force feedback wheel (the uhid kernel module was missing in earlier firmwares).<br />
Line 28: Line 31:
 
<!--== UHID kernel module ==
 
<!--== UHID kernel module ==
  
 +
<!--T:6-->
 
If you plan to use a Logitech force feedback wheel, you will have to build the uhid.ko module for your kernel.<br />
 
If you plan to use a Logitech force feedback wheel, you will have to build the uhid.ko module for your kernel.<br />
 
Install the right version of gcc, as explained here: [https://github.com/notro/rpi-source/wiki link].<br />
 
Install the right version of gcc, as explained here: [https://github.com/notro/rpi-source/wiki link].<br />
Line 58: Line 62:
 
sudo cp dest/include/linux/uhid.h /usr/include/linux/-->
 
sudo cp dest/include/linux/uhid.h /usr/include/linux/-->
  
== GIMX installation ==
+
== GIMX installation == <!--T:7-->
 
<pre>sudo apt-get install gdebi
 
<pre>sudo apt-get install gdebi
 
wget http://gimx.fr/download/gimx-raspbian -O gimx.deb
 
wget http://gimx.fr/download/gimx-raspbian -O gimx.deb
 
sudo gdebi gimx.deb</pre>
 
sudo gdebi gimx.deb</pre>
  
 +
<!--T:8-->
 
If you get a "Dependency is not satisfiable: ..." error message, upgrade Raspbian:
 
If you get a "Dependency is not satisfiable: ..." error message, upgrade Raspbian:
 
<pre>sudo apt-get update && sudo apt-get upgrade</pre>
 
<pre>sudo apt-get update && sudo apt-get upgrade</pre>
  
== Stop/disable triggerhappy service ==
+
== Stop/disable triggerhappy service == <!--T:9-->
 
[https://github.com/wertarbyte/triggerhappy/blob/master/README Triggerhappy] is a daemon that opens every input device for reading, and that consumes a few percent of the CPU time.
 
[https://github.com/wertarbyte/triggerhappy/blob/master/README Triggerhappy] is a daemon that opens every input device for reading, and that consumes a few percent of the CPU time.
  
 +
<!--T:10-->
 
It seems a good idea to stop it while running GIMX.
 
It seems a good idea to stop it while running GIMX.
  
 +
<!--T:11-->
 
To stop triggerhappy:
 
To stop triggerhappy:
 
  sudo service triggerhappy stop
 
  sudo service triggerhappy stop
Line 76: Line 83:
 
  sudo update-rc.d triggerhappy disable
 
  sudo update-rc.d triggerhappy disable
  
== Run GIMX ==
+
== Run GIMX == <!--T:12-->
 
Read the [[Quick_Start|Quick start page]] to learn how to run GIMX through the GUI.<br />
 
Read the [[Quick_Start|Quick start page]] to learn how to run GIMX through the GUI.<br />
 
A good idea is to run GIMX directly from a terminal, without starting a graphical session.<br />
 
A good idea is to run GIMX directly from a terminal, without starting a graphical session.<br />
Line 87: Line 94:
 
The dongle address has to be changed before running the above commands.
 
The dongle address has to be changed before running the above commands.
  
=== DIY USB adapter ===
+
=== DIY USB adapter === <!--T:13-->
 
In a terminal:
 
In a terminal:
 
  gimx -c <config file> -p /dev/<ttyUSB port>
 
  gimx -c <config file> -p /dev/<ttyUSB port>
  
  
=== Without DIY USB adapter (RU) ===  
+
=== Without DIY USB adapter (RU) === <!--T:14-->
  
====Подготовка RPi====
+
====Подготовка RPi==== <!--T:15-->
  
 +
<!--T:16-->
 
Нам подойдет любая из моделей RPi:
 
Нам подойдет любая из моделей RPi:
 
Raspberry Pi A+
 
Raspberry Pi A+
Line 103: Line 111:
 
Raspberry Pi Zero
 
Raspberry Pi Zero
  
 +
<!--T:17-->
 
По умолчанию RPi отправляет отладочные сообщения на последовательный порт.  
 
По умолчанию RPi отправляет отладочные сообщения на последовательный порт.  
 
Что бы использовать последовательный порт для своих нужд необходимо выполнить команду в терминале:
 
Что бы использовать последовательный порт для своих нужд необходимо выполнить команду в терминале:
Line 140: Line 149:
 
</pre>
 
</pre>
  
==== Подготовка Teensy ====
+
==== Подготовка Teensy ==== <!--T:18-->
  
 +
<!--T:19-->
 
Нам подойдут   
 
Нам подойдут   
 
Teensy 2.0
 
Teensy 2.0
 
Teensy++ 2.0
 
Teensy++ 2.0
  
 +
<!--T:20-->
 
Следуя инструкции   
 
Следуя инструкции   
 
https://www.pjrc.com/teensy/3volt.html
 
https://www.pjrc.com/teensy/3volt.html
Line 151: Line 162:
 
Это даст нам напряжение на последовательном порту безопасное для RPi  
 
Это даст нам напряжение на последовательном порту безопасное для RPi  
  
 +
<!--T:21-->
 
Скачаем нужную нам прошивку  
 
Скачаем нужную нам прошивку  
 
[http://gimx.fr/download/gimx-firmwares Firmwares]
 
[http://gimx.fr/download/gimx-firmwares Firmwares]
 
Прошьем её с помощью [http://www.pjrc.com/teensy/loader.html Teensy Loader].
 
Прошьем её с помощью [http://www.pjrc.com/teensy/loader.html Teensy Loader].
  
==== Схема подключения ====
+
==== Схема подключения ==== <!--T:22-->
 
[http://i.imgur.com/zKHfN3F.png http://i.imgur.com/zKHfN3F.png]
 
[http://i.imgur.com/zKHfN3F.png http://i.imgur.com/zKHfN3F.png]
 
[http://i.imgur.com/sdedoFG.jpg http://i.imgur.com/sdedoFG.jpg]
 
[http://i.imgur.com/sdedoFG.jpg http://i.imgur.com/sdedoFG.jpg]
 
</translate>
 
</translate>

Revision as of 10:16, 1 February 2016

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 Jessie (2015-09-24)
* 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.
Updating the firmware may also be useful if you plan to use a Logitech force feedback wheel (the uhid kernel module was missing in earlier firmwares).
Type the following command:

sudo rpi-update

And don't forget to reboot:

sudo reboot

Tested Rpi firmware:

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 4.1.9+ #819 PREEMPT Thu Oct 1 20:31:26 BST 2015 armv6l
GNU/Linux

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>


Without DIY USB adapter (RU)

Подготовка RPi

Нам подойдет любая из моделей RPi: Raspberry Pi A+ Raspberry Pi B Raspberry Pi B+ Raspberry Pi 2 Raspberry Pi Zero

По умолчанию RPi отправляет отладочные сообщения на последовательный порт. Что бы использовать последовательный порт для своих нужд необходимо выполнить команду в терминале:

sudo raspi-config 

Откроется gрограмма конфигурации Выберем пункт:

"Advanced Options" затем выберем "Serial" затем "No" затем "Finish"

Но этого не достаточно. По умолчанию частота последовательного порта 3 MHz поднимем её до 8 MHz. Выполним команду в терминале:

sudo nano /boot/config.txt

Добавим строку (если она существует просто поправте ее значение)

init_uart_clock=8000000 

Установим GIMX для этого выполним последовательно команды в терминале:

sudo apt-get install gdebi
wget http://gimx.fr/download/gimx-raspbian -O gimx.deb
sudo gdebi gimx.deb
sudo service triggerhappy stop
sudo update-rc.d triggerhappy disable
sudo reboot

После того как перезагрузится RPi (если она загрузится не в X) выполним команду в терминале:

startx

И сделаем ссылку на AMA0

sudo ln -s /dev/ttyAMA0 /dev/ttyUSB0

Подготовка Teensy

Нам подойдут Teensy 2.0 Teensy++ 2.0

Следуя инструкции https://www.pjrc.com/teensy/3volt.html Припаяем MCP1825S-3302E/DB Это даст нам напряжение на последовательном порту безопасное для RPi

Скачаем нужную нам прошивку Firmwares Прошьем её с помощью Teensy Loader.

Схема подключения

http://i.imgur.com/zKHfN3F.png http://i.imgur.com/sdedoFG.jpg