i2c scan
Probe all 112 valid 7-bit I2C addresses and report every device that responds with an ACK.
Requirements
An FTDI MPSSE adapter (FT232H, FT2232H or FT4232H) or a Microchip MCP2221/MCP2221A USB-to-I2C adapter connected to the I2C bus.
- FTDI wiring: see FTDI adapter
- MCP2221 wiring: see MCP2221 adapter
Usage
iottack i2c scan [OPTIONS]
Description
For each address in the range 0x08-0x77 the plugin sends a zero-byte I2C write (START + address + W + STOP) and checks for ACK. Reserved address ranges (0x00-0x07 general call/high-speed codes, 0x78-0x7F 10-bit addressing) are skipped.
Addresses that respond are reported at Medium severity together with a hint about common devices that use that address range.
Select the hardware backend with --adapter:
| Backend | Hardware | Notes |
|---|---|---|
ftdi (default) | FT232H / FT2232H / FT4232H | Configurable channel and clock speed |
mcp2221 | MCP2221 / MCP2221A | Uses the device’s configured I2C speed |
Options
| Flag | Short | Default | Description |
|---|---|---|---|
--adapter <TYPE> | -A | ftdi | Hardware backend: ftdi or mcp2221 |
--channel <CHANNEL> | -c | A | FTDI channel to use, must be A or B (ftdi only) |
--vid <HEX> | - | 0403 | USB vendor ID in hex (ftdi only) |
--pid <HEX> | - | auto-detect | USB product ID in hex (ftdi only) |
--clock-hz <HZ> | - | 100000 | I2C clock frequency in Hz (ftdi only) |
--output <FILE> | -o | - | Save result to a file |
--format <FORMAT> | -f | text | text or json |
--verbose | -v | - | Increase log verbosity |
Address hint table
| Address range | Typical devices |
|---|---|
| 0x18-0x19 | LIS3DH/LIS2DH accelerometer |
| 0x1C-0x1D | MMA8452/FXOS8700 accelerometer |
| 0x1E-0x1F | HMC5883L/MAG3110 magnetometer |
| 0x20-0x27 | PCF8574/MCP23017 GPIO expander |
| 0x28-0x29 | BNO055 IMU |
| 0x38-0x3B | PCF8574A GPIO expander/AHT10 humidity |
| 0x3C-0x3D | SSD1306/SH1106 OLED display |
| 0x40-0x41 | INA219 power monitor |
| 0x44-0x45 | SHT30/SHT31/SHT35 humidity & temperature |
| 0x48-0x4F | ADS1115 ADC/LM75/TMP102 temperature |
| 0x50-0x57 | 24Cxx I2C EEPROM |
| 0x60-0x67 | PCA9685 PWM driver |
| 0x68-0x69 | MPU-6050/9250 IMU/DS3231/DS1307 RTC |
| 0x70-0x75 | TCA9548A/PCA9548 I2C mux |
| 0x76-0x77 | BMP280/BME280/BMP388 pressure sensor |
Examples
FTDI adapter
$ iottack i2c scan --channel A --clock-hz 400000
Plugin name: i2c/scan
Execution time: 312 ms
Status: pass
[INFO] 3 I2C device(s) found
Scanned addresses 0x08-0x77 at 400000 Hz via FTDI 0403:6011 channel A.
[MEDIUM] I2C device at 0x3c
Address 0x3c (decimal 60) responded with ACK.
Likely: SSD1306/SH1106 OLED display
Evidence: "addr=0x3c hint=\"SSD1306/SH1106 OLED display\""
[MEDIUM] I2C device at 0x68
Address 0x68 (decimal 104) responded with ACK.
Likely: MPU-6050/9250 IMU / DS3231/DS1307 RTC
Evidence: "addr=0x68 hint=\"MPU-6050/9250 IMU / DS3231/DS1307 RTC\""
[MEDIUM] I2C device at 0x76
Address 0x76 (decimal 118) responded with ACK.
Likely: BMP280/BME280/BMP388 pressure sensor
Evidence: "addr=0x76 hint=\"BMP280/BME280/BMP388 pressure sensor\""
MCP2221 adapter
$ iottack i2c scan --adapter mcp2221
Plugin name: i2c/scan
Execution time: 420 ms
Status: pass
[INFO] 1 I2C device(s) found
Scanned addresses 0x08-0x77 at 100000 Hz via MCP2221 (04d8:00dd).
[MEDIUM] I2C device at 0x76
Address 0x76 (decimal 118) responded with ACK.
Likely: BMP280/BME280/BMP388 pressure sensor
Evidence: "addr=0x76 hint=\"BMP280/BME280/BMP388 pressure sensor\""
Troubleshooting
No devices found despite wiring being correct
- Confirm pull-up resistors (4.7 kOhm) are present on SCL and SDA.
- Try a lower clock frequency (
--clock-hz 100000, ftdi only). - Verify target power is on.
FTDI device not found
- Check
lsusbshows the adapter (0403:6011or similar). - Apply the udev rule and reconnect.
MCP2221 not found
- Check
lsusbshows04d8:00dd. - Apply the udev rule and reconnect.
MPSSE initialization failed
- Channels C and D on the FT4232H do not support MPSSE. Use
--channel Aor--channel B.
All or nearly all addresses respond (FTDI - ACK sensing broken)
If the scan reports a large number of devices (e.g., all 112 addresses), the ACK bit cannot be read and every probe falsely appears as ACK. The most common cause is that ADBUS2 (DI/TDO) is not connected to SDA.
The FT232H needs two pins shorted to the SDA line:
| FTDI pin | Signal | Notes |
|---|---|---|
| ADBUS0 (SK/TCK) | SCL | 4.7 kOhm pull-up to VCC |
| ADBUS1 (DO/TDI) | SDA | 4.7 kOhm pull-up to VCC |
| ADBUS2 (DI/TDO) | SDA | Same net, shorted to ADBUS1 |
ADBUS1 drives SDA low (open-drain). ADBUS2 reads SDA back to detect ACK/NACK. Without ADBUS2 on SDA the read pin floats low and every address appears to ACK.