Difference between revisions of "RPi/de"

From GIMX
Jump to: navigation, search
(Updating to match new version of source page)
Line 1: Line 1:
 +
<languages />
 
Warnung: RPi Unterstützung sollte als experimentell betrachtet werden.Es kann zu Problemen kommen, wenn GIMX auf dem RPi ausgeführt werden soll.
 
Warnung: RPi Unterstützung sollte als experimentell betrachtet werden.Es kann zu Problemen kommen, wenn GIMX auf dem RPi ausgeführt werden soll.
  
 
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 ==
+
== Hardware considerations ==
* Raspberry Pi: model B, 256MB
 
* Distro: [http://www.raspberrypi.org/downloads 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
+
Use a USB HUB only if there are no ports available on the RPi.<br />
 
+
It is highly recommended to use a HUB with an external power supply.
* DIY USB adapter: Teensy 2.0 + CP2102 plugged on the USB hub
 
  
 
== Firmware update ==
 
== Firmware update ==
Line 56: Line 50:
 
make INSTALL_HDR_PATH=dest headers_install
 
make INSTALL_HDR_PATH=dest headers_install
 
sudo cp dest/include/linux/uhid.h /usr/include/linux/-->
 
sudo cp dest/include/linux/uhid.h /usr/include/linux/-->
 +
== 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).<br />
 +
Connecting the RPi and the AVR USB board directly may damage the hardware!<br />
 +
One cheap solution is to use a voltage divider:<br />
 +
* 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.<br />
 +
This can be done with a simple resistive divider:
 +
<div class="image200px">[http://gimx.fr/img/wiki/Resistive_divider.png http://gimx.fr/img/wiki/Resistive_divider.png]</div>
 +
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:
 +
<pre>
 +
sudo raspi-config
 +
</pre>
 +
Then select:
 +
<pre>
 +
"Advanced Options", "Serial", "No", "Finish"
 +
</pre>
 +
Open the /boot/config.txt with the nano editor:
 +
<pre>
 +
sudo nano /boot/config.txt
 +
</pre>
 +
Add the following line at the end of the file:
 +
<pre>
 +
init_uart_clock=8000000
 +
</pre>
 +
Create a symbolic link to make gimx-launcher find the port:
 +
<pre>
 +
sudo ln -s /dev/ttyAMA0 /dev/ttyUSB0
 +
</pre>
  
 
== GIMX installation ==
 
== GIMX installation ==
Line 89: Line 120:
 
In einem Terminal:
 
In einem Terminal:
 
  gimx -c <config file> -p /dev/<ttyUSB port>
 
  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 отправляет отладочные сообщения на последовательный порт.
 
Что бы использовать последовательный порт для своих нужд необходимо выполнить команду в терминале:
 
<pre>
 
sudo raspi-config
 
</pre>
 
Откроется gрограмма конфигурации
 
Выберем пункт:
 
<pre>
 
"Advanced Options" затем выберем "Serial" затем "No" затем "Finish"
 
</pre>
 
Но этого не достаточно. По умолчанию частота последовательного порта 3 MHz поднимем её до 8 MHz.
 
Выполним команду в терминале:
 
<pre>
 
sudo nano /boot/config.txt
 
</pre>
 
Добавим строку (если она существует просто поправте ее значение)
 
<pre>
 
init_uart_clock=8000000
 
</pre>
 
Установим GIMX для этого выполним последовательно команды в терминале:
 
<pre>
 
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
 
</pre>
 
После того как перезагрузится RPi (если она загрузится не в X) выполним команду в терминале:
 
<pre>
 
startx
 
</pre>
 
И сделаем ссылку на AMA0
 
<pre>
 
sudo ln -s /dev/ttyAMA0 /dev/ttyUSB0
 
</pre>
 
 
==== Подготовка Teensy ====
 
 
Нам подойдут 
 
Teensy 2.0
 
Teensy++ 2.0
 
 
Следуя инструкции 
 
https://www.pjrc.com/teensy/3volt.html
 
Припаяем MCP1825S-3302E/DB
 
Это даст нам напряжение на последовательном порту безопасное для RPi
 
 
Скачаем нужную нам прошивку
 
[http://gimx.fr/download/gimx-firmwares Firmwares]
 
Прошьем её с помощью [http://www.pjrc.com/teensy/loader.html Teensy Loader].
 
 
==== Схема подключения ====
 
[http://i.imgur.com/zKHfN3F.png http://i.imgur.com/zKHfN3F.png]
 
[http://i.imgur.com/sdedoFG.jpg http://i.imgur.com/sdedoFG.jpg]
 

Revision as of 12:18, 9 March 2016

Other languages:
Deutsch • ‎English • ‎français

Warnung: RPi Unterstützung sollte als experimentell betrachtet werden.Es kann zu Problemen kommen, wenn GIMX auf dem RPi ausgeführt werden soll.

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

Hardware considerations

Use a USB HUB only if there are no ports available on the RPi.
It is highly recommended to use a HUB with an external power supply.

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

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 einem Terminal:

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