186 lines
6.3 KiB
INI
186 lines
6.3 KiB
INI
; PlatformIO Project Configuration File
|
|
; ESP32 Debug Dongle - Web Serial Terminal with Bluetooth
|
|
;
|
|
; Build and upload:
|
|
; pio run -t upload
|
|
;
|
|
; Upload filesystem (LittleFS with web files):
|
|
; pio run -t uploadfs
|
|
;
|
|
; Monitor serial output:
|
|
; pio device monitor
|
|
|
|
[env:esp32dev]
|
|
platform = espressif32
|
|
board = esp32dev
|
|
framework = arduino
|
|
monitor_speed = 115200
|
|
monitor_filters = esp32_exception_decoder
|
|
|
|
board_build.filesystem = littlefs
|
|
|
|
; Use a larger app partition (pick ONE):
|
|
board_build.partitions = huge_app.csv ; 3MB app, 1MB FS, no OTA
|
|
; board_build.partitions = no_ota.csv ; 2MB app, 2MB FS, no OTA
|
|
; board_build.partitions = min_spiffs.csv ; 1.9MB app + OTA, 190KB FS
|
|
|
|
build_flags =
|
|
-DCORE_DEBUG_LEVEL=3
|
|
-DCONFIG_BT_ENABLED=1
|
|
-DCONFIG_BLUEDROID_ENABLED=1
|
|
-DHAS_BT_CLASSIC=1 ; classic SPP exists on the original ESP32
|
|
-DSTA_SSID="${sysenv.STA_SSID}"
|
|
-DSTA_PASSWORD="${sysenv.STA_PASSWORD}"
|
|
|
|
; Libraries
|
|
lib_deps =
|
|
; Async Web Server and dependencies
|
|
https://github.com/ESP32Async/ESPAsyncWebServer
|
|
https://github.com/ESP32Async/AsyncTCP
|
|
|
|
; ArduinoJson for configuration/commands
|
|
ArduinoJson
|
|
|
|
; Upload settings (adjust port as needed)
|
|
; upload_port = /dev/ttyUSB0
|
|
; upload_speed = 921600
|
|
|
|
; Extra scripts for LittleFS
|
|
extra_scripts =
|
|
pre:scripts/download_xterm.py
|
|
|
|
; ============================================================================
|
|
; LilyGo T3-S3 -- ESP32-S3 + SX127x LoRa + SSD1306 128x64 OLED + microSD.
|
|
; The remote debug bridge: UART <-> telnet(:23)/WebSocket, GPIO reset/wake,
|
|
; SD logging (NTP-dated), OLED status. NOTE: ESP32-S3 has NO Bluetooth Classic,
|
|
; so HAS_BT_CLASSIC is NOT set here (telnet + WebSocket replace SerialBT).
|
|
; Pins marked CONFIRM must be checked against your actual board wiring.
|
|
; ============================================================================
|
|
[env:t3s3]
|
|
platform = espressif32
|
|
board = esp32-s3-devkitc-1
|
|
framework = arduino
|
|
monitor_speed = 115200
|
|
monitor_filters = esp32_exception_decoder
|
|
board_build.mcu = esp32s3
|
|
board_build.flash_size = 4MB
|
|
board_upload.flash_size = 4MB
|
|
board_build.filesystem = littlefs
|
|
board_build.partitions = huge_app.csv
|
|
build_flags =
|
|
-DCORE_DEBUG_LEVEL=3
|
|
-DARDUINO_USB_CDC_ON_BOOT=1 ; console on USB CDC -> frees UART0 (43/44)
|
|
;-DSTA_SSID="${sysenv.STA_SSID}"
|
|
;-DSTA_PASSWORD="${sysenv.STA_PASSWORD}"
|
|
-DSTA_SSID="MeridenRainbow5G"
|
|
-DSTA_PASSWORD="4z8bcw5vfrs3n7dm"
|
|
-DBOARD_T3S3=1
|
|
; --- OLED (SSD1306 128x64) ---
|
|
-DT3S3_OLED_SDA=18
|
|
-DT3S3_OLED_SCL=17
|
|
-DT3S3_OLED_RST=21
|
|
-DT3S3_OLED_ADDR=0x3C
|
|
; --- target UART bridge (wire to the sensor's debug UART) ---
|
|
-DTARGET_RX_PIN=44 ; CONFIRM: dongle RX <- sensor TX
|
|
-DTARGET_TX_PIN=43 ; CONFIRM: dongle TX -> sensor RX
|
|
; --- GPIO control lines to the target (reset out / button out) ---
|
|
; GPIO38 + GPIO39 are free pins on the T3-S3 RIGHT header, right next to the
|
|
; UART pins TXD=43/RXD=44 -- so reset/button/TX/RX/GND all come off one row.
|
|
; (GPIO2=SD MISO and GPIO1=battery ADC; GPIO4/12 are not broken out at all.)
|
|
-DGPIO_RESET_PIN=38 ; -> sensor RST (active-low pulse)
|
|
-DGPIO_WAKE_PIN=39 ; -> sensor button/wake (active-low pulse)
|
|
-DGPIO_CTRL_ACTIVE_LOW=1
|
|
; --- microSD on FSPI/SPI2 (separate bus from LoRa, which uses HSPI/SPI3) ---
|
|
-DT3S3_SD_SCK=14
|
|
-DT3S3_SD_MISO=2
|
|
-DT3S3_SD_MOSI=11
|
|
-DT3S3_SD_CS=13
|
|
-DT3S3_SD_FREQ_HZ=20000000UL
|
|
; --- timezone for NTP-dated logs (Australia/Victoria) ---
|
|
-DNTP_TZ='"AEST-10AEDT,M10.1.0,M4.1.0/3"'
|
|
lib_deps =
|
|
https://github.com/ESP32Async/ESPAsyncWebServer
|
|
https://github.com/ESP32Async/AsyncTCP
|
|
ArduinoJson
|
|
adafruit/Adafruit SSD1306
|
|
adafruit/Adafruit GFX Library
|
|
extra_scripts =
|
|
pre:scripts/download_xterm.py
|
|
|
|
; ============================================================================
|
|
; LilyGo T3-S3 + MeshCore radio. Extends env:t3s3 (OLED + SD logging) and
|
|
; adds the SX1276 LoRa link so the web "MeshCore" panel and telnet ~psk/~msg
|
|
; commands work. Builds on the same hardware; pins match MeshCore's
|
|
; experiment/lilygot3s3logger (the proven T3-S3 SX1276 reference).
|
|
;
|
|
; pio run -e t3s3_mesh -t upload && pio run -e t3s3_mesh -t uploadfs
|
|
; ============================================================================
|
|
[env:t3s3_mesh]
|
|
extends = env:t3s3
|
|
; ed25519 (MeshCore's bundled identity crypto) lives in MeshCore/lib.
|
|
lib_extra_dirs =
|
|
/home/scottp/github/MeshCore/lib
|
|
lib_ldf_mode = deep+
|
|
build_unflags =
|
|
-DBOARD_HAS_PSRAM
|
|
lib_deps =
|
|
${env:t3s3.lib_deps}
|
|
symlink:///home/scottp/github/MeshCore
|
|
jgromes/RadioLib @ ^7.6.0
|
|
rweather/Crypto @ ^0.4.0
|
|
adafruit/RTClib @ ^2.1.3
|
|
densaugeo/base64 @ ~1.4.0
|
|
Preferences
|
|
ed25519
|
|
build_flags =
|
|
${env:t3s3.build_flags}
|
|
-w
|
|
-DUSE_MESHCORE=1
|
|
-D ESP32_PLATFORM
|
|
; --- pin 21 is the SX1276 RX-enable on the T3-S3, so the OLED can't use it
|
|
; as a reset line here; SSD1306 over I2C runs fine with no reset pin. ---
|
|
-DT3S3_OLED_RST=-1
|
|
; --- RadioLib: lock to the SX127x family ---
|
|
-D RADIOLIB_STATIC_ONLY=1
|
|
-D RADIOLIB_GODMODE=1
|
|
-D RADIOLIB_EXCLUDE_CC1101=1
|
|
-D RADIOLIB_EXCLUDE_RF69=1
|
|
-D RADIOLIB_EXCLUDE_SX1231=1
|
|
-D RADIOLIB_EXCLUDE_SI443X=1
|
|
-D RADIOLIB_EXCLUDE_RFM2X=1
|
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
|
-D RADIOLIB_EXCLUDE_AFSK=1
|
|
-D RADIOLIB_EXCLUDE_AX25=1
|
|
-D RADIOLIB_EXCLUDE_HELLSCHREIBER=1
|
|
-D RADIOLIB_EXCLUDE_MORSE=1
|
|
-D RADIOLIB_EXCLUDE_APRS=1
|
|
-D RADIOLIB_EXCLUDE_BELL=1
|
|
-D RADIOLIB_EXCLUDE_RTTY=1
|
|
-D RADIOLIB_EXCLUDE_SSTV=1
|
|
; --- T3-S3 v1.2 SX1276 pin map (MeshCore variants/lilygo_t3s3_sx1276) ---
|
|
-D USE_SX1276
|
|
-D P_LORA_NSS=7
|
|
-D P_LORA_RESET=8
|
|
-D P_LORA_DIO_0=9
|
|
-D P_LORA_DIO_1=33
|
|
-D P_LORA_SCLK=5
|
|
-D P_LORA_MISO=3
|
|
-D P_LORA_MOSI=6
|
|
-D P_LORA_TX_LED=37
|
|
-D SX127X_CURRENT_LIMIT=120
|
|
-D SX176X_RXEN=21
|
|
-D SX176X_TXEN=10
|
|
; --- LoRa PHY: Australia Narrow (match the sensor fleet) ---
|
|
-D LORA_FREQ=916.575
|
|
-D LORA_BW=62.5
|
|
-D LORA_SF=7
|
|
-D LORA_CR=8
|
|
-D LORA_TX_POWER=20
|
|
-D MAX_GROUP_CHANNELS=4
|
|
-D MAX_CONTACTS=8
|
|
; --- channel defaults (runtime-overridable + persisted in NVS) ---
|
|
-D NODE_NAME='"dongle"'
|
|
-D SENSORS_CHANNEL_NAME='"SensorsTest"'
|
|
-D SENSORS_CHANNEL_PSK_B64='"PNtgMxiq9R7eQ3IleHoL3g=="'
|
|
-D PUBLIC_CHANNEL_PSK_B64='"izOH6cXN6mrJ5e26oRXNcg=="'
|