Files
MeshCore/variants/station_g3_esp32/platformio.ini
T
mikecarper 7babdbc518 Fix Room and Sensor requests and add G3 Sensor builds
Bound ACL replies for encrypted routes, authorize Sensor ACL access using the actual Admin role, and preserve request retries after failed queue admission. Validate stored paths for replies, while keeping Room keep-alives direct-only.

Add both G3 RF-slot Sensor profiles, suppress battery alarms on unavailable measurements, and remove the unsupported Sensor WebConfig capability. Add executable regression coverage and CI checks.
2026-10-06 09:20:05 -07:00

456 lines
14 KiB
INI

; The motherboard has two RF daughterboard slots on separate GPIOs, mirrored by its
; "LNA P" / "LNA S" jumpers. Slot 1 is [Station_G3_ESP32], slot 2 is [Station_G3_ESP32_r2];
; the slot pins sit in their own sections so neither set of -D flags shadows the other.
[Station_G3_ESP32_common]
extends = esp32_base
board = station-g3-esp32
board_build.partitions = default_16MB.csv
build_flags =
${esp32_base.build_flags}
${sensor_base.build_flags}
-I variants/station_g3_esp32
-I src/helpers/ui
-D STATION_G3_ESP32
-D USE_SX1262
-D RADIO_CLASS=CustomSX1262
-D WRAPPER_CLASS=CustomSX1262Wrapper
-D P_PA1_EN=9 ; PA PL1 Mode: LOW/open selects low level, HIGH/short selects high level.
-D P_PA1_EN_ACTIVE=HIGH
-D LORA_TX_POWER=7 ; SX1262 input power to the Station G3 PA; final output depends on PA PL1/PL2 level.
-D MAX_LORA_TX_POWER=22
; -D P_LORA_TX_LED=35
-D PIN_BOARD_SDA=5
-D PIN_BOARD_SCL=6
-D PIN_USER_BTN=38
-D MOMENTARY_BUTTON_WAKE_FROM_SLEEP=1
-D MOMENTARY_BUTTON_WAKE_HOLD_MS=120000UL
-D PIN_GPS_RX=15
-D PIN_GPS_TX=7
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=0
-D DISPLAY_CLASS=SH1106Display
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/station_g3_esp32>
+<helpers/sensors>
+<helpers/ui/SH1106Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
lib_deps =
${esp32_base.lib_deps}
${sensor_base.lib_deps}
adafruit/Adafruit SH110X @ ~2.1.13
adafruit/Adafruit GFX Library @ ^1.12.1
; PA PL1 is one board-level jumper shared by both slots, so P_PA1_EN stays in the base above.
[station_g3_esp32_r1_pins]
build_flags =
-D P_LORA_DIO_1=48
-D P_LORA_NSS=11
-D P_LORA_RESET=21
-D P_LORA_BUSY=47
-D P_LORA_SCLK=12
-D P_LORA_MISO=14
-D P_LORA_MOSI=13
-D P_PRIMARY_LNA_EN=10 ; Primary Slot LNA Mode: LOW/open is LNA on, HIGH/short is LNA off.
-D P_PRIMARY_LNA_EN_ACTIVE=LOW
; Slot 2 ("LNA S"). P_PRIMARY_LNA_EN keeps its name because LoRaFEMControl knows only one LNA pin.
[station_g3_esp32_r2_pins]
build_flags =
-D P_LORA_DIO_1=2
-D P_LORA_NSS=43
-D P_LORA_RESET=44
-D P_LORA_BUSY=1
-D P_LORA_SCLK=39
-D P_LORA_MISO=41
-D P_LORA_MOSI=40
-D P_PRIMARY_LNA_EN=42 ; Secondary Slot LNA Mode, same polarity as the primary slot.
-D P_PRIMARY_LNA_EN_ACTIVE=LOW
[Station_G3_ESP32]
extends = Station_G3_ESP32_common
build_flags =
${Station_G3_ESP32_common.build_flags}
${station_g3_esp32_r1_pins.build_flags}
build_src_filter = ${Station_G3_ESP32_common.build_src_filter}
lib_deps = ${Station_G3_ESP32_common.lib_deps}
[Station_G3_ESP32_r2]
extends = Station_G3_ESP32_common
build_flags =
${Station_G3_ESP32_common.build_flags}
${station_g3_esp32_r2_pins.build_flags}
build_src_filter = ${Station_G3_ESP32_common.build_src_filter}
lib_deps = ${Station_G3_ESP32_common.lib_deps}
[env:Station_G3_ESP32_repeater]
extends = Station_G3_ESP32
build_flags =
${Station_G3_ESP32.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<../examples/simple_repeater>
lib_deps =
${Station_G3_ESP32.lib_deps}
${esp32_ota.lib_deps}
[env:Station_G3_ESP32_logging_repeater]
extends = Station_G3_ESP32
build_flags =
${Station_G3_ESP32.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Logging Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<../examples/simple_repeater>
lib_deps =
${Station_G3_ESP32.lib_deps}
${esp32_ota.lib_deps}
[env:Station_G3_ESP32_room_server]
extends = Station_G3_ESP32
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<../examples/simple_room_server>
build_flags =
${Station_G3_ESP32.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Room"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps =
${Station_G3_ESP32.lib_deps}
${esp32_ota.lib_deps}
[env:Station_G3_ESP32_sensor]
extends = Station_G3_ESP32
build_flags =
${Station_G3_ESP32.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Sensor"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<../examples/simple_sensor>
lib_deps =
${Station_G3_ESP32.lib_deps}
${esp32_ota.lib_deps}
[env:Station_G3_ESP32_companion_radio_usb]
extends = Station_G3_ESP32
build_flags =
${Station_G3_ESP32.build_flags}
-I examples/companion_radio/ui-new
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D ENABLE_USB_INTERFACE
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
lib_deps =
${Station_G3_ESP32.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:Station_G3_ESP32_companion_radio_ble]
extends = Station_G3_ESP32
build_flags =
${Station_G3_ESP32.build_flags}
-I examples/companion_radio/ui-new
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D BLE_PIN_CODE=123456
-D BLE_DEBUG_LOGGING=1
-D OFFLINE_QUEUE_SIZE=512
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<helpers/esp32/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
lib_deps =
${Station_G3_ESP32.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:Station_G3_ESP32_companion_radio_wifi]
extends = Station_G3_ESP32
build_flags =
${Station_G3_ESP32.build_flags}
-I examples/companion_radio/ui-new
-D ENABLE_WIFI_INTERFACE
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D WIFI_DEBUG_LOGGING=1
-D WIFI_SSID='"myssid"'
-D WIFI_PWD='"mypwd"'
-D OFFLINE_QUEUE_SIZE=512
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
lib_deps =
${Station_G3_ESP32.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:Station_G3_ESP32_companion_radio_full]
extends = env:Station_G3_ESP32_companion_radio_wifi
board_build.flash_mode = ${esp32_s3_full.board_build.flash_mode}
build_flags =
${env:Station_G3_ESP32_companion_radio_wifi.build_flags}
-D MESHCORE_REQUIRES_COMPANION_RADIO_FULL=1
[env:Station_G3_ESP32_kiss_modem]
extends = Station_G3_ESP32
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<../examples/kiss_modem/>
build_flags =
${Station_G3_ESP32.build_flags}
; KISS profile switching is performed locally by the SX1262 scanner, not
; through serial host round trips. Keep this fast-RX/buffered-SPI opt-in
; isolated to the host-powered modem image.
-D MC_SX1262_FAST_PROFILE_SWITCH=1
-D MC_SX1262_FAST_FS=1
-D MC_SX1262_FAST_PACKET_CACHE=1
-D MC_SX1262_BUFFERED_RADIO_HAL=1
-D MC_SX1262_SPI_HZ=8000000
[env:Station_G3_ESP32_repeater_observer_mqtt]
extends = Station_G3_ESP32
board_build.partitions = default_16MB.csv ; standard 16MB partition table
extra_scripts =
${esp32_base.extra_scripts}
pre:scripts/generate_cert_bundle.py
board_ssl_cert_source = adafruit-full
board_build.embed_files = src/certs/x509_crt_bundle.bin
build_flags =
${Station_G3_ESP32.build_flags}
-D ADVERT_NAME='"MQTT Observer"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D WITH_MQTT_BRIDGE=1
-D MQTT_MAX_PACKET_SIZE=1024
-D MQTT_DEBUG=1
# -D MESH_PACKET_LOGGING=1
# -D MESH_DEBUG=1
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-D ESP32_CPU_FREQ=160
-D WITH_SNMP=1
# -D WIFI_SSID='"ssid"'
# -D WIFI_PWD='"password"'
# -D MQTT_SERVER='"your-mqtt-broker.com"'
# -D MQTT_PORT=1883
# -D MQTT_USERNAME='"your-username"'
# -D MQTT_PASSWORD='"your-password"'
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<helpers/bridges/MQTTBridge.cpp>
+<helpers/MQTTMessageBuilder.cpp>
+<helpers/JWTHelper.cpp>
+<helpers/SNMPAgent.cpp>
+<helpers/ui/SH1106Display.cpp>
+<../examples/simple_repeater>
lib_deps =
${Station_G3_ESP32.lib_deps}
${esp32_ota.lib_deps}
elims/PsychicMqttClient@^0.2.4
bblanchon/ArduinoJson @ 7.4.3
arduino-libraries/NTPClient
JChristensen/Timezone
paulstoffregen/Time@1.6.1
0neblock/SNMP_Agent
[env:Station_G3_ESP32_room_server_observer_mqtt]
extends = Station_G3_ESP32
board_build.partitions = default_16MB.csv ; standard 16MB partition table
extra_scripts =
${esp32_base.extra_scripts}
pre:scripts/generate_cert_bundle.py
board_ssl_cert_source = adafruit-full
board_build.embed_files = src/certs/x509_crt_bundle.bin
build_flags =
${Station_G3_ESP32.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Room Observer"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
-D WITH_MQTT_BRIDGE=1
-D MAX_NEIGHBOURS=50
-D MQTT_MAX_PACKET_SIZE=1024
-D MQTT_DEBUG=1
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-D ESP32_CPU_FREQ=160
-D WITH_SNMP=1
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<helpers/bridges/MQTTBridge.cpp>
+<helpers/MQTTMessageBuilder.cpp>
+<helpers/JWTHelper.cpp>
+<helpers/ui/SH1106Display.cpp>
+<helpers/SNMPAgent.cpp>
+<../examples/simple_room_server>
lib_deps =
${Station_G3_ESP32.lib_deps}
${esp32_ota.lib_deps}
elims/PsychicMqttClient@^0.2.4
bblanchon/ArduinoJson @ 7.4.3
arduino-libraries/NTPClient
JChristensen/Timezone
paulstoffregen/Time@1.6.1
0neblock/SNMP_Agent
[env:Station_G3_ESP32_r2_repeater]
extends = Station_G3_ESP32_r2
build_flags =
${Station_G3_ESP32_r2.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${Station_G3_ESP32_r2.build_src_filter}
+<../examples/simple_repeater>
lib_deps =
${Station_G3_ESP32_r2.lib_deps}
${esp32_ota.lib_deps}
[env:Station_G3_ESP32_r2_room_server]
extends = Station_G3_ESP32_r2
build_src_filter = ${Station_G3_ESP32_r2.build_src_filter}
+<../examples/simple_room_server>
build_flags =
${Station_G3_ESP32_r2.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Room"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps =
${Station_G3_ESP32_r2.lib_deps}
${esp32_ota.lib_deps}
[env:Station_G3_ESP32_r2_sensor]
extends = Station_G3_ESP32_r2
build_flags =
${Station_G3_ESP32_r2.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Slot 2 Sensor"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
build_src_filter = ${Station_G3_ESP32_r2.build_src_filter}
+<../examples/simple_sensor>
lib_deps =
${Station_G3_ESP32_r2.lib_deps}
${esp32_ota.lib_deps}
[env:Station_G3_ESP32_r2_repeater_observer_mqtt]
extends = Station_G3_ESP32_r2
board_build.partitions = default_16MB.csv ; standard 16MB partition table
extra_scripts =
${esp32_base.extra_scripts}
pre:scripts/generate_cert_bundle.py
board_ssl_cert_source = adafruit-full
board_build.embed_files = src/certs/x509_crt_bundle.bin
build_flags =
${Station_G3_ESP32_r2.build_flags}
-D ADVERT_NAME='"MQTT Observer"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D WITH_MQTT_BRIDGE=1
-D MQTT_MAX_PACKET_SIZE=1024
-D MQTT_DEBUG=1
# -D MESH_PACKET_LOGGING=1
# -D MESH_DEBUG=1
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-D ESP32_CPU_FREQ=160
-D WITH_SNMP=1
# -D WIFI_SSID='"ssid"'
# -D WIFI_PWD='"password"'
# -D MQTT_SERVER='"your-mqtt-broker.com"'
# -D MQTT_PORT=1883
# -D MQTT_USERNAME='"your-username"'
# -D MQTT_PASSWORD='"your-password"'
build_src_filter = ${Station_G3_ESP32_r2.build_src_filter}
+<helpers/bridges/MQTTBridge.cpp>
+<helpers/MQTTMessageBuilder.cpp>
+<helpers/JWTHelper.cpp>
+<helpers/SNMPAgent.cpp>
+<helpers/ui/SH1106Display.cpp>
+<../examples/simple_repeater>
lib_deps =
${Station_G3_ESP32_r2.lib_deps}
${esp32_ota.lib_deps}
elims/PsychicMqttClient@^0.2.4
bblanchon/ArduinoJson @ 7.4.3
arduino-libraries/NTPClient
JChristensen/Timezone
paulstoffregen/Time@1.6.1
0neblock/SNMP_Agent
[env:Station_G3_ESP32_r2_room_server_observer_mqtt]
extends = Station_G3_ESP32_r2
board_build.partitions = default_16MB.csv ; standard 16MB partition table
extra_scripts =
${esp32_base.extra_scripts}
pre:scripts/generate_cert_bundle.py
board_ssl_cert_source = adafruit-full
board_build.embed_files = src/certs/x509_crt_bundle.bin
build_flags =
${Station_G3_ESP32_r2.build_flags}
-D ADVERT_NAME='"Station G3 ESP32 Room Observer"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
-D WITH_MQTT_BRIDGE=1
-D MAX_NEIGHBOURS=50
-D MQTT_MAX_PACKET_SIZE=1024
-D MQTT_DEBUG=1
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-D ESP32_CPU_FREQ=160
-D WITH_SNMP=1
build_src_filter = ${Station_G3_ESP32_r2.build_src_filter}
+<helpers/bridges/MQTTBridge.cpp>
+<helpers/MQTTMessageBuilder.cpp>
+<helpers/JWTHelper.cpp>
+<helpers/ui/SH1106Display.cpp>
+<helpers/SNMPAgent.cpp>
+<../examples/simple_room_server>
lib_deps =
${Station_G3_ESP32_r2.lib_deps}
${esp32_ota.lib_deps}
elims/PsychicMqttClient@^0.2.4
bblanchon/ArduinoJson @ 7.4.3
arduino-libraries/NTPClient
JChristensen/Timezone
paulstoffregen/Time@1.6.1
0neblock/SNMP_Agent