05 I2C - geo-tp/ESP32-Bus-Pirate GitHub Wiki
This mode enables communication over the I2C bus using standard SDA/SCL lines.
It supports device scanning, pinging, register reads/writes, sniffing, and manual instruction sequences.
Command | Description |
---|---|
scan |
Scans all I2C addresses (1–126) and lists devices that acknowledge (ACK) |
ping <addr> |
Sends a transmission to the given I2C address and checks for ACK |
sniff |
Passively monitors the I2C bus and displays decoded traffic |
read <addr> <reg> |
Reads a register from a device |
write <addr> <reg> <val> |
Writes a value to a register of the device |
config |
Configures SDA/SCL pins and I2C frequency (in Hz) |
[0x13 0x4B r:8] ... |
Sends a custom I2C instruction sequence using bytecode-style syntax |
-
scan
attempts to detect devices by sending start/stop frames across all valid addresses. -
ping
is a simpler check for a specific address (e.g.,ping 0x3C
) and confirms presence with an ACK. -
read
performs a read on the given address and register. -
write
performs a write to the specified device address and register. -
sniff
see https://github.com/WhitehawkTailor/I2C-sniffer/ for more details - The instruction syntax (
[0x13 0x4B r:1]
) supports direct control over I2C sequences:- Select address
- Select the register
- Read specific number of bytes (
r:N
)
- The
config
command allows setting:- SDA and SCL pins
- Frequency (standard mode 100kHz, fast 400kHz, etc.)
mode i2c
config # Set pins and frequency
scan # Detect connected devices
sniff # Monitor I2C transactions passively
ping 0x3C # Check ACK at address 0x3C
read 0x3C 0x00 # Read register 0x00 from device 0x3C
write 0x3C 0x01 0xFF # Write 0xFF to register 0x01
write 0x3C 0x01 50 # Write 50 to register 0x01
[0x3C 0x00 r:4] # Address 0x3C, register 0x00 and read 4 bytes from there