Problems with Android Tablets, Chrome, Gamepad


#1

Has anyone successfully used a gamepad with Android Chrome? Aside from some balky keymapper hack? I want a native solution that allows proportional control.

I have been messing with this for days now with almost zero success. I have a Logitech F310, F710, Ipega 9023 (Bluetooth), and generic PS3 controller. Using OTG cables with Samsung Galaxy Tab 2 10.1" running 4.2.2, and a Galaxy Tab A 8" running Android 6.0. Both running Chrome 51. Also tried it with the latest Firefox and Opera.

I have tried every possible combination of the above with absolutely zero response within Cockpit. All of the gamepads work properly with Gamepad Tester app. All work fine on Chrome in Windows 10 and Windows 7. www.html5gamepad.com shows various degrees of recognition depending on browser and gamepad. Firefox seems to have the best Gamepad API implementation currently but it still doesn’t work with Cockpit. We have a 2.8 with latest image.

Not sure where the problem lies exactly although I see that gamepad.js is 4 years old and lacking settings for my specific combinations. No idea how to fix that.

Any advice would be appreciated, I’m trying to come up with a lightweight control solution that can be used on a small boat and doesn’t involve 50lbs worth of laptop, marine battery, and inverter.

Thanks,

Tim


#2

Update- I have replaced gamepad.js with a more up to date version found here https://github.com/kallaspriit/HTML5-JavaScript-Gamepad-Controller-Library

This also required edits of rovpilot.js to update the names of some of the buttons.

Gamepads are now working partially in Android Chrome, a little better in Firefox. Still a problem with the left joystick but hopefully this can be ironed out with a few more tweaks. Still don’t really know what I’m doing with all this but it is some progress.

I really hope the next 30.1.0 release addresses this stuff. Anyone know how soon that is going to be released?


#3

So at this point all gamepads work perfectly in Firefox but I can’t get the video feed to run in Cockpit, although it streams just fine directly from port 8090.

Android Chrome doesn’t properly recognize gamepads natively, so you can’t fix it with a remap in gamepad.js because Chrome doesn’t even see the right stick or half of the buttons.

So apparently under Android if you want proportional controls and native gamepad support you are out of luck. You can have a working gamepad or a working video feed but not both. That goal seems to be a dead end for now.

EDIT:

What does work under Chrome/Android: 1) Bluetooth gamepad paired in Keyboard Mode, and edit your rovpilot.js file appropriately (see post below), or 2) With a gamepad that is recognized by Android, use Tincore Keymapper to do keyboard emulation in Chrome. Does not require editing rovpilot.js. This MAY work depending on what version Android and if you are rooted or not, Tincore is fussy and there are many variables and YMMV.

There may be some gamepad out there that Android Chrome does recognize properly, but I am not aware of it yet. If someone has other gamepads than those listed so far and want to test them for compatibility, please let us know! This is the site to use for testing- html5gamepad.com


#4

Here is a gamepad that is working on android in this thread. Maybe there is some info there that will help…


#5

Hi Brendan, yes I saw that and it does work, I have the same Ipega as in that post.

Two issues that I have with that, 1) I would like to have proportional control on the sticks rather than keyboard emulation, and 2) our ROV belongs to an organization and I am not the only operator. Our control scheme needs to work consistently across Windows and Android and with various controllers, which is why native gamepad support is important. In order to achieve that I need to keep a standardized rovcontrol.js file. So in that case using the Ipega with my tablet will require inserting Tincore Keymapper app into the process, which I found to be balky and more trouble than it was worth, and that’s why I started this thread in the first place. At this point its value may be going up though, that’s probably what I will have to settle for.

I appreciate your advice and will update my posts to clarify.

Thanks!


#6

Ahh, cool. I understand now. Hopefully the new software image (and tablet UI’s) will resolve your control issues. Good luck :slight_smile: