HID / GamePad Support for Raspberry Pi

All the topics related to QLC+ on the Raspberry Pi
Post Reply
fear3ck
Posts: 3
Joined: Sun Aug 12, 2018 4:54 pm
Real Name: Julian

Hey there!

Is there a way to use an gamepad as controller in QLC+ for Raspi? I‘m considering about building a footswitch with one of those chinese arcade-controller-board as Interface. To check the functionality, i pluged it in, but QLC+ did‘nt recognized it...

Maybe someone has got an idea for me. Taking a board from an old keyboard is a little to tricky for me to solder.

Thank u!
User avatar
mcallegari
Posts: 4807
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

QLC+ recognizes joysticks/joypads as long as they fit in the HID category. If they require custom drivers to work, then most likely they won't be recognized or they won't be HID.
Can you please plug it in and from a shell type in the "dmesg" command ?
Please share the last lines of output here (from when Linux detects the USB plug event)
Cheers
BillDoE
Posts: 31
Joined: Fri Apr 05, 2019 6:23 am
Real Name: Bill K

I know this is old but, I'm still trying to get this working if possible.
Pi 4b
Xbox360 xpad or xboxdrv drivers both seem to work on the command line.

[dmesg]
[ 523.398465] input: Xbox 360 Wireless Receiver as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input5

[ /proc/bus/input/device ]
I: Bus=0003 Vendor=045e Product=02a1 Version=0100
N: Name="Xbox 360 Wireless Receiver"
P: Phys=usb-0000:01:00.0-1.2/input0
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input5
U: Uniq=
H: Handlers=event4 js0
B: PROP=0
B: EV=20000b
B: KEY=f 0 0 0 0 0 0 0 0 0 0 0 0 7cdb0000 0 0 0 0 0 0 0 0 0
B: ABS=3003f
B: FF=1 7030000 0 0
RPi4b 4GB
BillDoE
Posts: 31
Joined: Fri Apr 05, 2019 6:23 am
Real Name: Bill K

Never mind.
After doing the my own research on the wireless Xbox 360 controller, it is not HID compliant and will not show up in qlcplus Input/Output as HID on Debian.
I have gotten the xboxdrv driver to emulate Mouse and keyboard Events for virtually any usb controller.
xboxdrv manpage:
https://xboxdrv.gitlab.io/xboxdrv.html

apt-get install xboxdrv
$ sudo xboxdrv --mouse --detach-kernel-driver

You can have several configs for one controller and toggle from mouse to keyboard emulation during runtime.
$ sudo xboxdrv --config ~/control/mouse.xboxdrv --alt-config ~/control/keyboard.xboxdrv --detach-kernel-driver --silent

If you get that working you can set it up as a service.
https://gist.github.com/encounter/458c518c6e4a7b896de7

the 2nd file xboxbrv.service had some errors and things I changed. Mine look like this.
File : /usr/lib/systemd/system/xboxdrv.service
#######################################
[Unit]
Description=Xbox controller driver daemon
Documentation=man:xboxdrv(1)

[Service]
Type=forking
User=root
PIDFile=/run/xboxdrv.pid
ExecStart=/usr/bin/xboxdrv --daemon --detach --pid-file /run/xboxdrv.pid --dbus disabled --silent \
--config /home/pi/control/mouse.xboxdrv --detach-kernel-driver \
--alt-config /home/pi/control/mouse2.xboxdrv --detach-kernel-driver

[Install]
WantedBy=multi-user.target
###########################################
RPi4b 4GB
Post Reply