Skip to content

Sensor init: verify chip IDs for INA226 and BME680_BSEC#2746

Open
omeg wants to merge 2 commits into
meshcore-dev:mainfrom
omeg:omeg/check-sensor-ids
Open

Sensor init: verify chip IDs for INA226 and BME680_BSEC#2746
omeg wants to merge 2 commits into
meshcore-dev:mainfrom
omeg:omeg/check-sensor-ids

Conversation

@omeg

@omeg omeg commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Prevent I2C sensor enumeration from picking up invalid sensors in case of address conflicts. E.g. by default BME680 has the same address as BME280 (0x76). BME680 and other BME sensors check for the correct chip id in begin(), but BME680_BSEC does not.

INA260 and INA3221 already check IDs in begin(). INA219 is older and doesn't expose chip ID, it may conflict with other sensors if enabled but not present. I already had this happen but not sure what to do with it apart from implementing dynamic sensor control via CLI or something.

BTW, the reason for this PR was 1.16 enabling BME680_BSEC by default in the RAK4631 variant (which was incorrectly picked up on my device that had a BME280, creating a ghost LPP channel with nothing in it). IMO variant files are not the place for such switches, enables/disables should be controlled in one central place since every device might have different sensors.

omeg added 2 commits June 10, 2026 20:19
Prevent I2C sensor enumeration from picking up invalid sensors in case of address conflicts. E.g. by default BME680 has the same address as BME280 (0x76). BME680 and other BME sensors check for the correct chip id in begin(), but BME680_BSEC does not.

INA260 and INA3221 already check IDs in begin(). INA219 is older and doesn't expose chip ID, it may conflict with other sensors if enabled but not present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant