I'm busy with a USB to Ethernet implementation (ECM) on an STM32 using the ST USB library (not HAL) and LwIP.
When I send a packet to the host (Data IN) that came from the ethernet interface, I know where is the end of the frame and therefore know when to send a zero length packet (ZLP) (when needed).
But how do I know when it is the end of a USB packet from the host (Data OUT)? So that I can send an entire frame to the ethernet interface?
I had a look at the endpoint parameters but none of them provide info on the the total packet (frame) length. Only per packet information is available.
I do not know the USB specification that well and not sure if this info in transferred with the initial/setup packet?
Maybe there is another method I can use to detect the end of a frame from the host?