UsbClient - read "configuration endpoint", "endpoint 0"

This is my first post in this Forum, so first of all: Hi TinyClr Community :slight_smile:

In the last weeks i was playing around with my FEZSpider, trying to create a simulation of a PS3 controller, so i can control my PS3 with the touchpad.
Please do not ask why iam doing thisā€¦ itā€™s ā€¦ just be cause i can :wink:

I figured out most of the usb-descriptor-issues and finally made my device be accepted as ps3 controller on a PC (so far so good, yay!)

Now when i connect to my PS3, the communication stops at some point (i got a blinky LED telling me when data was written to the usb-stream).
After some more searching (aka. googleing) i found out that there might be calls to the endpoint zero/setup channel of my usb-client which im not answering correctly.

Now whatever i do or try, even though opening a stream on endpoint 0 will succeed, cannot read any data from it at any time.

The essence of what im doing is:
on power up: create a usb stream on ep 0/0
wait/poll for ā€œrunningā€ state.
start a thread trying to poll data from the stream

Does anyone of you have a piece of code, where he utilizes the zero-endpoint and receive data from the host?

Im using a FEZ-Spider.
Neither Microsoft.SPOTā€¦Usb nor GHIā€¦Usb libs work

Thanks!

A lot of us here do things because they are cool :slight_smile: No other good reasons.

Unfortunately, EP0 is for control and so it is handled by the NETMF core. I am not sure if there is a way around this without major changes on the design. In worst case, I would post this request on NETMF codeplex.

Welcome to the community.

EP0 is used for the debugging interface. Itā€™s a shame the FEZ Spider isnā€™t open source ā€“ this would be a relatively easy thing to change in the firmware.

Not really. Hydra and cerberus are open source. Take a look at the codes. EP0 is tied to too many things internally.

One thing I forgot to mention is, that Iā€™m starting the spider in serial-debugger mode, so the spider itself shouldnā€™t really need the USB client for anything else than provide power.
Iā€™m really wondering Noone ever needed to make use of control signals sent to the device. Can the default devices that are implemented live without these?

I found the codeplex page, but im actually not sure where to post a question like this.
Also I checked out the current NETFM sources, but couldnt even find the code whre EP 0 is handled.

If someone could give me a hint i might be able to patch and compile them on my own.

https://netmf.codeplex.com/workitem/list/basic

Something indicating your need for control endpoint from C#. We can vote on this after too.

Note that I could be wrong and there maybe a way so posting there is good anyways.

I opened an issue: https://netmf.codeplex.com/workitem/1956

Thank you for your help!

I voted :slight_smile: