Skip to content

tbeam: add LilyGo T-Beam v1.x board support (ESP32 PICO-D4 + SX1276 + AXP192)#32

Draft
seagull9000 wants to merge 3 commits into
liquidraver:devfrom
seagull9000:feature/tbeam-clean
Draft

tbeam: add LilyGo T-Beam v1.x board support (ESP32 PICO-D4 + SX1276 + AXP192)#32
seagull9000 wants to merge 3 commits into
liquidraver:devfrom
seagull9000:feature/tbeam-clean

Conversation

@seagull9000

Copy link
Copy Markdown

Note

Draft — depends on #31 (fix/sx127x-lbt) being merged first.
The loramac-node backend holds a modem mutex during async RX; without that
fix, lora_config() returns -EBUSY on every TX attempt and all transmissions
are silently dropped.

Board

LilyGo T-Beam v1.0/v1.1 — ESP32 PICO-D4 (4 MB flash), SX1276 LoRa,
AXP192 PMIC, SSD1306 OLED, NEO-6M GPS.

Changes

boards/esp32/ttgo_tbeam/board.conf

  • DIO flash mode (PICO-D4 QIO causes bootloop on some modules)
  • WiFi OTA opt-out — classic PICO-D4 has insufficient DRAM for the OTA stack

boards/esp32/ttgo_tbeam/board.overlay

  • AXP192 PMIC in place of the AXP2101 used on newer T-Beam variants
    (LDO2 → LoRa 3.3 V, LDO3 → GPS 3.3 V)
  • LittleFS partition on internal flash
  • LED polarity correction (active-low red LED)
  • lora-tx-led alias for TX activity
  • IO38 button wired to input subsystem via gpio-keys → longpress → multi-tap chain

adapters/board/ZephyrBoard.cpp

  • Battery voltage via AXP192 I2C registers 0x78/0x79 (12-bit, 1.1 mV/LSB)
  • GPIO0 floated at boot to extinguish the blue power-indicator LED

CMakeLists.txt

  • Allow board.conf to opt out of auto-WiFi-OTA inclusion via
    CONFIG_ZEPHCORE_WIFI_OTA=n, for boards with limited DRAM

Tested

Built and run on T-Beam v1.1 hardware:

  • Boot splash → normal screen cycle, IO38 button cycles pages
  • Short press wakes display after auto-off; long press triggers node reset
  • LoRa RX/TX confirmed working (with fix/sx127x-lbt applied)
  • Battery voltage reported correctly via AXP192
  • LittleFS prefs persist across reboot

seagull9000 and others added 3 commits June 9, 2026 16:09
New board: LilyGo T-Beam v1.0/v1.1 (ESP32 PICO-D4 + SX1276 + AXP192)

boards/esp32/ttgo_tbeam/board.conf:
  - SX127x loramac-node radio backend
  - DIO flash mode (PICO-D4 QIO bootloop workaround)
  - WiFi OTA opt-out (DRAM limit on classic PICO-D4)

boards/esp32/ttgo_tbeam/board.overlay:
  - Replace AXP2101 alias with AXP192 (LDO2→LoRa 3.3V, LDO3→GPS 3.3V)
  - LittleFS partition on internal flash
  - LED polarity correction (active-low red LED)
  - lora-tx-led alias for TX activity flash

adapters/board/ZephyrBoard.cpp:
  - Battery voltage via AXP192 I2C registers 0x78/0x79 (12-bit, 1.1 mV/LSB)
  - GPIO0 floated at boot to turn off the blue power-indicator LED

CMakeLists.txt:
  - Allow board.conf to opt out of auto-WiFi-OTA inclusion
    via CONFIG_ZEPHCORE_WIFI_OTA=n for boards with limited DRAM

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BT blob reserves ~56 KB, leaving 136 KB for data+bss in dram0_0_seg.
Reduce MAX_CONTACTS to 32 and MAX_CHANNELS to 8 (saves ~60 KB BSS).
Enable &esp32_bt_hci in overlay (disabled by default in SoC DTSI).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GPIO38 (gpio1 pin 6) is the user-accessible button on T-Beam v1.x.
Add gpio-keys + input-longpress + input-multi-tap DT nodes to generate
INPUT_KEY_A / INPUT_KEY_ENTER / INPUT_KEY_1 / INPUT_KEY_LEFT events,
matching the input chain used by RAK4631/Heltec V4/Pocket builds.

Short press wakes the display after auto-off and cycles pages.
Long press triggers the page enter action.

Two stale blank lines also removed from display.c (no logic change).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@seagull9000

Copy link
Copy Markdown
Author

Note: noise floor reading is not supported in current version - requires additional rssi PR.
noise floor will report -80 (fixed value).

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