Compare commits

...

45 Commits

Author SHA1 Message Date
Austin da50aab27d Merge branch 'develop' into t-beam-bpf 2026-06-12 17:47:23 -04:00
Austin 9f34ea4230 Merge branch 'develop' into t-beam-bpf 2026-06-09 20:23:02 -04:00
vidplace7 8dd5377676 This is a 5-6W radio!! Add TX_GAIN_LORA 2026-06-05 18:50:10 -04:00
vidplace7 6c0ef72d02 Add template for PA curve 2026-06-05 09:10:42 -04:00
Austin c2624c6140 Merge branch 'develop' into t-beam-bpf 2026-06-04 13:51:51 -04:00
vidplace7 1de3e292a8 Add comment back 2026-06-04 13:51:04 -04:00
vidplace7 64949156d6 Remove mismatch guarding (we need a more comprehensive approach) 2026-06-04 13:49:32 -04:00
vidplace7 1aab2d880d Remove other-variant changes (BPF-only)
These have been moved to other PRs
2026-06-03 20:40:43 -04:00
Austin 7550b16f91 Merge branch 'develop' into t-beam-bpf 2026-06-03 18:06:16 -04:00
vidplace7 5778a469cf Set RF95 pins for T-Beam Supreme
May cause regressions!!
2026-06-03 15:59:37 -04:00
vidplace7 2ca305d439 RadioLib doesn't accept 15.625 kHz
Use 15.6 instead
2026-06-03 13:49:44 -04:00
vidplace7 0a2e4c7e0f Adjust slotOverrides for TinyFast 2026-06-03 12:31:11 -04:00
vidplace7 211af899bd Switch to TinyFast
Still need to flesh out the default channels
2026-06-03 11:55:57 -04:00
Austin d292217c34 Merge branch 'develop' into t-beam-bpf 2026-06-03 11:46:45 -04:00
Austin 7eb5582646 Merge branch 'develop' into t-beam-bpf 2026-06-01 18:25:02 -04:00
Austin a01937d6a9 Merge branch 'develop' into t-beam-bpf 2026-06-01 16:17:58 -04:00
vidplace7 0bce1e937f Initial default slots 2026-05-30 18:04:31 -04:00
vidplace7 94b343d3d8 Trunk fmt 2026-05-30 17:29:41 -04:00
vidplace7 8ef885a7ba Re-add PROFILE_HAM regionprofile
Accidentally removed in last merge
2026-05-30 17:24:15 -04:00
Austin 957b568a2d Merge branch 'develop' into t-beam-bpf 2026-05-30 17:22:22 -04:00
vidplace7 f0a67c5cb0 Add HAS_HAM_2M definition to variant headers for 2M support 2026-05-26 22:46:56 -04:00
vidplace7 4a73482162 Add ITU region options to MenuAction enum 2026-05-26 22:07:47 -04:00
vidplace7 aad1a27cbf Fix for ITU 2/3 split 2026-05-26 20:19:05 -04:00
Austin 2b5e2b985f Merge branch 'develop' into t-beam-bpf 2026-05-26 20:00:09 -04:00
Austin 1997cbce40 Move T-Beam-BPF work from #9703 at vidplace7/t-beam-bpf
Initial work to add T-Beam BPF (144-148 Mhz LoRa)
2026-05-26 19:02:30 -04:00
Austin ff1f02d164 Merge branch 'develop' into t-beam-bpf 2026-05-26 18:58:51 -04:00
vidplace7 2e5f44db16 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.
2026-05-21 18:34:16 -04:00
vidplace7 1d595beab7 Default ham to narrow_fast 2026-05-21 18:13:05 -04:00
Austin f382718f16 Merge branch 'develop' into t-beam-bpf 2026-05-21 17:16:44 -04:00
vidplace7 76a79dd8ec Fix compilation with pioarduino (USB_MODE) 2026-05-18 15:47:14 -04:00
Austin da236599d6 Merge branch 'develop' into t-beam-bpf 2026-05-17 20:14:29 -04:00
Thomas Göttgens 39908bfbd2 Include the back option. 2026-04-21 21:22:33 +02:00
Thomas Göttgens bcceff6f4d Merge branch 'develop' into t-beam-bpf 2026-04-21 17:33:56 +02:00
Thomas Göttgens 273bcdc4db Merge branch 't-beam-bpf' of https://github.com/vidplace7/meshtastic-firmware into t-beam-bpf 2026-04-21 17:33:24 +02:00
Thomas Göttgens a4eb6b0b63 Lora CS is indeed 1, SD Card CS is 10 2026-04-21 17:32:40 +02:00
Thomas Göttgens 5fa9b05d70 Switch pin after defining it as output
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-21 17:26:57 +02:00
Thomas Göttgens cccb181335 Merge branch 'develop' into t-beam-bpf 2026-04-21 17:15:51 +02:00
Thomas Göttgens b365c94981 Add ITU regions for this device and make GPS work. 2026-04-21 15:13:43 +02:00
Thomas Göttgens 0d08680104 Merge branch 't-beam-bpf' of https://github.com/vidplace7/meshtastic-firmware into t-beam-bpf 2026-04-21 11:52:13 +02:00
Thomas Göttgens 51a5957cf4 Merge branch 'develop' into t-beam-bpf 2026-04-21 11:49:30 +02:00
Thomas Göttgens 2bd1faa7af Merge branch 't-beam-bpf' of https://github.com/vidplace7/meshtastic-firmware into t-beam-bpf 2026-04-21 09:20:53 +02:00
Thomas Göttgens 4271481300 minor correction to fix compiler warnings 2026-03-26 19:34:35 +01:00
Austin Lane 64f415dc0f Add T-Beam BPF (144-148 Mhz LoRa) 2026-03-26 19:34:35 +01:00
Thomas Göttgens 1d1ca1053b minor correction to fix compiler warnings 2026-03-26 19:33:41 +01:00
Austin Lane 9a94e8bd9f Add T-Beam BPF (144-148 Mhz LoRa) 2026-02-20 21:13:16 -05:00
9 changed files with 203 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
{
"build": {
"arduino": {
"ldscript": "esp32s3_out.ld",
"memory_type": "qio_opi"
},
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DLILYGO_TBEAM_BPF",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"psram_type": "opi",
"hwids": [["0x303A", "0x1001"]],
"mcu": "esp32s3",
"variant": "t-beam-bpf"
},
"connectivity": ["wifi", "bluetooth", "lora"],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": ["arduino"],
"name": "LilyGo TBeam-BPF",
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 921600
},
"url": "http://www.lilygo.cn/",
"vendor": "LilyGo"
}
+16
View File
@@ -1367,6 +1367,22 @@ bool Power::axpChipInit()
PMU->disablePowerOutput(XPOWERS_DLDO1); // Invalid power channel, it does not exist
PMU->disablePowerOutput(XPOWERS_DLDO2); // Invalid power channel, it does not exist
PMU->disablePowerOutput(XPOWERS_VBACKUP);
} else if (HW_VENDOR == meshtastic_HardwareModel_TBEAM_BPF) {
// T-Beam BPF rail map (per schematic LilyGo_TBeam_BPF r2025-05-08):
// DCDC1 -> ESP32 + OLED 3V3 (always on, protected)
// ALDO2 -> MicroSD 3V3 (OFF at reset, must enable)
// ALDO4 -> L76K GNSS 3V3 (OFF at reset, must enable)
// ALDO1/3, BLDO1/2, DLDO1 -> user headers / unused at boot, leave at reset defaults.
// LoRa power is outside the PMU (external P-MOSFET switched by RF95_POWER_EN / IO16).
PMU->setPowerChannelVoltage(XPOWERS_ALDO4, 3300);
PMU->enablePowerOutput(XPOWERS_ALDO4);
PMU->setPowerChannelVoltage(XPOWERS_ALDO2, 3300);
PMU->enablePowerOutput(XPOWERS_ALDO2);
// Make sure nothing's driving into an unused rail
PMU->disablePowerOutput(XPOWERS_DCDC5);
PMU->disablePowerOutput(XPOWERS_DLDO1);
}
// disable all axp chip interrupt
+11
View File
@@ -219,6 +219,16 @@ static void applyLoraRegion(meshtastic_Config_LoRaConfig_RegionCode region, bool
void menuHandler::LoraRegionPicker(uint32_t duration)
{
#ifdef HAS_HAM_2M_ONLY
// Hardware is restricted to the amateur 2m band — offer only the 2m regions
// so the user cannot pick a sub-GHz region the RF path cannot emit or receive.
static const LoraRegionOption regionOptions[] = {
{"Back", OptionsAction::Back},
{"ITU1_2M (144-146)", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_ITU1_2M},
{"ITU2_2M (144-148)", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_ITU2_2M},
{"ITU3_2M (144-148)", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_ITU3_2M},
};
#else
static const LoraRegionOption regionOptions[] = {
{"Back", OptionsAction::Back},
{"US", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_US},
@@ -255,6 +265,7 @@ void menuHandler::LoraRegionPicker(uint32_t duration)
{"ITU2_125CM (220-225)", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_ITU2_125CM},
};
#endif
constexpr size_t regionCount = sizeof(regionOptions) / sizeof(regionOptions[0]);
static std::array<const char *, regionCount> regionLabels{};
+7
View File
@@ -1539,6 +1539,13 @@ void NodeDB::installDefaultDeviceState()
memcpy(owner.macaddr, ourMacAddr, sizeof(owner.macaddr));
owner.has_is_unmessagable = true;
owner.is_unmessagable = false;
#ifdef HAS_HAM_2M_ONLY
// Ham-band-only hardware defaults to licensed operation. The user can still flip this off later
// (e.g. a commercial operator on an adjacent allocation who wants to keep encryption on) — we
// only set the default here, not on every boot.
owner.is_licensed = true;
#endif
}
// We reserve a few nodenums for future use
+9
View File
@@ -113,6 +113,11 @@ void RF95Interface::setTransmitEnable(bool txon)
/// \return true if initialisation succeeded.
bool RF95Interface::init()
{
#ifdef RF95_POWER_EN
pinMode(RF95_POWER_EN, OUTPUT);
digitalWrite(RF95_POWER_EN, HIGH);
#endif
RadioLibInterface::init();
#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT)
@@ -335,6 +340,10 @@ bool RF95Interface::sleep()
setStandby(); // First cancel any active receiving/sending
lora->sleep();
#ifdef RF95_POWER_EN
digitalWrite(RF95_POWER_EN, LOW);
#endif
#ifdef RF95_FAN_EN
digitalWrite(RF95_FAN_EN, 0);
#endif
+2
View File
@@ -198,6 +198,8 @@
#define HW_VENDOR meshtastic_HardwareModel_T_DECK_PRO
#elif defined(T_BEAM_1W)
#define HW_VENDOR meshtastic_HardwareModel_TBEAM_1_WATT
#elif defined(T_BEAM_BPF)
#define HW_VENDOR meshtastic_HardwareModel_TBEAM_BPF
#elif defined(T_LORA_PAGER)
#define HW_VENDOR meshtastic_HardwareModel_T_LORA_PAGER
#elif defined(HELTEC_V4)
@@ -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