Test Hardware

From eLinux.org
Jump to: navigation, search

Here is information about hardware that is useful for testing embedded Linux systems. This page is intended to be a collecting point for hardware that people have found useful in their own testing, or in board farms.

Test Configurations

A "device under test" (DUT) is the hardware to be tested. This is usually a development board, when the product is under development, but it can be a finished product as well. There are a large variety of ways to connect with, control and communicate with the DUT.

Here are some sample configurations that are common:

simple network connection to host, with local power and peripherals

In the simplest case, a "device under test" (DUT) will only be "connected" to a host machine with a network connection, and will have it's own power and local peripherals (such as local USB keyboard and/or mouse) and some display output (usually microHDMI).

This allows for testing and debugging the board using network tools (usually scp and ssh) to copy files to and from the target, and to execute commands on the target.

This simple configuration does not provide for serial console support or power control of the board.

connection to host, with serial console

A slightly more advanced configuration consists of local peripherals and power, but with network connection and a serial console connection to the host.

This consists of:

  • network connection to host
  • serial console connection to host:
    • often provided by serial port on DUT with serial-to-USB cable connecting to USB on the host device
    • sometimes (increasingly) the DUT has an on-board serial-to-USB chip. So the DUT provides a micro-USB connection, and all that is required by the user is a standard micro-USB cable.

So, usually this only requires a single extra cable (either serial-to-USB or a standard micro-USB cable) between the DUT and the host.

power control

For some tests, or to recover from some testing failures (ie machine hang) it is important to be able to power-cycle the DUT. A third level of complexity is to support power control for a board. The easiest way to do this is with an network-controlled power switch. This allows turning the A/C power off and on at the wall-wart, for development boards or devices that are powered from a mains circuit.

For battery-powered or USB-powered devices, it may be more complicated. Many boards provide a reboot or reset capability with buttons on the board. Some phones require complex button combinations, holds or sequences to reboot the device. For these, it is necessary to use switch control hardware. You can use hook pins to short-circuit the button connections, or re-wire the electrical connections on a power supply, power cable or board, to allow for relay or switch control of power to the board.

Additional hardware connections

Additional hardware connections to the DUT may be accessed, monitored, or controlled during a test. For example, for USB testing it may be useful to automatically connect and disconnect USB buses. This can be done with specialized hardware, or with broken-out wiring control of certain signal or power lines in a cable. Another example is simulating inserting or removing removable media by controlling certain lines in the bus to the peripheral connectors for a device.

Test hardware

Power control

Here are some devices that are handy for controlling power to DUTs, from a host machine:

Console access

Linux can be configured to provide console access to a device over it's serial port. You can use a NULL-modem cable to connect from your host to the DUT, if you have a serial port on your host. This is now uncommon, with serial, parallel, keyboard and mouse ports now being replaced by USB ports on most desktop and laptop computers. The more common approach is to use a serial-to-USB cable.

A common challenge for serial cables, is making sure you get one that senses the correct voltage for your board. The UART on a development board will usually work at one of 3 voltage levels: 5v, 3.3v or 1.8v. You need to get the correct cable for the UART voltage for your board, as well as the correct cable end-connector. Some boards have RS232 9-pin connectors (often with only 3 lines actually connected), while other boards have pins that you can connect to using female pin connectors from the cable.

Switch control/Relays

It is fairly common for people to put together relay control solutions using a cheap control board and a daughter board with the actual relays. Here are some examples. Note that control of the relays from your test host is left as an exercise to the reader.

You could also control a relay from a USB port on the host.

Bus/connector control

Network access

Most boards connect to the test network or the Internet via standard networking cables and protocols (ethernet, 802.11 wifi, etc.)

USB control/switching

  • Sony Debug Assist board - this board allows connecting and disconnecting USB, as well as switching between multiple USB inputs
    • For example, it allows you to have a USB charger, a connection to a USB host, and a USB gadget connection, and switch between them.

USB hubs

Small USB hubs (4-port or 7-port) are quite common and inexpensive.

When building a board farm, it is common to need multi-port hubs.

  • Anyone have a recommendation?

Multi-function control boards

  • Sony Debug Assist board - this board has several test and control functions integrated in a single package
    • USB control and switching
    • power control, including voltage and amperage control
    • power measurement
    • switch control - controls up to 3 switches on the DUT
    • serial console - has a serial-to-USB feature, with auto-voltage leveling
  • BayLibre ACME - is a cape and set of probes that support power control and measurement of DUT


Here are some presentations with information about test hardware (particularly for board farms), and issues related to such hardware: