Xbox Controller not recognized

29 16322
Hey everyone,I recently bought a banana pi and installed Android 4.2 on it. I used the image made by mattrix.
I bought the pi for playing android games.

But when I connected my Wireless Xbox Controller there was no reaction. So I checked the Controller with USB/BT Joystick Center .. not found. I also copied the keylayout files in /system/usr/keylayout like described here.

So having no idea at all I also bought a wired Xbox Controller. Doesn't work either.

Can you help me?

Best regards,
HowlingCoder
dlanor  
I believe the device drivers for the current Android image have no support for any gamepads.
There is also very limited support for external keyboards (1 out of 6 I tried works).
Hopefully both these limitations will be fixed in a future release of a new Android image.

Fortunately many Android games are designed for use with touchscreen, and most of these games work equally well with a mouse. I have had no problems with the mice I've connected, whether directly to a USB port of the BPi or through a USB hub. Naturally I recommend using a mouse with an RF USB 'dongle' rather than just a wired connection.

I'm using such an RF connected mouse myself, and it works fine. The left mouse button simulates normal touch, the right mouse button simulates the Android 'Back' button while the mousewheel pushbutton simulates the Android "Menu" button. So many games can be handled entirely by mouse, even for opening and closing submenus.

In other games or emulators it can be useful to define keyboard buttons for use as gamepad buttons. That's provided you can find an RF keyboard that works with current Android image. Like I said above, I had to try 6 to find one that works .

This works fine in most of the emulators I've installed, except for ePSXe and PPSSPP, as there is no good way to simulate analog joysticks with keyboard keys. But these emulators do have very good on-screen virtual gamepad gadgets, which for ePSXe can be reconfigured so as not to overlap the game screen. (I place all gamepad controls in the black screen borders to either side of the PS1 screen area).

I hope you find these tips useful, and we can always hope for better functionality with the next Android image release.

Best regards: dlanor

peetr04  
Hi,

I have same problem. I have another android tvbox (rk3188 based) and the xbox360 usb wired controller is native supported by android. Iwant try the Asphalt 8 with the controller what working on another box but not working the controller.

The usb device can find the id of controller (USB Host app)..

But is another issue with my usb keyboard and mouse. Here on  BP 4.2 android cant map some special key. I prefer use Externalkeyboard helper app to associate hardware buttons to my usb keyboard. But here on BP on my usb keyboard the "home" and "back" button doesnt work i cant map because there is no keycode....

I think must check and change the kernel input drivers somehow...

Best regards:
Peetr04

ryjyd  
Finally... someone else to help me with this. Go here and drop a comment so we can centralize this: http://forum.lemaker.org/2467-1- ... s_and_gamepads.html

It is definitely not a driver issue, it just has to be recognized as a validly mapped usb input, and that's a keylayout, or .kl file, in the right place. I have no wireless receiver, but I have a wired xbox controller. Haven't tested it because I use my Logitech f710 in directinput mode. Now, I have testers.

dlanor  
Post Last Edited by dlanor at 2014-8-26 08:37

I'm afraid you're partly mistaken, as it most definitely is a driver issue for many devices.

You are correct for all those cases where pressing a button does deliver some response from the "USB Device Info" app. For all those cases the OS has received data, and the proper handling of that data is then mainly a configuration issue. (the .kl files etc)

You are incorrect for all those cases where no pressing of buttons or stick manipulation produce any response whatever from "USB Device Info" or any other apps. For all those cases the OS is unaware that the device exists, because the USB device drivers don't support it. And no remapping can solve this since the OS doesn't receive any codes to remap.

This problem affects the majority of my USB keyboards, for example. The only keyboard that works for me is the only one I have which has a USB 1.1 interface. All keyboards that have some USB 2.x interface fail. And if I connect the USB 1.1 keyboard through a hub, then it only works if the hub is also USB 1.x (though the USB 2.0 hubs work fine for mice and USB storage drives).

So there's definitely something lacking/missing in the USB device drivers.

Btw: All of the equipment that fails to work under Android works fine under Lubuntu, so there's no hardware incompatibility.

Best regards: dlanor

ryjyd  
I will start with this, because to me, it's a glaring flaw in your argument. "USB Device Info" gives you just what it says: USB device info. Its only job is to tell you who the vendor is, what the product is, and what corresponding codes go with each. That's it. Every post I see, with something I don't know about, gets me on Google in a second to go find out what it is and what it does. You may benefit from a similar practice.

That said, when the XBox 360 wireless receiver is plugged in and USBDI is running, it will see the device and tell details. From that you can make a generic keyboard file with "Vendor_####_Product_####.kl" as your format, and USB BT Joystick Center will read the bits pushed from the dongle to the system. I would imagine if this app were modified, it could read bits from any USB input, but I'm not that good... yet. If you know of ANY app that reads the data from any USB device bit by bit, tell me what it is because I've scoured the net looking for it. You could hand-craft a .kl file by the next day that will read the data and output a desired effect on the system. That is exactly what I did to get my F710 running, a few copy-pastes aside. If this means I'm learning how to write USB drivers, then I'm smarter than I thought, I guess.

Here then is a challenge that requires no bucket of ice water. I know you have a K400r in your possession. I have the same one. Help me find a USB bit reader besides USB BT Joystick that takes any USB device and reads the bits pushed from it. Your file will be named Vendor_046d_Product_c52b.kl. You find a bit reader, and I will hand-craft the file myself. Look over it, scour it for malice, and when you are satisfied it won't hurt anything, plug it in and see if it works. No donation but time, no 24 hour limit. Either we both benefit or we both learn something.

