Test Hardware

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 connection to host, with local peripherals
In the simplest case, a "device under test" (DUT) will be connected directly to a host machine, with a network connection to the host, and 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.

== connection to host, with serial console 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.

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 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
 * Web-controlled power control module - https://www.digital-loggers.com/lpc.html

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.


 * USB to serial cables
 * [|Digi-Key listing for an FTDI cable that will work with the Raspberry Pi board]
 * [|Adafruit listing for an FTDI Serial TTL-232 USB Cable]

Switch control/Relays

 * Target Switch Control From Parallel Port - circuit schematics for building your own opto-isolated switches controlled by host parallel port
 * This was more useful when most desktop machines had parallel ports as standard hardware

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 = * 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
 * Sony Debug Assist board - this board has several test and control functions integrated in a single package

= Presentations =