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

INSTALL

sudo apt install i2c-tools
copy
sudo dnf install i2c-tools
copy
sudo pacman -S i2c-tools
copy
sudo apk add i2c-tools
copy
sudo zypper install i2c-tools
copy
brew install i2c-tools
copy
nix profile install nixpkgs#i2c-tools
copy

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)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid