Hello,
I want to use a iMX7-SOM as a vendor specific device (gadget) on a Windows10-PC with WINUSB driver. I'm using a Angstrom-based, Yocto-made image with Kernel v4.9.166.
I configured the gadget with libusbgx, mounted the functionfs at /ffs and wrote the descriptors to /ffs/ep0. The device is enumerated as expected and I get the commands on endpoint 0 (like "BIND", "ENABLE", "DISABLE" etc.).
So far so good...
My problem is the reading from endpoint 1.
I open it with
Code:
int ep_fd = open("/ffs/ep1", O_RDONLY);
and read from it with
Code:
unsigned char buffer[65535];
int ret = read(ep_fd, buffer, sizeof(buffer));
The read() returns every 4 received USB-packets. It doesn't matter wether I send 4 data packet or 1 data and 3 zero-packets. The size of the packets is also irrelevant.
At least none of the data is lost
Another SOM with a Snapdragon 410 from Qualcomm has the same behavior.
Does anybody know how I can/must configure the endpoint that the read() returns after every single received packet?
Best regards,
Mowlwurf