Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to transfer data in batches between linux and USB equipment

Shulou Source: shulou.com Published: 2022-06-02 23:19:21 10月01日 Update

1. Bulk OUT transfer (host host to usb device)

The host host sends the out flag packet to the device, followed by the packet

The device receives the data correctly and responds to an ACK. If the device breakpoint is not ready to receive data, it will discard the data sent by the host and respond to a NAK to show that it is not ready.

Counter register OUTnBC: first, it is just how many bytes of data the device has just received in a batch transmission; second, it indicates that the next batch of out data transfer can be carried out.

Status register OUTnCS: indicates whether the endpoint is currently busy.

two。 Bulk IN transfer (usb device to host device)

The host host sends an IN flag packet to request an IN transmission.

When the device is ready, the data is transmitted to the host host. Write a byte counter to show that the device is ready. If the device is not ready, respond to the NAK package to indicate that it is not ready.

Tags: Devices data preparation transmission host bytes registers instructions flags counters just data transfer breakpoints status endpoints followed by Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info Docker MariaDB Microsoft