Friday, June 3, 2016

Troubleshooting xbox360 game pad not generating EventHub [low_level] [didMyResearch]

I want to use an Xbox360 game controller on my Galaxy sIII internation (i9300).

It is not working properly : although it is detected by the Android usbHostManager, it is not generating Eventhub ==> the driver does not kicked in. I do have the xpad.c driver.

Here are the setup details :
  • i9300
  • xbox360 controller, microsoft : 045e:028e
  • keylayout file here : Vendor_045e_Product_028e.kl
  • Input Device Configuration file Vendor_045e_Product_028e.idc NOT here (in any folders listed here : http://ift.tt/1X2yq4h)
  • ROM : 13.0-20160519-UNOFFICIAL-temasek-i9300 (compiled myself from darkened_sky advice)
  • Kernel : 3.0.101-CM-g9001c4e
  • controller did not work either with my previous ROM, the last official CM for this device.
  • controller does not work either with a samsung tab active with Samsung's firmware running on it.
  • controller works perfectly on a moto G, unmodified.
  • lsusb detects the controller, the led are lit when connected and the logcat does log the UsbHostManager adding the device with the correct vendorID and productID (in decimal, not in hexa).

So... What should I do to have it running correctly through the Android stack ?

here are more relevant data :

Code:

06-03 13:06:32.693  2404  2434 W art    : Long monitor contention event with owner method=void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean) from BroadcastQueue.java:649 waiters=0 for 230ms
06-03 13:06:34.353  2404  2537 D UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=1118,mProductId=654,mClass=255,mSubclass=255,mProtocol=255,mManufacturerName=©Microsoft Corporation,mProductName=Controller,mVersion=2.0,mSerialNumber=16890DA,mConfigurations=[
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbConfiguration[mId=1,mName=null,mAttributes=160,mMaxPower=250,mInterfaces=[
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=255,mSubclass=93,mProtocol=1,mEndpoints=[
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbEndpoint[mAddress=129,mAttributes=3,mMaxPacketSize=32,mInterval=4]
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbEndpoint[mAddress=1,mAttributes=3,mMaxPacketSize=32,mInterval=8]]
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=0,mName=null,mClass=255,mSubclass=93,mProtocol=3,mEndpoints=[
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbEndpoint[mAddress=130,mAttributes=3,mMaxPacketSize=32,mInterval=2]
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbEndpoint[mAddress=2,mAttributes=3,mMaxPacketSize=32,mInterval=4]
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=3,mMaxPacketSize=32,mInterval=64]
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbEndpoint[mAddress=3,mAttributes=3,mMaxPacketSize=32,mInterval=16]]
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbInterface[mId=2,mAlternateSetting=0,mName=null,mClass=255,mSubclass=93,mProtocol=2,mEndpoints=[
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbEndpoint[mAddress=132,mAttributes=3,mMaxPacketSize=32,mInterval=16]]
06-03 13:06:34.353  2404  2537 D UsbHostManager: UsbInterface[mId=3,mAlternateSetting=0,mName=Xbox Security Method 3, Version 1.00, © 2005 Microsoft Corporation. All rights reserved.,mClass=255,mSubclass=253,mProtocol=19,mEndpoints=[]]]
06-03 13:06:35.888  2404  3862 D NetlinkSocketObserver: NeighborEvent{elapsedMs=179275, 10.2.64.1, [E48D8C3459BB], RTM_NEWNEIGH, NUD_STALE}

that you can compare to a MOUSE correctly handled :

Code:

06-03 13:54:28.208  6102  6154 D com.facebook.appevents.AppEventsLogger: Got unexpected exception: java.io.EOFException
06-03 13:54:28.663  2421  2469 E EventHub: could not get driver version for /dev/input/mouse0, Not a typewriter
06-03 13:54:28.673  2421  2539 D UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=2821,mProductId=6057,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=PixArt,mProductName=Asus USB Optical Mouse,mVersion=1.16,mSerialNumber=null,mConfigurations=[
06-03 13:54:28.673  2421  2539 D UsbHostManager: UsbConfiguration[mId=1,mName=null,mAttributes=160,mMaxPower=50,mInterfaces=[
06-03 13:54:28.673  2421  2539 D UsbHostManager: UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=3,mSubclass=1,mProtocol=2,mEndpoints=[
06-03 13:54:28.673  2421  2539 D UsbHostManager: UsbEndpoint[mAddress=129,mAttributes=3,mMaxPacketSize=4,mInterval=10]]]]
06-03 13:54:28.708  2421  2469 D EventHub: No input device configuration file found for device 'PixArt Asus USB Optical Mouse'.
06-03 13:54:28.708  2421  2469 I EventHub: New device: id=12, fd=229, path='/dev/input/event12', name='PixArt Asus USB Optical Mouse', classes=0x80000008, configuration='', keyLayout='', keyCharacterMap='', builtinKeyboard=false, wakeMechanism=EVIOCSSUSPENDBLOCK, usingClockIoctl=true
06-03 13:54:28.743  2421  2469 I InputReader: Device added: id=12, name='PixArt Asus USB Optical Mouse', sources=0x00002002

lsusb return :

Code:

Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 002: ID 1519:0020
Bus 002 Device 004: ID 045e:028e

I know about the xboxdrv for linux computer but xoxdrv is running in userspace, thus I have no idea how to port it on android, if possible.

The xpad.c driver for CM has been modified, but these modifications were abandoned : as far as I understood them, I don't think that you should have change the issue. But I will try to compile an image with the xpad.c version. The xpad.c driver : some development and modifications had been done for it but are "abandoned" as status. Differences are mainly to support the xbox One controller but other minors (maybe significant differences) are present.
http://ift.tt/1X2xVqY
Mine (the one running for my current phone) can be found here :
android/system/kernel/samsung/smdk4412/drivers/input/joystick

If you need more data to help me, I would be glad to deliver it.

Thank you for any decisive input. Please forward my issue to experimented android tinkerer that you know if you can't help personally, I would appreciated the gesture a lot.


from xda-developers http://ift.tt/22Cx6Fj
via IFTTT

No comments:

Post a Comment