As for the XBox 360 receiver, which is the original subject of this thread you might notice, I'm quite certain that the info I've already provided, researched, and practiced will get full functionality out of it. It's simply a matter of translating the 1's and 0's to something the system understands. Nothing more. But, that's all of computing, isn't it?

No regard at all: ryjyd

dlanor  
So... Another guy who is unable to see any statement disputed without taking it as a personal attack, and responding in such kind...

I'm sorry I replied to you in the first place, which I did in the hope that we might together find a different approach for a solution to the problem with devices that do not give any response at all with our current Android setups. But that hope was obviously in vain...

Since you apparently took my criticism of those specific Android apps as personal criticism of yourself, causing you to launch a new "no regard" attack at me in response, I suspect that no sensible cooperation is possible.

I will proceed with my reply anyway, as we do have some interests in common, but if it results in another 'flame' I'm out of here...

I will start with this, because to me, it's a glaring flaw in your argument. "USB Device Info" gives you just what it says: USB device info. Its only job is to tell you who the vendor is, what the product is, and what corresponding codes go with each. That's it.
ryjyd Posted at 2014-8-26 09:33

Yes, that's it. That's exactly what it's intended to do. And exactly what it fails to do with many of the USB devices I've connected to a BananaPi running the current Android 4.2 release (in any of its image file 'flavours', as they all lack required driver compatibility).
When testing those devices, pressing keys and pushing buttons has no effect whatever.

Every post I see, with something I don't know about, gets me on Google in a second to go find out what it is and what it does. You may benefit from a similar practice.

Which is exactly what I do as well. But no information from google overrides contrary information seen first hand.

That said, when the XBox 360 wireless receiver is plugged in and USBDI is running, it will see the device and tell details.

Yes, I assume this would be the case, since that was the specific USB device you described having tested.

From that you can make a generic keyboard file with "Vendor_####_Product_####.kl" as your format, and USB BT Joystick Center will read the bits pushed from the dongle to the system.
And it was references like that to generic files and their functionality that led me to believe you were speaking of a more generic use than just for one specific gamepad brand. My description of USB device response failures did not concern any XBox device (which I've never had any and have no interest in getting).

I would imagine if this app were modified, it could read bits from any USB input, but I'm not that good... yet. If you know of ANY app that reads the data from any USB device bit by bit, tell me what it is because I've scoured the net looking for it. You could hand-craft a .kl file by the next day that will read the data and output a desired effect on the system.
And that's exactly where I think your assumption is wrong. If the underlying Linux system completely disregards a connected unit, because it's not accepted by the low-level USB drivers, then there's nothing any app can do to change that, unless they're able to replace, extend, or otherwise modify existing low-level device drivers.

That is exactly what I did to get my F710 running, a few copy-pastes aside. If this means I'm learning how to write USB drivers, then I'm smarter than I thought, I guess.

I think what this ".kl" file editing achieves is merely to make the existing high-level drivers make better sense of the incoming data packets from low-level drivers that they would otherwise fail to handle correctly. But those files do not affect the low-level drivers at all, in their choice of whether to accept or ignore a specific connected device.

Here then is a challenge that requires no bucket of ice water. I know you have a K400r in your possession. I have the same one. Help me find a USB bit reader besides USB BT Joystick that takes any USB device and reads the bits pushed from it. Your file will be named Vendor_046d_Product_c52b.kl. You find a bit reader, and I will hand-craft the file myself. Look over it, scour it for malice, and when you are satisfied it won't hurt anything, plug it in and see if it works. No donation but time, no 24 hour limit. Either we both benefit or we both learn something.

I'd be willing to try this, though I doubt that any app is able to access what low-level drivers fail to pass on to the high-level system.

As for the XBox 360 receiver, which is the original subject of this thread you might notice, I'm quite certain that the info I've already provided, researched, and practiced will get full functionality out of it. It's simply a matter of translating the 1's and 0's to something the system understands. Nothing more. But, that's all of computing, isn't it?
Sure. And the same methods can probably solve it for any device whose data packets give any response in these test apps. But it is the other group of devices, who trigger no response at all, that I am more interested in.

No regard at all: ryjyd

And there we have the final insult making future cooperation unlikely.
A slap in the face at the end of a conversation effectively invalidates all that was said before it.

You could have done what I'll do now, which is simply to end the post without a personal comment (either way).

peetr04  
Hi,

Sorry, i dont want trouble.

What we need realy for xbox controller (wired or not) is the xpad.ko module. This module is not in the images.

After the xpad module is working (we must compile kernel module) is intresting the .kl and the .kcm file.

I tryd to make an android kernel, but i have some touble while compiling..  

Somebody tryd to make own android kernel compilation for banana?

I need a bananapi's default kernel config file for kernel building. But i cant find it.

If someone has idea or information please let me know....

Thank You!

Post Last Edited by actkk2000 at 2014-8-28 10:21

Reply 8# peetr04

I did this for Cubietruck, and since currently I don't have an Xbox controller I cannot test it on Banana Pi:
http://www.cubieforums.com/index.php/topic,1973.msg14936.html

Remember to do all this as root, install SuperSu from Market.
Just in case I attached .ko and .kl files as well

xpad.zip

25.64 KB, Downloads: 144

peetr04  
Dear actkk2000,

Thank you for your answer. Today morning i found your cubie topic. And i tryd the modul but unfortunetly unapble to load the modul.

dmesg says differ library... i tryd with and without force load with insmod.

I tryd many xpad.ko what i found on several forums but without any success.

This way i start to make a kernel build but im stucked now with the android bananapi default kernel config file....

You have to log in before you can reply Login | Sign Up

Points Rules