Ethernet over USB

From Bobs Projects
Jump to: navigation, search

Ethernet over USB refers to a number of techniques for encapsulating Ethernet frames and transporting them over the Universal Serial Bus

Background

Ethernet frames can range in size from 64 bytes (minimum) to 1514 bytes (plus CRC, plus any VLAN tags). Ethernet is unclocked and frames can be transmitted as soon as the medium is available.

USB, on the other hand, can transport data over a number of different modes, over pipes to a number of different endpoints. USB can perform at most one transfer over a pipe during each USB frame or microframe. For Low-Speed and Full-Speed USB, the frame period is 1ms and for High-Speed USB the microframe period is 125usec.

Furthermore, for Full-Speed USB (12Mbps), a total of 1500 bytes (including all overheads) can be sent per frame time. For High-Speed USB (480Mbps), this increases to 7500 bytes (including overheads) per microframe.

At Full-Speed, a maximum size Ethernet frame will need to be transferred over a minimum of 2 USB frame times, whereas 16 or more minimum sized Ethernet frames could be transferred in one USB frame period (even more if the padding for small Ethernet frames is added after transfer over USB).

For High-Speed, several maximum sized Ethernet frames can be transferred in one USB microframe time, and for minimum size Ethernet frames, the number could easily exceed 100.

The important thing to note (for me, anyway) is that at most one USB transfer can be initiated per pipe per frame/microframe. This means that in order to get full utilisation of the available USB bandwidth, even at Full-Speed, multiple Ethernet frames will need to be combined (packed) into a single USB transfer, the more the better.

Standards

There are a number of standards for transporting Ethernet frames over USB:

External Links