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

Issues sending data to XBox 360 controller #824

Open
mminella opened this issue Aug 27, 2024 · 5 comments
Open

Issues sending data to XBox 360 controller #824

mminella opened this issue Aug 27, 2024 · 5 comments

Comments

@mminella
Copy link

I have purchased this XBox 360 controller: https://www.amazon.com/dp/B0CC59Z93Q and am using it with an Arduino Mega ADK. I'm currently working on getting it to work with this library. So far I have updated XBOXREC.cpp so that the buttons are recognized correctly (as tested with the XBOXREC.ino example). However, I'm having issues sending data to the controller (changing LED status or rumble). I'm not looking for you to tell me how to do this (since you don't have the controller, I don't expect that), however I'm struggling to understand what's going wrong. I've debugged that on line 366, the rcode results in a 13 (0xD). I can't find any insights into what that actually means or how to fix it. Any help you can provide is appreciated. Thanks in advance!

If this helps, here is the output from USB_desc.ino

01
--

Device descriptor: 
Descriptor Length:	12
Descriptor type:	01
USB version:		0200
Device class:		FF
Device Subclass:	FF
Device Protocol:	FF
Max.packet size:	08
Vendor  ID:		045E
Product ID:		028E
Revision ID:		0110
Mfg.string index:	01
Prod.string index:	02
Serial number index:	00
Number of conf.:	01

Configuration descriptor:
Total length:		0031
Num.intf:		01
Conf.value:		01
Conf.string:		00
Attr.:			80
Max.pwr:		32

Interface descriptor:
Intf.number:		00
Alt.:			00
Endpoints:		02
Intf. Class:		FF
Intf. Subclass:		5D
Intf. Protocol:		01
Intf.string:		00
Unknown descriptor:
Length:		11
Type:		21
Contents:	1001012581140303030413020803030705

Endpoint descriptor:
Endpoint address:	81
Attr.:			03
Max.pkt size:		0020
Polling interval:	04

Endpoint descriptor:
Endpoint address:	02
Attr.:			03
Max.pkt size:		0020
Polling interval:	08


Addr:1(0.0.1)
@xxxajk
Copy link
Contributor

xxxajk commented Sep 19, 2024

0x0D is hrJERR.

@mminella
Copy link
Author

I was able to figure that out. However, I can't find any insights into what that error actually means, what is actually wrong, or how to fix it.

@xxxajk
Copy link
Contributor

xxxajk commented Sep 19, 2024

It's a communications error. How are you powering the mega adk?

@mminella
Copy link
Author

The mega ADK is being powered via USB to my MacBook Pro when I get the error.

@xxxajk
Copy link
Contributor

xxxajk commented Sep 19, 2024

Might not be enough current. The controller may be attempting to charge.
See if using a 9V 1A adapter fixes the issue. It normally does.

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

No branches or pull requests

4 participants
@mminella @xxxajk and others