diff --git a/.github/workflows/pr-build-check.yml b/.github/workflows/pr-build-check.yml index cebf0cfe..fd031166 100644 --- a/.github/workflows/pr-build-check.yml +++ b/.github/workflows/pr-build-check.yml @@ -40,6 +40,11 @@ jobs: - PicoW_repeater # STM32 - wio-e5-mini_repeater + - LilyGo_T3_STM32_repeater + - LilyGo_T3_STM32_companion_radio_usb + - LilyGo_T3_STM32_repeater_ina219 + - LilyGo_T3_STM32_companion_radio_usb_ina219 + - nucleo_wl55jc_repeater # ESP32-C6 - LilyGo_Tlora_C6_repeater_ # LR1110 (nRF52) diff --git a/README.md b/README.md index 6d7ac157..3b63d029 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,7 @@ For developers: - Install [PlatformIO](https://docs.platformio.org) in [Visual Studio Code](https://code.visualstudio.com). - Clone and open the MeshCore repository in Visual Studio Code. +- For the LilyGO T3 STM32, see the [board build and flashing guide](./variants/lilygo_t3_stm32/README.md). - See the example applications you can modify and run: - [Companion Radio](./examples/companion_radio) - For use with an external chat app, over BLE, USB or Wi-Fi. - [KISS Modem](./examples/kiss_modem) - Serial KISS protocol bridge for host applications. ([protocol docs](./docs/kiss_modem_protocol.md)) diff --git a/boards/dfrobot_lorawan_esp32s3.json b/boards/dfrobot_lorawan_esp32s3.json new file mode 100644 index 00000000..62e6cfed --- /dev/null +++ b/boards/dfrobot_lorawan_esp32s3.json @@ -0,0 +1,39 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld" + }, + "core": "esp32", + "extra_flags": [ + "-D ARDUINO_USB_CDC_ON_BOOT=0", + "-D ARDUINO_USB_MSC_ON_BOOT=0", + "-D ARDUINO_USB_DFU_ON_BOOT=0", + "-D ARDUINO_USB_MODE=0", + "-D ARDUINO_RUNNING_CORE=1", + "-D ARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [["0x303A", "0x1001"]], + "mcu": "esp32s3", + "variant": "esp32s3" + }, + "connectivity": ["wifi", "bluetooth", "lora"], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": ["esp-builtin"], + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "DFRobot LoRaWAN ESP32-S3 (4 MB Flash, No PSRAM)", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 524288, + "maximum_size": 4194304, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.dfrobot.com", + "vendor": "DFRobot" +} diff --git a/boards/lilygo_t3_stm32.json b/boards/lilygo_t3_stm32.json new file mode 100644 index 00000000..3f323402 --- /dev/null +++ b/boards/lilygo_t3_stm32.json @@ -0,0 +1,32 @@ +{ + "build": { + "arduino": { + "variant_h": "variant_generic.h" + }, + "core": "stm32", + "cpu": "cortex-m4", + "extra_flags": "-DSTM32WL -DSTM32WLxx -DSTM32WL55xx", + "f_cpu": "48000000L", + "framework_extra_flags": { + "arduino": "-DUSE_CM4_STARTUP_FILE -DARDUINO_GENERIC_WL55CCUX" + }, + "mcu": "stm32wl55ccu6", + "product_line": "STM32WL55xx", + "variant": "STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U" + }, + "debug": { + "jlink_device": "STM32WL55CC", + "openocd_target": "stm32wlx", + "svd_path": "STM32WL5x_CM4.svd" + }, + "frameworks": ["arduino"], + "name": "LilyGO T3 STM32 V1.0 (STM32WL55CCU6)", + "upload": { + "maximum_ram_size": 65536, + "maximum_size": 262144, + "protocol": "serial", + "protocols": ["serial", "stlink", "jlink"] + }, + "url": "https://github.com/Xinyuan-LilyGO/T3-STM32", + "vendor": "LilyGO" +} diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 0afb1e8d..79ad3d5f 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -1116,9 +1116,16 @@ region save --- ### GPS (When GPS support is compiled in) -#### View or change GPS state +#### View GPS state **Usage:** - `gps` + +**Note:** Reports the requested state, receiver activity, last-fix status (last fix gives number of sats and how long ago was the fix), and mode. In periodic mode, `waiting` means the receiver is off between acquisitions; the last fix remains available. `off(hw)` means a hardware GPS switch is off. + +--- + +#### Change GPS state +**Usage:** - `gps ` **Parameters:** @@ -1126,20 +1133,43 @@ region save **Default:** `off` -**Note:** Output format: -- `off` when the GPS hardware is disabled -- `on, {active|deactivated}, {fix|no fix}, {sat count} sats` when the GPS hardware is enabled -- `duty, {awake|asleep}, {fix|no fix}, {sat count} sats` in duty-cycle mode +**Note:** In duty-cycle mode `gps` answers `duty, {awake|asleep}, {fix|no fix}, {sat count} sats`. `gps duty` powers the receiver only around a clock sync and cuts it in between. It is meant for a node that runs GPS purely to keep its (volatile) RTC set — a mast or solar repeater — where a receiver drawing tens of mA continuously -dwarfs the rest of the power budget. Clock accuracy is unchanged: the sync -cadence matches the periodic re-sync that `gps on` already does. The position -still comes from prefs (see `gps advert`), so duty mode does not affect what a -repeater advertises. Build-time knobs: `GPS_DUTY_SYNC_INTERVAL_SECS` (1800), -`GPS_DUTY_MAX_AWAKE_SECS` (300, the cap on one attempt) and -`GPS_DUTY_RETRY_SECS` (3600, backoff after a window with no fix). +dwarfs the rest of the power budget. Unlike `gps period`, every attempt is +capped even before the first fix ever, so a node that never sees the sky does +not keep the receiver powered. It sets `gps period` to 0. The position still +comes from prefs (see `set loc`), so duty mode does not affect what a repeater +advertises. `gps on` / `gps off` leave duty mode. Build-time knobs: +`GPS_DUTY_SYNC_INTERVAL_SECS` (1800), `GPS_DUTY_MAX_AWAKE_SECS` (300, the cap on +one attempt) and `GPS_DUTY_RETRY_SECS` (3600, backoff after a window with no fix). + +--- + +#### View or change the GPS acquisition period +**Usage:** +- `gps period` +- `gps period ` + +**Parameters:** +- `value`: `0` for continuous tracking, or a period. The value can be postfixed with `s`, `m`, `h` or `d` to specify the unit (seconds by default). + +**Note:** A periodic acquisition stops after receiving a valid fix, then resumes after the configured period. + +--- + +#### View the last GPS fix +**Usage:** +- `gps fix` + +**Output:** +- `> Fix (n sat): , `: the GPS currently has a fix. +- `> Last fix ago (n sat)[, acq