|
@@ -0,0 +1,88 @@
|
|
|
+---
|
|
|
+title: UART Connection
|
|
|
+categories: [cheatsheets]
|
|
|
+tags: [security, hardware]
|
|
|
+---
|
|
|
+
|
|
|
+# UART Connection
|
|
|
+
|
|
|
+UART = Universal Asynchronous Receiver-Transmitter
|
|
|
+
|
|
|
+* Implements serial communication
|
|
|
+* Often a component of IC's
|
|
|
+* Uses 4 connections: GND | TX | RX | Vcc
|
|
|
+
|
|
|
+
|
|
|
+## Connecting to UART
|
|
|
+
|
|
|
+When connecting UART with e.g. an Computer, an additionall chip is needed to convert UART signals into a serial stream that can be read on a computer.
|
|
|
+A so called FNDI board is used for that task.
|
|
|
+
|
|
|
+### Connection
|
|
|
+
|
|
|
+* Vcc must not be connected
|
|
|
+
|
|
|
+```
|
|
|
+Chip <-> FTDI
|
|
|
+
|
|
|
+Tx <-> Rx
|
|
|
+Rx <-> Tx
|
|
|
+GND <-> GND
|
|
|
+```
|
|
|
+
|
|
|
+Input the FTDI board into the computer via USB.
|
|
|
+The USB-device should show up:
|
|
|
+
|
|
|
+```
|
|
|
+sh> lsusb
|
|
|
+[...]
|
|
|
+ Bus 002 Device 014: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
|
|
|
+[...]
|
|
|
+```
|
|
|
+
|
|
|
+To communicate with that USB device, use `/dev/ttyUSB0`, or similar.
|
|
|
+Therefor `GNU/Screen` is used to interact with the device:
|
|
|
+
|
|
|
+```
|
|
|
+screen /dev/ttyUSB0 <baud-rate>
|
|
|
+```
|
|
|
+
|
|
|
+Common Baud rates are:
|
|
|
+
|
|
|
+* 9600
|
|
|
+* 19200
|
|
|
+* 28800
|
|
|
+* 57600
|
|
|
+* 115200
|
|
|
+
|
|
|
+
|
|
|
+## Identifying UART
|
|
|
+
|
|
|
+### With a multimeter
|
|
|
+
|
|
|
+* Meassure Voltage on the multimeter (`V - DC`)
|
|
|
+
|
|
|
+```
|
|
|
+Black: G, Red: Vcc -> ~3.3V or ~5V
|
|
|
+Black: G, Red: Tx -> ~3.3V +- 0.XV
|
|
|
+Black: G, Red: Rx -> 0V
|
|
|
+```
|
|
|
+
|
|
|
+## Identify BAUD rate
|
|
|
+
|
|
|
+### Guess
|
|
|
+
|
|
|
+* Just guess the most common baudrates by reconnecting with `screen`
|
|
|
+ * 9600
|
|
|
+ * 19200
|
|
|
+ * 28800
|
|
|
+ * 57600
|
|
|
+ * 115200
|
|
|
+
|
|
|
+### Logic Analyzer
|
|
|
+
|
|
|
+* TODO
|
|
|
+
|
|
|
+## How UART works?
|
|
|
+
|
|
|
+* Detailed Explanation: [Click here](https://www.allaboutcircuits.com/technical-articles/back-to-basics-the-universal-asynchronous-receiver-transmitter-uart/)
|