If you are working on a Linux system or embedded environment, an error code 110 often corresponds to ETIMEDOUT, i.e., a timeout occurred waiting for a device response.
The traceback and error message:
OSError: 12C bus error (110)
indicates your Python code is raising an I2C bus timeout (errno 110 = ETIMEDOUT) when trying to communicate with the QMP6988 sensor over I2C.
What’s happening?
Your code (in qmp6988.py, around lines 137, 291, and 306) is trying to read data from the sensor via I2C, but the underlying I2C driver is timing out—most likely no ACK from the sensor or bus stuck.
Likely causes
-
Wiring or hardware issues
- SDA, SCL lines not connected correctly, loose wires, or missing ground line.
- Missing/incorrect pull-up resistors on SDA/SCL lines (usually 4.7kΩ).
-
Sensor power or initialization problem
- Sensor not powered or not ready (boot time).
- Sensor reset or malfunction.
-
Wrong I2C address or bus
- Code is using wrong address or wrong I2C bus/device node.
-
Timing/clock speed too fast
- Sensor can't keep up with bus clock speed.
-
Bus stuck or busy due to noise/hardware fault
How to debug and fix
-
Check Physical Wiring
- Verify SDA, SCL, GND, and sensor VCC pins are connected correctly.
- Use a multimeter to check connections.
-
Ensure pull-ups are present
- Usually, 4.7kΩ pull-up resistors are needed on both SDA and SCL lines.
-
Confirm sensor address
- Check datasheet for QMP6988 I2C address.
- Use
i2cdetect -y 1 (or appropriate bus number) on Linux to confirm sensor presence.
-
Run a bus scan tool
- Confirm hardware is detected before running your Python code.
-
Add delays/init in code
- Sensor might require some delay after power-up before communication.
- Add retries or catch exception and retry reading.
-
Lower I2C bus speed
- Reduce frequency (e.g., 100kHz) to improve reliability.
-
Use logic analyzer or oscilloscope
- Check actual signals for clock stretching, stuck lines, or no data.
Example: i2cdetect usage
sudo i2cdetect -y 1
You should see your sensor's address in the output grid. If not, hardware or wiring is the problem.
If you share
- Your wiring setup
- The platform (Raspberry Pi, embedded MCU, etc.)
- The I2C bus number used in code
- Snippet of how you open the bus and call sensor read functions
I can help you pinpoint the issue better.
Summary:
OSError 12C bus error (110) usually means hardware communication timeout on I2C bus. Start with wiring check > pull-ups > bus scan > sensor power > slower clock > retries.