Skip to content

[Bug]: SOLVED Problem with BMP390L #9811

Description

@MikeEitel

Category

Hardware Compatibility

Hardware

Other

Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?

  • Meshtastic UI aka MUI colorTFT
  • InkHUD ePaper
  • OLED slide UI on any display

Firmware Version

Newest Lately

Description

Sorry but I feel not capable to do a pull request so i try this way:
I found a logic bug when trying to use BMP390L in ScanI2CTwoWire.cpp
Cause:
Read 1: Register 0xD0 → gibt 0x00 zurück

Code fällt in case 0x00:

Read 2: Register 0x0D (DPS310!) → gibt 0x98 zurück

0x98 != 0x10 (DPS310) → kein Match

fällt in default → liest Register 0x00

The default with register 0x00 is never reached! The code does a break after DPS310-check and leavs the switch.

Solution:
case BME_ADDR:
case BME_ADDR_ALTERNATE:
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xD0), 1); // GET_ID
switch (registerValue) {
case 0x61:
logFoundDevice("BME680", (uint8_t)addr.address);
type = BME_680;
break;
case 0x60:
logFoundDevice("BME280", (uint8_t)addr.address);
type = BME_280;
break;
case 0x55:
logFoundDevice("BMP085/BMP180", (uint8_t)addr.address);
type = BMP_085;
break;
case 0x00:
// DPS310 check
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0D), 1);
if (registerValue == 0x10) {
logFoundDevice("DPS310", (uint8_t)addr.address);
type = DPS310;
break;
}
// NEU: kein DPS310 → prüfe BMP388/390
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1);
switch (registerValue) {
case 0x50:
logFoundDevice("BMP-388", (uint8_t)addr.address);
type = BMP_3XX;
break;
case 0x60:
logFoundDevice("BMP-390", (uint8_t)addr.address);
type = BMP_3XX;
break;
default:
logFoundDevice("BMP-280", (uint8_t)addr.address);
type = BMP_280;
break;
}
break;
}
break;

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleIssues that will be closed if not triaged.bugSomething isn't workingfirst-contributionneeds-reviewNeeds human review

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions