Skip to content

[Bug]: INA219 detected as SHT21, fails to initialize. #10110

Description

@madeofstown

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

2.7.22.e409055

Description

Per @fifieldt 's request, copied and pasted from Discord. (https://discordapp.com/channels/867578229534359593/1039674919346249728/1491422244033921036)

I built the latest firmware from develop last night. I think it was 2 commits ahead of 2.7.21 but showed as 2.7.22. I'm having issues with an INA219 sensor on a Seeed Xiao-Nrf52840 running the I2C variant. Previously it was working correctly on a privately built firmware v2.7.19. After a full wipe and updating to v2.7.22 the INA219 is discovered as an SHTxx sensor. Firmware tries to initialize and fails. Anyone else experiencing this on alpha builds? Is anyone able to build the Xiao I2C variant from a snapshot of the 2.7.21 code so I can test that? I'm not sure how to build that myself? I also have a BME680 BME280 attached to the same I2C interface and it is detected and initialized correctly.

The INA219 is on address 0x40. Here are the logs from boot.

//\ E S H T /\ S T / C

DEBUG | ??:??:?? 1 Filesystem files:
DEBUG | ??:??:?? 1  prefs (directory)
DEBUG | ??:??:?? 1    nodes.proto (205 Bytes)
DEBUG | ??:??:?? 1    channels.proto (57 Bytes)
DEBUG | ??:??:?? 1    device.proto (80 Bytes)
DEBUG | ??:??:?? 1    transmit_history.dat (13 Bytes)
DEBUG | ??:??:?? 1  adafruit (directory)
DEBUG | ??:??:?? 1  bond_prph (directory)
DEBUG | ??:??:?? 1  bond_cntr (directory)
DEBUG | ??:??:?? 1 Power::max17048Init lipo sensor is not ready yet
DEBUG | ??:??:?? 1 Use analog input 32 for battery level
INFO  | ??:??:?? 1 Scan for i2c devices
DEBUG | ??:??:?? 1 Scan for I2C devices on port 1
DEBUG | ??:??:?? 1 Register value from 0x40: 0x2000
DEBUG | ??:??:?? 1 Register MFG_UID: 0x2000
INFO  | ??:??:?? 1 SHTXX (SHT2X) found at address 0x40
DEBUG | ??:??:?? 1 Register value from 0x77: 0x60
INFO  | ??:??:?? 1 BME280 found at address 0x77
INFO  | ??:??:?? 1 2 I2C devices found
DEBUG | ??:??:?? 1 acc_info = 0
INFO  | ??:??:?? 1 S:B:88,2.7.22.e409055,seeed_xiao_nrf52840_kit_i2c,madeofstown/meshtastic-firmware
INFO  | ??:??:?? 1 Build timestamp: 1775545200

And here is where the firmware attempts to initialize the sensor and fails.

INFO  | ??:??:?? 1 Environment Telemetry adding I2C devices...
INFO  | ??:??:?? 1 Init sensor: BME280
INFO  | ??:??:?? 1 Opened BME280 sensor on i2c bus
INFO  | ??:??:?? 1 Init sensor: SHTXX
ERROR | ??:??:?? 2 SHTXX: init(): failed
WARN  | ??:??:?? 2 Can't connect to detected SHTXX sensor. Remove from nodeTelemetrySensorsMap

the sensor in question

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