Earlier in this module,
we identified that the TP link router had a UART serial
interface which was labeled to identify each pin.
But we got lucky, it's not common for pins to be labeled like this.
So what would we do if we came across a device with what
appeared to be a UART serial interface, but wasn't labeled?
Our first option would be to consult the data sheet,
but if that's not available,
we can take some measurements and make logical deductions.
We'll take three different types of measurement for each of the pins.
The first measurement will measure the resistance
between each of the pins and ground.
The second will measure resistance between the pins and VCC,
and the final measurement will measure the voltage of
each of the pins when power is applied.
Here, the black probe is touching a grounded shroud around the Reset button.
There is a number of potential ground points,
but this is a nice big bit of metal to connect to.
The red probe is touched against the first pin which
gives us our first reading of 4.5kΩ.
The red probe is then moved to Pin 2 and the next reading is taken.
Moving on to the third pin, we have a reading of 0kΩ.
This is a good candidate for our ground pin as there is no
resistance between the pin and the grounded shroud.
Moving on to the final pin, we have a high resistance of 21.6kΩ.
For this next set of measurements,
we need to connect the black probe to a VCC reference point.
Consulting the flash memory data sheet reveals that Pin 8 connects to VCC,
so the black probe connects there.
Connecting the red probe to Pin 1, we record a resistance of 14.1kΩ,
and on Pin 2, we have 11kΩ.
Moving on to Pin 3, we see a similar resistance, but on Pin 4, we see 0kΩ.
This looks like a likely candidate for our VCC pin.
For our final set of measurements, we need to connect the power supply.
Remember to take suitable precautions when working with
live electricity as there is a risk of damaging the device
or of serious personal injury.
We return the black probe to the ground reference point and touch the red
probe to the first pin where we obtain a reading of 3.25V.
Moving on to Pin 2, we have a reading of 0V.
On Pin 3, we also record 0V, and on 4, we have 3.3V.
Let's take a closer look at our results.
Pin 1 showed resistance between both the ground and VCC reference
points so it must be either the receive or transmit pin.
Since it showed a voltage when we provided power to the device
and we're not sending any data to the device,
this looks likely to be the transmit pin.
If we were to monitor this pin in real time as the device was booting,
we would see the voltage values change rapidly as data was
sent by the device to the transmit pin.
Like Pin 1,
Pin 2 also showed resistance between the ground and voltage reference points,
and since the voltage measured on the pin was 0 after power was applied,
it's likely that this is the receive pin as no data is being sent to the device.
We suspected Pin 3 was ground because it showed no resistance
when compared with the ground reference.
Given that we also measured no resistance when power was supplied,
this confirms our assumption.
Similarly, we suspected Pin 4 to be VCC,
which is confirmed by the 3.3V measurement observed
when we applied power to the device.
We've now successfully confirmed the identity of all the UART pins
which agree with the labels on the circuit board.
Now that we're able to connect to and interact with
components on the routers printed circuit board,
let's see how we can obtain a copy of the device's firmware.