Add T-Beam BPF - 144-148 Mhz LoRa @ ~37 dBm (5 Watts) (#10558)

* Add T-Beam BPF (144-148 Mhz LoRa)

* minor correction to fix compiler warnings

* Add T-Beam BPF (144-148 Mhz LoRa)

* minor correction to fix compiler warnings

* Add ITU regions for this device and make GPS work.

* Switch pin after defining it as output

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Lora CS is indeed 1, SD Card CS is 10

* Include the back option.

* Fix compilation with pioarduino (USB_MODE)

* Default ham to narrow_fast

* Default PROFILE_HAM to slot 17

This is an appropriate default in the USA but not the EU.

The slot override really should follow the region itself, not the regionprofile.

* Fix for ITU 2/3 split

* Add ITU region options to MenuAction enum

* Add HAS_HAM_2M definition to variant headers for 2M support

* Re-add PROFILE_HAM regionprofile

Accidentally removed in last merge

* Trunk fmt

* Initial default slots

* Switch to TinyFast

Still need to flesh out the default channels

* Adjust slotOverrides for TinyFast

* RadioLib doesn't accept 15.625 kHz

Use 15.6 instead

* Set RF95 pins for T-Beam Supreme

May cause regressions!!

* Remove other-variant changes (BPF-only)

These have been moved to other PRs

* Remove mismatch guarding (we need a more comprehensive approach)

* Add comment back

* Add template for PA curve

* This is a 5-6W radio!! Add TX_GAIN_LORA

* Trunk fmt because NomDeTom hates emdashes

---------

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Austin
2026-07-27 13:54:53 +00:00
committed by GitHub
co-authored by GitHub Thomas Göttgens Copilot Autofix powered by AI
parent 1e982fa78c
commit a640d44b5c
9 changed files with 203 additions and 0 deletions
@@ -0,0 +1,26 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303a
#define USB_PID 0x1001
// UART1 (qwiic)
static const uint8_t TX = 43;
static const uint8_t RX = 44;
// I2C for OLED and sensors
static const uint8_t SDA = 8;
static const uint8_t SCL = 9;
// Default SPI mapped to Radio/SD
static const uint8_t SS = 1; // LoRa CS
static const uint8_t MOSI = 11;
static const uint8_t MISO = 13;
static const uint8_t SCK = 12;
// SD Card CS
#define SDCARD_CS 10
#endif /* Pins_Arduino_h */
@@ -0,0 +1,23 @@
; LilyGo T-Beam-BPF (144-148Mhz) ~5 Watt (37 dBm)
[env:t-beam-bpf]
custom_meshtastic_hw_model = 124
custom_meshtastic_hw_model_slug = TBEAM_BPF
custom_meshtastic_architecture = esp32s3
custom_meshtastic_actively_supported = true
custom_meshtastic_support_level = 3
custom_meshtastic_display_name = LILYGO T-Beam BPF
custom_meshtastic_images = tbeam-1w.svg
custom_meshtastic_tags = LilyGo
extends = esp32s3_base
board = t-beam-bpf
board_build.partitions = default_16MB.csv
board_check = true
lib_deps =
${esp32s3_base.lib_deps}
build_flags =
${esp32s3_base.build_flags}
-I variants/esp32s3/t-beam-bpf
-D T_BEAM_BPF
+70
View File
@@ -0,0 +1,70 @@
// LilyGo T-Beam-BPF variant.h
// Configuration based on LilyGO utilities.h and RF documentation
// Hardware is restricted to the amateur 2m band (144-148 MHz).
#define HAS_HAM_2M_ONLY 1
// I2C for OLED display (SH1106 at 0x3C)
#define I2C_SDA 8
#define I2C_SCL 9
// GPS - Quectel L76K. Per schematic sheet 7:
#define GPS_RX_PIN 5
#define GPS_TX_PIN 6
#define GPS_1PPS_PIN 7
#define HAS_GPS 1
#define GPS_BAUDRATE 9600
// Buttons
#define BUTTON_PIN 0 // BUTTON 1
#define ALT_BUTTON_PIN 3 // BUTTON 2
// SPI (shared by LoRa and SD)
#define SPI_MOSI 11
#define SPI_SCK 12
#define SPI_MISO 13
#define SPI_CS 10
// SD Card
#define HAS_SDCARD
#define SDCARD_USE_SPI1
// #define SDCARD_CS SPI_CS (already defined in pins_arduino.h)
// LoRa Radio - SX1278 144-148Mhz
#define USE_RF95
#define LORA_SCK SPI_SCK
#define LORA_MISO SPI_MISO
#define LORA_MOSI SPI_MOSI
#define LORA_CS 1
#define LORA_RESET 18
#define LORA_IRQ 14
#define LORA_DIO0 LORA_IRQ
#define LORA_DIO1 21
#define RF95_RXEN 39 // LNA enable - HIGH during RX
// CRITICAL: Radio power enable - MUST be HIGH before lora.begin()!
// GPIO 16 powers the SX1278 via LDO
#define RF95_POWER_EN 16
// +27dBm PA
// LilyGo Docs specify SX1278 power must be capped at 10
#define RF95_MAX_POWER 10
// PA curve mapping (TX values 1-10)
// Measurements taken with 5V USB power (max 37 dBm on battery power)
// Input values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
// Output values: 0, 34, 35, 36, 36, 37, 37, 38, 38, 38
#define NUM_PA_POINTS 10
#define TX_GAIN_LORA 0, 32, 32, 32, 31, 31, 30, 30, 29, 28
// Display - SH1106 OLED (128x64)
#define USE_SH1106
#define OLED_WIDTH 128
#define OLED_HEIGHT 64
// 32768 Hz crystal present
#define HAS_32768HZ 1
// PMU
#define HAS_AXP2101
// #define PMU_IRQ 4 // Leave disabled for now