USB host/client premium library

Hi,

I’ve been playing with the USBH_RawDevice class and so far I have been able to establish a link with another board using the USB client classes.

I had no problem transferring data from Device to Host (using USBC_Stream class on client side for writing)
(example: http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation%20v4.2/Premium/html/304aed25-52cc-db45-3427-c46ab15604ba.htm)

I had no problem reading the stream using this as an example: http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation%20v4.2/Premium/html/66ceb8b9-f97a-0f41-7872-50d85dd86c18.htm

Though, I definitely don’t understand how to write from the host side as the is only one data method for the pipe (TransferData) and it doesn’t specify what direction it will be.
Do I need to set a custom setup packet up in the SendSetupTransfer function ?

Thanks :slight_smile:

If I understand it right , you need to open another pipe for the “writeable” endpoint on the device.

Yeah, apparently the method itself deals with the direction by detecting the attributes of the endpoint.
Thanks

You are welcome!