Half-Duplex UART Protocol Commands
Overview
- Bus: Half-duplex UART, MIDI (universal asynchronous receiver transmitter), RX and TX on the same wire
- Connections: one data pin (RXTX) and ground
- Output type: open collector - pull-up resistors required
- Maximum Voltage: 5volts
Half-duplex UART is a common serial UART, but receive and transmit share a single data line. This is used to interface mobile phone SIM cards and bank IC cards.
Connections
Bus Pirate | Direction | Circuit | Description |
---|---|---|---|
RXTX | ←→ | RXTX | Bus Pirate Transmit and Receive |
GND | ⏚ | GND | Signal Ground |
Configuration options
1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 etc
x. Exit
Baud (115200*) >
Data bits
5 to 8 bits
x. Exit
Bits (8*) >
Parity
1. None*
2. Even
3. Odd
x. Exit
Parity (1) >
Stop bits
1. 1*
2. 2
x. Exit
Bits (1) >
Mode: HDPLXUART
HDPLXUART>
Pull-up resistors
Half-duplex UART is an open-collector bus, it requires pull-up resistors to hold the data line high to create the data '1'. The Bus Pirate doesn't output high, it only pulls low. Without pull-up resistors there can never be a '1'.
Enable the Bus Pirate onboard pull-up resistors with the P
command.
- Half-duplex UART requires pull-up resistors to hold the data line high.
- Without pull-up resistors there can never be a '1'.
- Enable the Bus Pirate onboard pull-up resistors with the
P
command.
Syntax
Command | Description |
---|---|
[ | Open UART, use r to read bytes. |
{ | Open UART, display data as it arrives asynchronously. |
] or } | Close UART. |
r | Check UART for byte, or fail if empty. (r:1…255 for bulk reads) |
0b | Write this binary value. Format is 0b00000000 for a byte, but partial bytes are also fine: 0b1001. |
0x | Write this HEX value. Format is 0x01. Partial bytes are fine: 0xA. A-F can be lower-case or capital letters. |
0-255 | Write this decimal value. Any number not preceded by 0x or 0b is interpreted as a decimal value. |
space | Value delimiter. Use a space to separate numbers. No delimiter is required between non-number values: {0xa6 0 0 16 5 0b111 0xaF rrrr}. |
(#) | Run macro, (0) for macro list. |
Commands
Bus Pirate 5 has global commands available everywhere, and mode commands specific to the currently selected mode. Type help
to see all commands in every mode, or help mode
for the currently available mode commands.
Most Bus Pirate commands have help. Add the -h
flag to any command to see the latest available options and usage examples.
bridge
Transparent UART bridge
. Bidirectional UART pass-through to interact with other serial devices from inside the Bus Pirate terminal. Press the Bus Pirate button to exit.
Help
usage:
bridge [-h(elp)]
Transparent UART bridge: bridge
Exit: press Bus Pirate button
open UART with raw data IO, usb to serial bridge mode
-t ENABLE toolbar while bridge is active (default: disabled)
-s Suppress local echo, don't echo back sent data
-h Get additional help
HDPLXUART>
Use bridge -h
to see the latest options and features.