Wednesday, September 25, 2013

Hurray, I'm a moron!

An hour later I realize I'm a moron, and it's totally my fault it's not working.

As I said in my last post I had to add in code to the teensy usb library to handle OUT control transfers.
On a IN transfer, I can forward it on to the physical device as soon as I get it.
On an OUT transfer there is data to be sent as well as the request itself. So I have to wait for that data to arrive (in separate USB packets) before I send it on to the device.

Now for whatever reason, a control request with no data payload can be either IN or OUT. I'm not sure what the practical difference is, since there's no data besides the request, what does it matter whether it's IN or OUT? But anyway the 84 request that needs to immediately precede the 87 request is an OUT request with no data payload. As such, it was never receiving any additional data packets, so it was never getting forwarded to the physical device.

I'm now able to complete the security handshake, so I'm almost there!

Now it's just a matter of starting to poll the device for it's reports and pass them along to the Xbox.

No comments:

Post a Comment