Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having an issue with the xboxone library #305

Closed
mojoe128 opened this issue Jul 22, 2017 · 12 comments · Fixed by #325
Closed

Having an issue with the xboxone library #305

mojoe128 opened this issue Jul 22, 2017 · 12 comments · Fixed by #325

Comments

@mojoe128
Copy link

mojoe128 commented Jul 22, 2017

I have been getting init failed whenever i try to connect an Xbox one controller. I was wondering if you had any idea why. I have tested my host shield with the ps4 and xbox libraries. They both work. This is what is in the serial monitor with all of the debugs on.

XBOX USB Library Started
XBOXONE Init
Addr: 01
Xbox One Controller Connected

XboxCommand, Return: 0D
Xbox One Init Failed, error code: 0D

Xbox One Controller Disconnected

XBOXONE Init
getDevDescr
Xbox One Init Failed, error code: 0D

Xbox One Controller Disconnected

XBOXONE Init
getDevDescr
Xbox One Init Failed, error code: 0D

Xbox One Controller Disconnected

XBOXONE Init
getDevDescr
Xbox One Init Failed, error code: 0D

Xbox One Controller Disconnected


Any help would be greatly appreciated

thank you

@Lauszus
Copy link
Collaborator

Lauszus commented Jul 23, 2017

@mojoe128 are you running the latest code here form GIthub or have you downloaded it through the Arduino library manager?

@mojoe128
Copy link
Author

mojoe128 commented Jul 23, 2017

Hi! I downloaded it from here. I then added a .zip library with sketch/include library/add .zip library.
Its says 1.3.0 if i look in the library manager.

Here is the usb_desc for the controller i'm trying to connect.

Thank you for your time

Start

01

Device descriptor:
Descriptor Length: 12
Descriptor type: 01
USB version: 0200
Device class: FF
Device Subclass: 47
Device Protocol: D0
Max.packet size: 40
Vendor ID: 045E
Product ID: 02EA
Revision ID: 0301
Mfg.string index: 01
Prod.string index: 02
Serial number index: 03
Number of conf.: 01

Configuration descriptor:
Total length: 0060
Num.intf: 03
Conf.value: 01
Conf.string: 00
Attr.: A0
Max.pwr: FA

Interface descriptor:
Intf.number: 00
Alt.: 00
Endpoints: 02
Intf. Class: FF
Intf. Subclass: 47
Intf. Protocol: D0
Intf.string: 00

Endpoint descriptor:
Endpoint address: 02
Attr.: 03
Max.pkt size: 0040
Polling interval: 04

Endpoint descriptor:
Endpoint address: 82
Attr.: 03
Max.pkt size: 0040
Polling interval: 04

Interface descriptor:
Intf.number: 01
Alt.: 00
Endpoints: 00
Intf. Class: FF
Intf. Subclass: 47
Intf. Protocol: D0
Intf.string: 00

Interface descriptor:
Intf.number: 01
Alt.: 01
Endpoints: 02
Intf. Class: FF
Intf. Subclass: 47
Intf. Protocol: D0
Intf.string: 00

Endpoint descriptor:
Endpoint address: 03
Attr.: 01
Max.pkt size: 00E4
Polling interval: 01

Endpoint descriptor:
Endpoint address: 83
Attr.: 01
Max.pkt size: 0040
Polling interval: 01

Interface descriptor:
Intf.number: 02
Alt.: 00
Endpoints: 00
Intf. Class: FF
Intf. Subclass: 47
Intf. Protocol: D0
Intf.string: 00

Interface descriptor:
Intf.number: 02
Alt.: 01
Endpoints: 02
Intf. Class: FF
Intf. Subclass: 47
Intf. Protocol: D0
Intf.string: 00

Endpoint descriptor:
Endpoint address: 04
Attr.: 02
Max.pkt size: 0040
Polling interval: 00

Endpoint descriptor:
Endpoint address: 84
Attr.: 02
Max.pkt size: 0040
Polling interval: 00

Addr:1(0.0.1)

@Lauszus
Copy link
Collaborator

Lauszus commented Oct 12, 2017

Please download the newest version of the library (currently 1.3.1). It has a fix for Xbox One controllers: #298.

@Lauszus Lauszus closed this as completed Oct 12, 2017
@mojoe128
Copy link
Author

Hi! I have tried the updated library and am still having the same issue. Would you have any idea why?

Thanks

@Lauszus
Copy link
Collaborator

Lauszus commented Oct 15, 2017

Can you try to update the firmware on your controller?

@Lauszus Lauszus reopened this Oct 15, 2017
@mojoe128
Copy link
Author

I just checked the firmware. I was already up to date. Any other ideas? Thanks for your time!

@Carsonsmuts
Copy link

Same here

XBOX USB Library Started
XBOXONE Init
Addr: 01
Xbox One Controller Connected

XboxCommand, Return: 0DMade it this far 00

Xbox One Init Failed, error code: 0D

Xbox One Controller Disconnected

XBOXONE Init
getDevDescr
Xbox One Init Failed, error code: 0D

Xbox One Controller Disconnected

XBOXONE Init
getDevDescr
Xbox One Init Failed, error code: 0D

Xbox One Controller Disconnected

XBOXONE Init
getDevDescr
Xbox One Init Failed, error code: 0D

Xbox One Controller Disconnected

@Carsonsmuts
Copy link

untitled 2

@Lauszus
Copy link
Collaborator

Lauszus commented Nov 7, 2017

@Carsonsmuts could you try to change this line: https://github.com/felis/USB_Host_Shield_2.0/blob/master/XBOXONE.cpp#L150 to:

epInfo[ XBOX_OUTPUT_PIPE ].epAddr = 0x02; // XBOX one output endpoint

And this line: https://github.com/felis/USB_Host_Shield_2.0/blob/master/XBOXONE.cpp#L156 to.

epInfo[ XBOX_INPUT_PIPE ].epAddr = 0x02; // XBOX one input endpoint

I.e. this will use endpoint address 2 instead of 1.

@Carsonsmuts
Copy link

Yep, that worked! I search everywhere for new possible protocols. Where did you find this info if I may ask?

@Lauszus
Copy link
Collaborator

Lauszus commented Nov 9, 2017

Actually you can tell it from the comment by @mojoe128: #305 (comment). I will write a fix, so it works for all Xbox One controllers.

Lauszus added a commit that referenced this issue Nov 9, 2017
…ing them

Also cleaned up the code a bit

Fixes #305
@Lauszus
Copy link
Collaborator

Lauszus commented Nov 9, 2017

@mojoe128 and @Carsonsmuts please test: #325 and report back if it works or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants