User Tools

Site Tools


doc:appunti:hardware:raspberrypi_nas_remote_control

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
doc:appunti:hardware:raspberrypi_nas_remote_control [2021/04/12 16:29] – created niccolodoc:appunti:hardware:raspberrypi_nas_remote_control [2021/04/24 17:59] (current) – [Working kernel versions] niccolo
Line 1: Line 1:
-====== Using a gamepad as Kodi remote ======+====== Raspberry Pi NAS: Gamepad as Kodi remote ======
  
-The old model is identified by **lsusb** with this output line:+I have two SNES-Like gamepads, both are recognized by the Linux kernel Dragonrise module **hid_dr**. The older one is shipped with bot an **USB dongle** and a **Nintendo adapter**, the second one **has only the USB dongle**. In the picture the USB only model is the one with **colored keys**: 
 + 
 +{{.:raspberrypi:gamepad-dragonrise-0079-0011.jpg?280|}} 
 +{{.:raspberrypi:gamepad-dragonrise-0079-0126.jpg?280|}} 
 + 
 +They are different models: the old model is identified by **lsusb** with this output line:
  
 <code> <code>
Line 12: Line 17:
 Bus 002 Device 004: ID 0079:0126 DragonRise Inc. Bus 002 Device 004: ID 0079:0126 DragonRise Inc.
 </code> </code>
 +
 +To **pair** the gamepad with the USB receiver, first proceed by disconnecting the host USB dongle. Press the **Start**, **Select** and **Up** buttons simultaneously on the gamepad; the red LED starts flashing rapidly. During the next 10 seconds you have to insert the USB receiver into the host port, the pairing takes place automatically. 
 +
 +===== Configuring the gamepad in Kodi =====
 +
 +You have to install the package 
 +
 +  * **kodi-peripheral-joystick**
 +
 +Other packages may be useful to debug and solve problems:
 +
 +  * **input-utils** - Contains the **lsinput** and **input-events** tools, used to view input events produced by the gamepad.
 +  * **evtest** - Contains the **evtest** tool, used to monitor input events.
 +
 +Install the **kodi-peripheral-joystick** package and restart **Kodi**, then go to **Settings** => **System settings** => **Input** => **Configure attached controller**. In this section you can choose the controller type: Kodi 17.6 has only the **generic** one, Kodi 18.7 has a **generic Kodi** and a specific **Super Nintento**.
 +
 +Il is possible to configure each key, but default settings should be OK.
 +
 +Custom configuration is saved into the directory **$HOME/.kodi/userdata/peripheral_data/**, in our case the file was named **addon_YSTEK_MICREAL_USB_Gamepad.xml**.
 +
 +The gamepad goes to stand-by after some time of non-use. To wake it up it is necessary to press the **start** button; the red LED turns on and the gamepad is working.
 +
 +===== Problem: non working left and right arrows =====
 +
 +Everything is working correctly with a **Raspberry Pi 3**, using RaspiOS based on **Debian 9.11 Stretch** and **Kodi 17.6**. There is instead a problem with a **Raspberry Pi 4**, using RaspiOS based on **Debian 10.8** and **Kodi 18.7**: the **Left** and **Right** arrow keys do not work.
 +
 +Someone had the same problem using Retropie: **[[https://retropie.org.uk/forum/topic/25657/controler-issue-no-left-and-right-not-working-at-all/| Controler Issue (no left and right not working at all)]]**.
 +
 +==== Working kernel versions ====
 +
 +^ System                ^ Kernel              ABS_X Working  ^
 +| Raspberry Pi 3        | 4.19.66-v7+        | Yes  |
 +| Raspberry Pi 4        | 5.10.11-v7l+       | No   |
 +| PC amd64 Debian 10.8  | 4.9.189-3+deb9u2   | Yes  |
 +| PC amd64 Debian 10.8  | 4.19.67-2+deb10u2  | Yes  |
 +| PC amd64 Debian 10.8  | 4.19.98-1+deb10u1  | No   |
 +| PC amd64 Debian 10.8  | 4.19.160-2         | No   |
 +
 +===== Web References =====
 +
 +  * **[[https://www.retropie-italia.it/viewtopic.php?f=19&t=702|[GUIDA] DragonRise Inc. Generic USB Joystick]]**
 +  * **[[https://retropie.org.uk/forum/topic/25657/controler-issue-no-left-and-right-not-working-at-all/|Controler Issue (no left and right not working at all)]]**
  
doc/appunti/hardware/raspberrypi_nas_remote_control.1618244989.txt.gz · Last modified: 2021/04/12 16:29 by niccolo