LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

i2cdetect

scans I2C buses to detect connected devices

TLDR

List active I2C buses
$ i2cdetect -l
copy
Scan devices on I2C bus 1
$ i2cdetect -y 1
copy
Scan using SMBus quick write commands (safer default mode)
$ i2cdetect -y -q 1
copy
Scan using SMBus read byte commands
$ i2cdetect -y -r 1
copy
Scan all addresses including reserved ones (0x00-0x7f)
$ i2cdetect -y -a 1
copy
Display adapter functionality
$ i2cdetect -F 1
copy

SYNOPSIS

i2cdetect [options] i2cbus

DESCRIPTION

i2cdetect scans I2C buses to detect connected devices. It's commonly used for debugging I2C hardware, identifying device addresses, and verifying hardware connections on embedded systems and single-board computers.The output is a grid showing addresses 0x00-0x7f. Detected devices show their address, while empty positions show "--". Addresses marked "UU" are in use by a kernel driver.On Raspberry Pi and similar boards, I2C is often used for sensors, displays, and other peripherals. Common devices include:- 0x27/0x3f - LCD displays- 0x48-0x4f - Temperature sensors- 0x50-0x57 - EEPROMs- 0x68 - Real-time clocks

PARAMETERS

-l

List available I2C buses
-y
Disable interactive mode (no confirmation prompt)
-a
Scan all addresses (0x00-0x7f instead of 0x03-0x77)
-q
Use SMBus quick write commands for probing
-r
Use SMBus read byte commands for probing
-F
Display functionality of the adapter

CAVEATS

Requires root privileges or membership in the i2c group. Scanning can interfere with sensitive devices; use -y carefully in production. Some devices may not respond to detection probes.

HISTORY

i2cdetect is part of i2c-tools, a set of utilities for I2C bus access on Linux. I2C (Inter-Integrated Circuit) was developed by Philips in 1982 and became widely used in embedded systems.

SEE ALSO

i2cget(8), i2cset(8), i2cdump(8), modprobe(8), dmesg(1)

Copied to clipboard
Kai