In this course,
we'll use a cheap home router to illustrate some of the techniques
that can be used in hardware product testing.
Identifying device components is an important first step.
This is the TP link TL‑WR841N home router,
a wired and wireless 300 Mbps router targeted at
home users and small businesses.
And at less than $20,
it's a useful device to begin to learn about hardware product testing.
Access to the internal components of the router requires the
removal of two screws on the underside of the device and the
release of a few clips around the edges.
In most cases, opening a device in this way voids its warranty.
It's also worth noting that directly interacting with the circuitry of a
device risks permanent damage in a number of ways,
including electrostatic discharge, inadvertent shorting,
or applying higher voltages than the device was designed for.
There is also the risk of electric shock if the device
is connected to mains electricity.
If in doubt,
consult the devices data sheet and use a multimeter to test and verify.
Taking a closer look under the cover,
a number of components immediately stand out.
At the top in bright orange,
we have a bank of Ethernet ports to provide wired
network connectivity and a blue WAN port.
To the right of these ports is the main power supply connector,
which for this device, is a 9‑volt DC input.
Continuing around the board,
we see a serial debug interface with four pins conveniently labeled as transmit,
receive, ground, and VCC.
It's not always the case that debug interfaces are nicely labeled like this,
and we'll see later in this module how to identify each of
these pins if the labels are missing.
Here,
we see an 8‑pin 32 Mb serial flash memory chip which
has a serial interface architecture.
It's on this component that the device's firmware is stored.
In a relatively simple device, such as our router,
the firmware provides the device's complete operating system,
but in more complex devices such as PCs or laptops,
the firmware, or in those cases the BIOS,
provides the basic functions of the device and provides hardware abstraction
to higher‑level software such as the operating system.
In the middle of the board, we have a MediaTek MT7628 system on chip.
As one of the first SOCs to be specifically designed
for home routers and IoT gateways,
it essentially combines an 802.11 Wi‑Fi radio with a 580 MHz MIPS CPU.
This final component is the system memory,
a 4 MB Elite Semiconductor double‑data‑rate,
or DDR, SD‑RAM chip.
When the device boots,
the firmware loads the operating system from flash memory into RAM where it
continues to run until power to the device is removed.
Now, of course,
it's impossible to tell from these images exactly what make and model they are,
but by taking photographs and zooming in or using a magnifying glass,
you can usually find enough information that will allow you to
search for a data sheet for the component.
When conducting hardware testing,
there are a number of interfaces that we can target to gather
information or gain access to a device.
In our simple router,
the primary debugging interface is a 4‑pin universal
asynchronous receiver transmitter, or UART,
connection which provides asynchronous serial communication.
The transmission speed and data format are configurable,
which means that if we want to communicate over UART,
we need to determine those parameters.
UART uses two wires for communication, one for transmit and one for receive.
The transmit line for one UART device must be connected to
the receive line on the other UART device.
Unlike UART, which is a physical circuit in an integrated circuit,
SPI is a communication protocol based on a client server relationship.
Unlike UART, which only requires two wires,
SPI requires four, one for the client to communicate with the server,
one for the server to communicate with the client,
one for the clock signal to synchronize data exchange,
and a final wire for the server select or chip select line which
allows the client to select which server to connect to.
Inter‑integrated circuit, or I2C,
combines the best features of UART and SPI so that we can connect
multiple servers to a single client like with SPI how we can have
multiple clients controlling single or multiple servers.
Like UART communication, I2C only uses 2 wires.
The serial data line, or SDA,
allows both the client and server to send and receive data,
whilst the serial clock line carries the clock signal to synchronize messages.
Again, data sheets should be used to identify the various data,
clock, and chip select lines.