Jetson TX2 USB Communication issue on multiple of 512 byte

We are working on Jetson TX2 module with Jetpack 4.2.1. We have custom carrier board similar to dev kit.

For USB communication between Jetson TX2 SBC and Windows host PC we are using USB 2.0 as device mode with gadgetFS. Using tegra-xudc create a set of bulk data endpoint(read/write) with maximum packet size of 512 and transfer data using system write call on file descriptor of write endpoint.

When data transfer from Jetson TX2 to Windows host PC in multiple of 512 byte(512, 1024 or 2048) then got return value by system write call but Windows Hos PC not received any data. And application hang till restart.

Is this known issue? What is solution of this issue?

There is something Zero Length Packet(ZLP) concept, is this related to issue and should include in driver level? Or is there any patch related to this fix?

Please share steps so that we can reproduce the issue. We have seen a similar issue on r28.2.1 but it is Linux-Linux communication:

The patch is present in r32.2(Jetpack 4.2.1), so this issue looks new. Would need you help us reproduce the issue for doing further investigation.

Hi pranay.joshi,

Have you clarified the cause and resolved the problem? If not, please share steps so that we can reproduce the issue.