USB Gamepad with Raspberry Pi

More
04 May 2014 00:41 #46557 by dawidma
Hi,
I am running LinuxCNC on a Rasperry PI + PiCNC.
The system is built up using the instructions from Kinsa Manka (code.google.com/p/picnc/wiki/CreateRaspbianLinuxCNC).
Until now I am quite happy with this configuration.

Kernel is:
Linux rpi-linuxcnc 3.10.36-xenomai+ #2 Fri Apr 11 08:04:23 UTC 2014 armv6l GNU/Linux

I want to add a USB pendant, but the system does not recognize it properly.
The gamepad is cheap china model (CSL 19638).

Using lsusb, the device gets shown:
pi@rpi-linuxcnc:~$ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0079:0006 DragonRise Inc. Generic USB Joystick

But the device is not visible in /dev/input:
pi@rpi-linuxcnc:~$ ls /dev/input/
mice

The file proc/bus/input/devices is empty

Output of dmesg:
[   56.846389] usb 1-1.2: new low-speed USB device number 4 using dwc_otg
[   56.958036] usb 1-1.2: New USB device found, idVendor=0079, idProduct=0006
[   56.958212] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   56.958344] usb 1-1.2: Product: Generic   USB  Joystick  
[   56.958446] usb 1-1.2: Manufacturer: DragonRise Inc.  

My Ubuntu PC detects the gamepad directy without any problems and generates a file under /dev/input/js0.

Does anybody know why the raspberry does not detect the gamepad correctly?

Please Log in or Create an account to join the conversation.

More
06 May 2014 04:42 #46643 by andypugh
Have you seen the bit at the very bottom of:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant
Where it mentions having to fiddle with the plugdev rules? Your problem might be related to that.
There are some more details at the bottom of the manpage too:
www.linuxcnc.org/docs/html/man/man1/hal_input.1.html
You might end up having to look around the Internet for further information, maybe googling for raspberry and udev together.

Please Log in or Create an account to join the conversation.

More
07 May 2014 02:20 #46659 by dawidma
Hello andypugh,
thanks for your response.
I already tried the entries in /etc/udev/rules.d. It does not solve the problem.

In the meantime I tried to use the gamepad with a standard Raspbian installation. The device gets installed correctly without any problems (/dev/input/js0).
On Raspbian the following modules get loaded:
pi@raspberrypi /etc/udev/rules.d $ lsmod
Module                  Size  Used by
evdev                   9419  1 
joydev                  9084  0 
hid_dr                  1433  0 

Copying the files in /etc/udev/rules.d from Raspbian to LinuxCNC does not change anything.
I also tried to add the group 'input' to LinuxCNC and assigned the user pi to it. No effect.

When I try to load the above mentioned modules manually on LinuxCNC, I get a failure when trying to load hid_dr:
pi@rpi-linuxcnc:~$ sudo modprobe hid_dr
FATAL: Module hid_dr not found.

When I understand it correctly this should be the driver for this gampad (even so it seems not to be used in the Raspbian standard installation).
So the next step would be to get this module running with LinuxCNC, but at the moment I do not understand why this module is not available. I thought it should be included in the LinuxCNC built.

Please Log in or Create an account to join the conversation.

More
19 May 2014 01:52 #47028 by dawidma
I've solved the problem. The missing kernel module for the DragonRise gamepad caused the trouble.
After compiling the Xenomai kernel with the driver support the gamepad is working now.

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum