[LINUX] Dynamically detect plugging in new joystick / gamepad controllers on Linux?
#1
Hello,
I was wondering if there was a way to trigger XBMC to re-scan for new controllers ?

I have setup XBMC with the correct keymap.xml and if I have my controller plugged in when I start XBMC it will find it and work just fine. If I don't have my controller plugged in and I start XBMC, then I later plug in my controller XBMC will not detect it. The controller gets created with a new /dev/input/eventX device.
Does JSON-RPC or one of the APIs support a Rescan Controllers type event I can call ? Or am I going to have to bite the bullet and create an Event Server ?

Thanks,
Raul
Reply
#2
ismell Wrote:Hello,
I was wondering if there was a way to trigger XBMC to re-scan for new controllers ?

I have setup XBMC with the correct keymap.xml and if I have my controller plugged in when I start XBMC it will find it and work just fine. If I don't have my controller plugged in and I start XBMC, then I later plug in my controller XBMC will not detect it. The controller gets created with a new /dev/input/eventX device.
Does JSON-RPC or one of the APIs support a Rescan Controllers type event I can call ? Or am I going to have to bite the bullet and create an Event Server ?

Thanks,
Raul

There is no way currently, ideally it should detect it. Please make a feature request for it and hopefully someone will take a look at it.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#3
Thanks for clearing that up.
I have added a ticket at http://trac.xbmc.org/ticket/11065.

Looks like I'll just write the event server for now.
Reply
#4
I had been working with a BluWave remote that really emulates a PS3 Joystick over USB . I came across this thread and it enlightened me as to this problem, as the BluWave (and others) seem to sleep or turn off the USB dongle after a period of inactivity. They do wake up and reconnect with the next button press.

All the while I thought my config was bad but after understanding that the Joystick must be connected, I fired up XBMC while keeping the remote active by pressing buttons, to find that IT WORKED!

Maybe there is a way I can force Linux to support the joystick remote even when it is not connected (or asleep), and report it as always connected to XBMC?
Reply
#5
Hi, sorry for the topic bumping, but this problem still exists (at least under ubuntu 12.10) and i really suffer from it as my bluetooth joysticks are the only way i have to control my XBMC box, and i have to restart XBMC when they disconnect for inactivity. It's really a pain for a media center.

Do any solution appeared since this discussion ?

Thanks in advance
Reply
#6
I would like to bump this too. Looking at trac, there used to be a patch that did this (http://trac.xbmc.org/attachment/ticket/5...plug.patch), but it used HAL to do so. As HAL is deprecated, this code is no longer there.

Can someone please re-implement this again?
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Dynamically detect plugging in new joystick / gamepad controllers on Linux?0