bitbank2/ls_i2c

A smart I2C interrogation tool for Linux

C

2

7 commits

updated Sep 25, 2026

See the code

See what people are saying

SourceMessageScoreDate

A Friendlier Version of I2cdetect

1

Sep 27, 2026

README

i2c query tool (ls_i2c)

Copyright (c) 2026 BitBank Software, Inc.
Written by Larry Bank
email: bitbank@pobox.com

What does it do?

The ls_i2c tool is meant as a friendlier and more functional replacement for the ancient Linux i2cdetect. The tool can scan multiple I2C buses at once and has the ability to auto-detect a growing list of popular I2C devices. The output is a neat list of detected addresses with device info (model and type) if it's one of the 50+ recognized devices. It uses the device address as a starting point and then matches unique info such as the WHO_AM_I register to determine what devices are responding.

Why did you write it?

Lately I've been doing a lot of work on my sensor libraries and have run into some frustrating problems with getting the I2C overlays to work on my collection of Linux SBCs. I have had to run i2cdetect many times and every time I did, it made me think there must be a better way to display that info. Making use of some code I wrote for my Arduino BitBang_I2C library turned out to be the right way to approach the problem. The result is a tool I find much more useful.

How does it look?

See the images below to compare the output of i2cdetect (top) versus ls_i2c (bottom) for the same machine and sensors.

i2cdetect

ls_i2c

Getting started

The project is composed of a single .C file and makefile. Simply clone the repo and type 'make' to build it. When you run the tool without any parameters, instructions will be printed on the terminal.

If you find this code useful, please consider becoming a sponsor or sending a donation.

paypal

Contributors

bitbank2

7 commits

bitbank2/ls_i2c

A smart I2C interrogation tool for Linux

C

2

7 commits

updated Sep 25, 2026

See the code

See what people are saying

SourceMessageScoreDate

A Friendlier Version of I2cdetect

1

Sep 27, 2026

README

i2c query tool (ls_i2c)

Copyright (c) 2026 BitBank Software, Inc.
Written by Larry Bank
email: bitbank@pobox.com

What does it do?

The ls_i2c tool is meant as a friendlier and more functional replacement for the ancient Linux i2cdetect. The tool can scan multiple I2C buses at once and has the ability to auto-detect a growing list of popular I2C devices. The output is a neat list of detected addresses with device info (model and type) if it's one of the 50+ recognized devices. It uses the device address as a starting point and then matches unique info such as the WHO_AM_I register to determine what devices are responding.

Why did you write it?

Lately I've been doing a lot of work on my sensor libraries and have run into some frustrating problems with getting the I2C overlays to work on my collection of Linux SBCs. I have had to run i2cdetect many times and every time I did, it made me think there must be a better way to display that info. Making use of some code I wrote for my Arduino BitBang_I2C library turned out to be the right way to approach the problem. The result is a tool I find much more useful.

How does it look?

See the images below to compare the output of i2cdetect (top) versus ls_i2c (bottom) for the same machine and sensors.

i2cdetect

ls_i2c

Getting started

The project is composed of a single .C file and makefile. Simply clone the repo and type 'make' to build it. When you run the tool without any parameters, instructions will be printed on the terminal.

If you find this code useful, please consider becoming a sponsor or sending a donation.

paypal

Contributors

bitbank2

7 commits

Languages

C

99.1%