Commit Graph

9873 Commits

Author SHA1 Message Date
m1nl
94a560b678 do not detach button interrupt when going into light sleep 2025-07-20 21:54:43 +02:00
m1nl
47881d11a6 prevent zero-byte read from serial causing too frequent wakeups 2025-07-20 21:54:43 +02:00
m1nl
f22d2f46a1 fix logging 2025-07-20 21:54:43 +02:00
m1nl
774eb1a226 use framework with dynamic light sleep for heltec_wsl_v3 2025-07-20 21:54:43 +02:00
m1nl
a267a645eb set custom framework for heltec_vision_master_e213 2025-07-20 21:54:43 +02:00
m1nl
46f2a62186 improve logging 2025-07-20 21:54:43 +02:00
m1nl
6e41f46df2 allow light sleep when MQTT is enabled 2025-07-20 21:54:43 +02:00
m1nl
067f9558c2 make log entry more consistent 2025-07-20 21:54:43 +02:00
m1nl
759b3a09e8 add assertion for gpio_wakeup_enable calls 2025-07-20 21:54:43 +02:00
m1nl
850407beba enable custom arduino framework for xiao s3 and t-beam s3 2025-07-20 21:54:43 +02:00
m1nl
a0af522ceb revert change to Lock class 2025-07-20 21:54:43 +02:00
m1nl
be8a87c9b6 reference new arduino-esp32 release 2025-07-20 21:54:43 +02:00
m1nl
31c1d935f2 use events to stay in idle state 2025-07-20 21:54:43 +02:00
m1nl
1d2a5c0692 remove unnecessary lock 2025-07-20 21:54:43 +02:00
m1nl
802c2fa7ae move sleep wake timeout to PhoneAPI 2025-07-20 21:54:42 +02:00
m1nl
5745c4ecf2 switch heltec_v3 variant to esp-idf sdk with power management enabled 2025-07-20 21:54:42 +02:00
m1nl
2d5b9297e3 improve WiFi power saving configuration (stable in current sdk) 2025-07-20 21:54:42 +02:00
m1nl
f1c1808449 dynamically adjust measurement interval in power management 2025-07-20 21:54:42 +02:00
m1nl
5d956d6bdc prevent light sleep when modules are busy for more than one timer tick 2025-07-20 21:54:42 +02:00
m1nl
0b5030b436 ensure acquired SPI lock prevents light-sleep 2025-07-20 21:54:42 +02:00
m1nl
035dfaf602 refactor sleep and PowerFSM to allow dynamic light sleep 2025-07-20 21:54:42 +02:00
Ben Meadors
cf574c71d8 Fix build
Some checks failed
CI / build-esp32-c6 (push) Blocked by required conditions
CI / build-nrf52 (push) Blocked by required conditions
CI / build-rpi2040 (push) Blocked by required conditions
CI / build-stm32 (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker-deb-amd64 (push) Waiting to run
CI / docker-deb-amd64-tft (push) Waiting to run
CI / docker-alp-amd64 (push) Waiting to run
CI / docker-alp-amd64-tft (push) Waiting to run
CI / docker-deb-arm64 (push) Waiting to run
CI / docker-deb-armv7 (push) Waiting to run
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
CI / publish-firmware (push) Blocked by required conditions
Semgrep Full Scan / semgrep-full (push) Has been cancelled
2025-07-18 09:24:34 -05:00
Tom Fifield
abe0a34fc0
Add additional Epoch check for time set (#7375)
Some checks are pending
CI / build-esp32-c3 (push) Blocked by required conditions
CI / build-esp32-c6 (push) Blocked by required conditions
CI / build-nrf52 (push) Blocked by required conditions
CI / build-rpi2040 (push) Blocked by required conditions
CI / build-stm32 (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker-deb-amd64 (push) Waiting to run
CI / docker-deb-amd64-tft (push) Waiting to run
CI / docker-alp-amd64 (push) Waiting to run
CI / docker-alp-amd64-tft (push) Waiting to run
CI / docker-deb-arm64 (push) Waiting to run
CI / docker-deb-armv7 (push) Waiting to run
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
CI / publish-firmware (push) Blocked by required conditions
We have two perhapsSetRTC functions, which are called to set the time.

The one with 3 parameters had a helpful check to reject an invalid time,
by comparing the time from the source against when the firmware was compiled.
The one with 2 parameters, which is called from the GPS lookForTime did not.

As a result, certain GPS with bad time handling could set a time that was
in the past.

This patch adds the same epoch check code to the other perhapsSetRTC method.

Fixes https://github.com/meshtastic/firmware/issues/7364
2025-07-18 05:49:19 -05:00
Jason P
71b6508ad3
BaseUI Updates (#7358)
Some checks failed
CI / docker-alp-amd64 (push) Has been cancelled
CI / docker-alp-amd64-tft (push) Has been cancelled
CI / docker-deb-arm64 (push) Has been cancelled
CI / docker-deb-armv7 (push) Has been cancelled
CI / check (push) Has been cancelled
CI / build-esp32 (push) Has been cancelled
CI / build-esp32-s3 (push) Has been cancelled
CI / build-esp32-c3 (push) Has been cancelled
CI / build-esp32-c6 (push) Has been cancelled
CI / build-nrf52 (push) Has been cancelled
CI / build-rpi2040 (push) Has been cancelled
CI / build-stm32 (push) Has been cancelled
CI / gather-artifacts (esp32) (push) Has been cancelled
CI / gather-artifacts (esp32c3) (push) Has been cancelled
CI / gather-artifacts (esp32c6) (push) Has been cancelled
CI / gather-artifacts (esp32s3) (push) Has been cancelled
CI / gather-artifacts (nrf52840) (push) Has been cancelled
CI / gather-artifacts (rp2040) (push) Has been cancelled
CI / gather-artifacts (stm32) (push) Has been cancelled
CI / release-artifacts (push) Has been cancelled
CI / release-firmware (esp32) (push) Has been cancelled
CI / release-firmware (esp32c3) (push) Has been cancelled
CI / release-firmware (esp32c6) (push) Has been cancelled
CI / release-firmware (esp32s3) (push) Has been cancelled
CI / release-firmware (nrf52840) (push) Has been cancelled
CI / release-firmware (rp2040) (push) Has been cancelled
CI / release-firmware (stm32) (push) Has been cancelled
CI / publish-firmware (push) Has been cancelled
Nightly / Trunk Check and Upload (push) Has been cancelled
Nightly / Trunk Upgrade (PR) (push) Has been cancelled
* Calculate the length of the right string and use it

* Improve readability of Version Number

* Prevent negative message IDs and proactively favorite DM'd nodes

* Patch up Remove Favorite functionality

* Fix warnings for TFT_MESH_* and hasSupportBrightness

* Fix warning around casting variables

* Correct Favorite Node Behavior to rebuild favorite nodes when updated.

* Resolve bool kb_found issue not working for second discovery keyboards

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2025-07-16 19:44:23 -05:00
Thomas Göttgens
55fc4fcd90
clean up double i2c init/scan code (#7359) 2025-07-17 00:40:29 +02:00
Jonathan Bennett
c3b2b474c6
Drop NodeInfo packets if the is_licensed bit doesn't match owner (#7361) 2025-07-16 16:05:34 -05:00
Ben Meadors
39716ed1ba
Fix L1 EInk HWModel (#7346)
Some checks failed
CI / test-native (push) Waiting to run
CI / docker-deb-amd64 (push) Waiting to run
CI / docker-deb-amd64-tft (push) Waiting to run
CI / docker-alp-amd64 (push) Waiting to run
CI / docker-alp-amd64-tft (push) Waiting to run
CI / docker-deb-arm64 (push) Waiting to run
CI / docker-deb-armv7 (push) Waiting to run
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
CI / publish-firmware (push) Blocked by required conditions
Daily Packaging / docker-multiarch (push) Has been cancelled
Daily Packaging / package-ppa (jammy) (push) Has been cancelled
Daily Packaging / package-ppa (noble) (push) Has been cancelled
Daily Packaging / package-ppa (plucky) (push) Has been cancelled
Daily Packaging / package-ppa (questing) (push) Has been cancelled
Daily Packaging / package-obs (push) Has been cancelled
Daily Packaging / hook-copr (push) Has been cancelled
2025-07-14 21:14:07 -05:00
Jason P
625a529f6c
Message frame New Message Options and Clock / TDeck / Brightness Refinements (#7344)
* Clock updates and some TDeck corrections

* TDeck Brightness Works in TFT Builds

* Remove HAS_TFT from enabling Brightness, disable Brightness for TDeck

* Add default textMessage frame actions and adjust SharedUIDisplay

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-07-14 20:59:22 -05:00
Ben Meadors
31d56c16d5
Map report should work over devices which do not have network hardware (with client proxy) (#7341)
* Map report should work over devices which do not have network hardware (with client proxy)

* Fix else
2025-07-14 20:13:34 -05:00
Austin
5776385e8c
STM32 PlatformIO cleanup (#7339) 2025-07-14 12:52:21 -05:00
github-actions[bot]
8f10de5684
[create-pull-request] automated change (#7338)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2025-07-14 09:46:43 -05:00
Daniel.Cao
e864fcf9a8
feat: add support for RAK Wismesh Tag hardware platform (#6853)
* add new platform rak_wismeshtag
* Remove RTC and Ethernet definitions from variant.h
* Remove unused EINK and Ethernet definitions from variant.h and platformio.ini
* Add WISMESH_TAG hardware model definition in architecture.h and update build flags in platformio.ini
* Remove unused build flags and dependencies
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: daniel <daniel.cao@rakwireless.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2025-07-14 16:29:42 +02:00
Ben Meadors
86af5f5252 Trunk 2025-07-14 05:44:29 -05:00
Quency-D
daa1d582cb
The screen display of the heltec wireless tracker is abnormal. (#7337)
The screen of the heltec wireless tracker uses the same power source as the GPS. If the GPS turns off the power during the screen shutdown period and then turns on the power, the screen will not function properly. So initialize the screen every time it starts.
2025-07-14 05:43:25 -05:00
github-actions[bot]
f197f0e5ec
Upgrade trunk (#7336)
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
2025-07-14 05:12:52 -05:00
Chloe Bethel
3599ca6845
Add heap info via standard mallinfo() function for STM32 (#7327)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-07-14 05:12:38 -05:00
Chloe Bethel
1be4fc5ae9
GPS for STM32WL (#7297)
* Enable GPS for Wio-E5 variant on Serial2

* Add ability to override GPS serial port using GPS_SERIAL_PORT, and make RAK2560 use it.

* Don't try to send ATAK packets if ATAK is disabled, +4k flash
2025-07-14 05:12:26 -05:00
Thomas Göttgens
ac3e5684d6
get git url part from local repo (#7331) 2025-07-14 05:11:26 -05:00
Austin
29cca4d621
Revert "Actions: Move all Linux packaging into subdir (#7332)" (#7334)
This reverts commit f3ff80963a.
2025-07-13 20:54:52 -04:00
Austin
f3ff80963a
Actions: Move all Linux packaging into subdir (#7332) 2025-07-13 20:48:17 -04:00
Austin
45e428eb25
PPA: Add Ubuntu Questing (25.10) to daily builds (#7329) 2025-07-13 16:22:42 -04:00
Thomas Göttgens
16d2650236
add pioenv to version string in debug log (#7328) 2025-07-13 19:16:14 +02:00
TSAO
2ecbf704d0
Improve OLED UI Responsiveness and Force Redraws for Canned message module (#7324)
* No delay between UI frame rendering for OLED

* force redraw the display

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
2025-07-13 08:28:05 -05:00
Styne13
5e28ee6d1e
NodeDB.cpp: Fix iOS bluetooth crash by ensuring UINT32_MAX is not used (#7312)
Signed-off-by: Marcel <6253936+Styne13@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-07-13 06:26:35 -05:00
Neil Hanlon
622023de8b
fix(device-update.sh): safely filter args without breaking parsing (#7305)
The previous method of removing `--change-mode` from the argument list used a
string (`NEW_ARGS`) and `eval set -- $NEW_ARGS` to reconstruct the positional
parameters. This was both unsafe and incorrect.

Because `NEW_ARGS` was built using quoted literal `$arg` strings instead of the
actual values, it resulted in all filtered arguments being set to the same last
value of `$arg`. This caused `getopts` to receive incorrect input and silently
fail to parse options like `-p` and `-f`, leading to broken behavior and unset
variables (e.g., `ESPTOOL_CMD` never got a port).

This patch rewrites the logic to use an array (`NEW_ARGS+=("$arg")`), and
resets positional parameters via `set -- "${NEW_ARGS[@]}"`. This preserves
argument integrity and avoids the unsafe use of `eval`.

Example of the broken behavior before this fix:

  ./device-update.sh -p /dev/ttyACM0 -f firmware.bin

Resulted in:

  set -- firmware.bin firmware.bin firmware.bin firmware.bin

Now:

  set -- -p /dev/ttyACM0 -f firmware.bin

as expected.

Signed-off-by: Neil Hanlon <neil@shrug.pw>
2025-07-13 06:19:58 -05:00
Andrew Yong
b49e59b904
xiao_ble README.md updates (#7283)
* docs(xiao_ble): Simplify building and flashing instructions

- **Update Bootloader** - deleted this section, as Meshtastic now builds-in a compatible SoftDevice
- **PlatformIO Environment Preparation** - deleted this section, as Meshtastic now builds-in a compatible SoftDevice
- **Build Meshtastic** - simplified it greatly by referring to Meshtastic documentation
- **Flash the firmware to the Xiao BLE** - simplified it greatly as Meshtastic now builds firmware.uf2; added some observations for a succesful flash

Light cleanup of Markdown and renumbering of sections.

Signed-off-by: Andrew Yong <me@ndoo.sg>

* docs(xiao_ble): Replace some HTML with Markdown, cleanup Markdown

Signed-off-by: Andrew Yong <me@ndoo.sg>

* docs(xiao_ble): Update SX126X_TXEN definition location

Signed-off-by: Andrew Yong <me@ndoo.sg>

* docs(xiao_ble): Fresher information about E22 modules

Signed-off-by: Andrew Yong <me@ndoo.sg>

* docs(xiao_ble): Instructions for E22...M33S modules

Also re-order the Build section to come after the Wiring section since the build instructions require special attention if the wiring/modules differ from the variant's expected pins/module.

Signed-off-by: Andrew Yong <me@ndoo.sg>

* docs(xiao_ble): Rename all XIAO BLE to XIAO nRF52840

Signed-off-by: Andrew Yong <me@ndoo.sg>

* docs(xiao_ble): Remove note about Linux since shell script is gone

Signed-off-by: Andrew Yong <me@ndoo.sg>

* docs(xiao_ble): trunk fmt and fix links

Signed-off-by: Andrew Yong <me@ndoo.sg>

---------

Signed-off-by: Andrew Yong <me@ndoo.sg>
2025-07-13 06:17:50 -05:00
Andrew Yong
0133c5dc9e
feat: New variant esp32c3_super_mini (#7133)
https://www.espboards.dev/esp32/esp32-c3-super-mini/

DIY build by @AntonKartajaya on Meshtastic Discord and a PCB version WIP by https://github.com/NomDeTom.

- I2C
  - I2C_SDA: 1
  - I2C_SCL: 0
  - OLED: SSD1306
- GPS
  - GPS_RX_PIN: 20
  - GPS_TX_PIN: 21
- Button
  - BUTTON_PIN: 9
- SPI
  - SCK: 10
  - MISO: 6
  - MOSI: 7
  - CS: 8
- LoRa: SX1262
  - LORA_RESET: 5
  - LORA_DIO1: 3
  - LORA_RXEN: 2
  - LORA_BUSY: 4

Signed-off-by: Andrew Yong <me@ndoo.sg>
2025-07-13 06:12:24 -05:00
Andrew Yong
fd414ed149
feat: DIY Seeed XIAO nRF52840 + EBYTE E22 variants, pin-compatible with Wio-SX1262 kit (#7105)
These DIY builds are functionally similar to the legacy xiao_ble variant, but use a pinout harmonized with the officially-supported XIAO nRF52840 & Wio-SX1262 Kit for Meshtastic (SKU 102010710).

An additional E22-900M33S variant is provided to ensure SX1262 transmit power is set below the maximum PA input for that module, to avoid damaging it.

- seeed_xiao_nrf52840_e22_900m30s:
  - XIAO nRF52840 + EBYTE E22-900M30S
  - EBYTE E22 pinout matching Wio-SX1262 (SKU 113010003)
  - I2C
    - SDA: D6
    - SCL: D7
  - User button: D0
  - Gain is programmed in firmware - user Tx power setting is the desired final output power
- seeed_xiao_nrf52840_e22_900m33s:
  - XIAO nRF52840 + EBYTE E22-900M33S
  - EBYTE E22 pinout matching Wio-SX1262 (SKU 113010003)
  - I2C
    - SDA: D6
    - SCL: D7
  - User button: D0
  - Gain is programmed in firmware - user Tx power setting is the desired final output power

Signed-off-by: Andrew Yong <me@ndoo.sg>
2025-07-13 15:58:01 +08:00
Austin
77768e9023
Remove Ubuntu oracular (#7322) 2025-07-13 12:39:20 +08:00
Austin
86be2ac12f
userPrefs: Set default ringtone nag time (#7314) 2025-07-12 16:26:25 -05:00