Skip to content

Fix SH1106 OLED address detection on T-Beam Supreme sub-variants - #3153

Open
strasharo wants to merge 1 commit into
meshcore-dev:devfrom
strasharo:fix/tbeam-supreme-oled-address-detection
Open

Fix SH1106 OLED address detection on T-Beam Supreme sub-variants#3153
strasharo wants to merge 1 commit into
meshcore-dev:devfrom
strasharo:fix/tbeam-supreme-oled-address-detection

Conversation

@strasharo

@strasharo strasharo commented Aug 9, 2026

Copy link
Copy Markdown

Summary

Fixes #3147 (T-Beam Supreme blank display on v1.17.0).

The T-Beam S3 Supreme ships a QMC6310N magnetometer whose configurable I2C address collides with the OLED's — depending on the board sub-variant (VHF/UHF, per LilyGo's hardware docs), the display sits at either 0x3C or 0x3D, with the magnetometer on the other one. SH1106Display::begin() only ever tried the single DISPLAY_ADDRESS from the variant's build flags (currently hardcoded to 0x3D for this board), so on units where that doesn't match the actual wiring, the display silently fails to init even though the panel and I2C bus are both fine.

This is a regression from before v1.17.0: v1.16.0 worked because of #2815, but that fix only tries 0x3D then falls back to 0x3C without checking which device is actually at each address — so on boards where the magnetometer ACKs first, it gets initialized as if it were the display.

Fix

begin() now probes both 0x3C and 0x3D and disambiguates by reading the magnetometer's chip-ID register (a read of register 0x00 returns 0x80 on a QMC6310N) — same technique LilyGo's own factory test firmware uses — instead of just taking whichever address ACKs first.

This is the same core approach as #2591, ported onto current dev (that PR predates a color-type refactor and no longer applies/builds cleanly).

Testing

Built and flashed T_Beam_S3_Supreme_SX1262_companion_radio_ble locally on a T-Beam Supreme unit that reproduces #3147:

  • Stock v1.17.0: display blank (confirmed).
  • Stock v1.16.0: display works (confirmed).
  • This patch on top of current dev: display works.

Related

The T-Beam S3 Supreme ships with a QMC6310N magnetometer whose
configurable I2C address collides with the OLED's: depending on the
board sub-variant, the display sits at either 0x3C or 0x3D, with the
magnetometer occupying the other one. SH1106Display::begin() only ever
tried the single address from DISPLAY_ADDRESS, so boards where the
build-time default doesn't match their wiring get a silently blank
screen even though the panel and bus are both fine.

begin() now probes both 0x3C and 0x3D and disambiguates by reading the
magnetometer's chip-ID register (0x00 returns 0x80 on a QMC6310N) -
the same technique LilyGo's own factory test firmware uses - instead
of picking whichever address happens to ACK first.

Fixes meshcore-dev#3147
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.

T-Beam Supreme blank display on v1.17.0

1 participant