
If it's a USB 12Mbit/s device, I would just make sure that the device enumerates. I suppose you could echo back data from one endpoint to another, but it would require setting up the device descriptors in such a way that it allows you to do that.

it's not easy to do a functional loopback test. OTOH, most Ethernet switches actually manage to switch as long as they don't need to queue packets to pace them out on a slower port.Īlso concerning USB. Even very expensive Ethernet switches need careful deliberation to not drop packets if they are to speed convert. Then it is important that all nodes involved are at the same link speed, or there will be trouble. It might be that you want to combine, and have a switch and a computer. The classic of course is SNMP which would let you set the switch up for next DUT (clear counters et c.) and then poll packet and error counters as well as it trap'ing you with "link connected" messages that could be useful in test automation. If you put a switch in the mix, it probably needs to have some kind of management control, and also an API. What you can't test for, in that end, is the RX part of the DUT, so you must ask the DUT what it thinks too.
#Ethernet loopback testing driver#
The computer needs to be running some kind of manageable OS where you have access to the Ethernet card driver and statistics, and then you look, in that end, for packets arriving and if the broken frames across a crossover cable are less than 1ppb or so it's probably working. If you want to use an active network connection for a more "holistic" test, which was also suggested, then I would run either against another test computer or a more competent Ethernet switch. Do what they suggest and you'll likely be fine. I would say, first, that mikeselectricstuff and Cerebus nailed it. U-link *Not to be confused with hairpining traffic in voice networks which refers to erroneously routing traffic back to its originating network. In fact it was standard practice to leave a physically ready, but not in-service, circuit with a U-link in place so that the remote end could test the circuit without it having to be fully commissioned (seeing a far-end loopback was also a hint that the far-end hadn't been commissioned and it was time to kick somebody to finish patching it to where it was supposed to be going).
#Ethernet loopback testing Patch#
PDH) and similar on standard coax patch panels there were/are 'U-links' made specifically to allow the adjacent tx and rx connectors to be joined to form a far-end loopback. Loopback plug For telecoms E1 links ( i.e. (Gigabit ethernet gets more involved at the signalling level and switches have OAM modes to provide loopback, not quite as satisfactory as literally testing just the wires in the way a classic physical loopback does.) Most Ethernet PHYs will have a test mode where you can command the PHY to cross connect its tx and rx paths just before they leave the chip. For 10/100Base-T Ethernet on RJ45s you can wire a plug to cross the receive and transmit pairs.

Sometimes referred to as hairpining* because a crude way of doing it was to borrow a hairpin from a secretary and physically stuff the ends of it into a comms device's socket's tx and rx pins - not recommended. pinging) as you have no way of knowing if they are operating correctly. The whole point is to enable one to test the physical connection without getting any other systems involved (e.g. You can have near-end loopback, where you make the loop at the outbound interface on a device, and far-end loopback, where you make the loop at the distant end of a circuit or at progressive points on the way to the distant end.

This enables you to do a simple bit by bit test that you're receiving what you send, or calculate statistics like bit error rate on the raw physical medium. It means, usually physically, looping the communications medium back on itself so that anything you send out as a transmission comes immediately back to you, unaltered, as a receive signal. And of the responders, only mikeselectricstuff seems to understand what "loopback" means. I suppose some USB PHYs may have some sort of loopback-like test mode but I've never looked for or noticed one. USB being having an intrinsically master/slave relationship between hosts and devices it isn't really possible to do a meaningful loopback test. Well you could try opening the data sheet for the LAN8742 (presuming that is the PHY chip you're using, you mention it but you don't actually say) search for the word "loopback" and you'll find both the control register bits to enable near and far end loopback modes, and descriptions.
