2022-03-08 23:18:28 +00:00
|
|
|
# UART
|
|
|
|
|
|
|
|
## Basic Information
|
|
|
|
|
|
|
|
It's important to note that in this protocol you need to connect the TX of one device to the RX of the other!
|
|
|
|
|
|
|
|
## Bus Pirate
|
|
|
|
|
|
|
|
In this scenario we are going to sniff the UART communication of the Arduino that is sending all the prints of the program to the Serial Monitor.
|
|
|
|
|
|
|
|
```bash
|
2022-03-09 15:19:28 +00:00
|
|
|
# Check the modes
|
2022-03-08 23:18:28 +00:00
|
|
|
UART>m
|
|
|
|
1. HiZ
|
|
|
|
2. 1-WIRE
|
|
|
|
3. UART
|
|
|
|
4. I2C
|
|
|
|
5. SPI
|
|
|
|
6. 2WIRE
|
|
|
|
7. 3WIRE
|
|
|
|
8. KEYB
|
|
|
|
9. LCD
|
|
|
|
10. PIC
|
|
|
|
11. DIO
|
|
|
|
x. exit(without change)
|
|
|
|
|
2022-03-09 15:19:28 +00:00
|
|
|
# Select UART
|
2022-03-08 23:18:28 +00:00
|
|
|
(1)>3
|
|
|
|
Set serial port speed: (bps)
|
|
|
|
1. 300
|
|
|
|
2. 1200
|
|
|
|
3. 2400
|
|
|
|
4. 4800
|
|
|
|
5. 9600
|
|
|
|
6. 19200
|
|
|
|
7. 38400
|
|
|
|
8. 57600
|
|
|
|
9. 115200
|
|
|
|
10. BRG raw value
|
|
|
|
|
2022-03-09 15:19:28 +00:00
|
|
|
# Select the speed the communication is occurring on (you BF all this until you find readable things)
|
|
|
|
## Or you could later use the macro (4) to try to find the speed
|
2022-03-08 23:18:28 +00:00
|
|
|
(1)>5
|
|
|
|
Data bits and parity:
|
|
|
|
1. 8, NONE *default
|
|
|
|
2. 8, EVEN
|
|
|
|
3. 8, ODD
|
|
|
|
4. 9, NONE
|
2022-03-09 15:19:28 +00:00
|
|
|
|
|
|
|
# From now on pulse enter for default
|
2022-03-08 23:18:28 +00:00
|
|
|
(1)>
|
|
|
|
Stop bits:
|
|
|
|
1. 1 *default
|
|
|
|
2. 2
|
|
|
|
(1)>
|
|
|
|
Receive polarity:
|
|
|
|
1. Idle 1 *default
|
|
|
|
2. Idle 0
|
|
|
|
(1)>
|
|
|
|
Select output type:
|
|
|
|
1. Open drain (H=Hi-Z, L=GND)
|
|
|
|
2. Normal (H=3.3V, L=GND)
|
|
|
|
|
|
|
|
(1)>
|
|
|
|
Clutch disengaged!!!
|
|
|
|
To finish setup, start up the power supplies with command 'W'
|
|
|
|
Ready
|
2022-03-09 15:19:28 +00:00
|
|
|
|
|
|
|
# Start
|
2022-03-08 23:18:28 +00:00
|
|
|
UART>W
|
|
|
|
POWER SUPPLIES ON
|
|
|
|
Clutch engaged!!!
|
2022-03-09 15:19:28 +00:00
|
|
|
|
|
|
|
# Use macro (2) to read the data of the bus (live monitor)
|
2022-03-08 23:18:28 +00:00
|
|
|
UART>(2)
|
|
|
|
Raw UART input
|
|
|
|
Any key to exit
|
|
|
|
Escritura inicial completada:
|
|
|
|
AAA Hi Dreg! AAA
|
|
|
|
waiting a few secs to repeat....
|
|
|
|
```
|