Skip to content

[Bug]: wio-sdk-wm1110 SHT41 is detected as SHT31 #4221

Description

@fifieldt

Category

Hardware Compatibility

Hardware

Other

Firmware Version

2.3.15.84088f39

Description

The Seeed Wio-WM1110 Dev Kit has a SHT41 sensor on board.

src/detect/ScanI2CTwoWire.cpp attempts to detect I2C devices, and distinguishes between SHT31 and SHT4x:

315             case SHT31_4x_ADDR:
316                 registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x89), 2);
317                 if (registerValue == 0x11a2) {
318                     type = SHT4X;
319                     LOG_INFO("SHT4X sensor found\n");
320                 } else if (getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x7E), 2) == 0x5449) {
321                     type = OPT3001;
322                     LOG_INFO("OPT3001 light sensor found\n");
323                 } else {
324                     type = SHT31;
325                     LOG_INFO("SHT31 sensor found\n");
326                 }
327 

However, for the Seeed Wio-WM1110 Dev Kit, it incorrectly falls back to SHT31, as shown in the log.

Relevant log output

INFO | ??:??:?? 0 Scanning for i2c devices...

DEBUG | ??:??:?? 0 Scanning for I2C devices on port 1

DEBUG | ??:??:?? 0 I2C device found at address 0x19

INFO | ??:??:?? 0 BMA423 accelerometer found

DEBUG | ??:??:?? 0 I2C device found at address 0x44

DEBUG | ??:??:?? 0 Wire.available() = 2

DEBUG | ??:??:?? 0 Wire.available() = 0

INFO | ??:??:?? 0 SHT31 sensor found

INFO | ??:??:?? 0 2 I2C devices found

DEBUG | ??:??:?? 0 acc_info = 31

DEBUG | ??:??:?? 0 found i2c sensor meshtastic_TelemetrySensorType_SHT31

INFO | ??:??:?? 0 Meshtastic hwvendor=21, swver=2.3.15.84088f39

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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