Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Daniel Peter Chokola <dan.chokola@gmail.com>
Co-authored-by: Mark Trevor Birss <markbirss@gmail.com>
Co-authored-by: Austin <vidplace7@gmail.com>
The Range Test Module was defined-out by architecture.
No reason it shouldn't work, so add PORTDUINO to the list of
architectures that compile this module.
Tested on Ubuntu. Enables without crashing, will send packets on
the set time. However, for now the CSV file download does not appear
to work.
Partially fixes https://github.com/meshtastic/firmware/issues/5618
* Add UDP multicast support on linux.
Closes#6326
We tested it an it works.
This is really hacky to say the least.
* Add libuv to Linux packaging
* Trunkadunk
* Correct ref
* Add libuv1-dev to setup-native
---------
Co-authored-by: vidplace7 <vidplace7@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Since 96ba94843b we don't spray packets to all machines on the network.
So we can allow ourself to raise the TTL limit, this allows users who run L3 IGMP Routing infrastructure to pass meshtastic frames over UDP.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
The packet.readBytes API is not available on all targets:
- RP2040 & RP2340
- yet to be written portduino API
Instead pass the data buffer as-is.
It also removes a memcpy which do not need to exists.
I've tested it successfully on a tbeam.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
A smart router or switch is able to snoop the multicast address to
only send the packets to nodes listening on the multicast address.
Before all machines reachable on the L2 layer would receive the packet.
When we receive a NodeInfo from a new node, if it is more than 2 hops
beyond our configured hop limit away from us, don't bother to send a
NodeInfo back to it.
In my dense urban environment, I see many nodes that are >= 5 hops away,
but sending their NodeInfo with a hopStart of 6 or 7. In most cases
I can imagine, this seems like a waste of airtime.
* Add detection support for LTR390UV Sensor
The LTR390 is a UV sensor. This patch adds detection support, for
a future patch that will add the full sensor support.
* Update ScanI2C.h
* chore: todo.txt
* chore: comments
* fix: no fast refresh on VME290
Reverts a line of code which was accidentally committed
* refactor: god class
Divide the behavior from the old WindowManager class into several subclasses which each have a clear role.
* refactor: cppcheck medium warnings
Enough to pass github CI for now
* refactor: updateType selection
* refactor: don't use a setter for the shared AppletFonts
* fix: update prioritization
forceUpdate calls weren't being prioritized
* refactor: remove unhelpful logging
getTimeString is used for parsing our own time, but also the timestamps of messages. The "one time only" log printing will likely fire in unhelpful situations.
* fix: " "
* refactor: get rid of types.h file for enums
* Keep that sneaky todo file out of commits
* dps310: initial scan support
* dps310 sensor support
* new protobufs
* new protobufs
* address cr
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
In the GPS probe code we write commands on the serial line and
determine which GPS we have based on the result.
GPS units in the same family sometimes use the same command,
but return different results (eg AG3335 and AG3332 both use $PAIR021*39).
Currently we run the command once per GPS. Instead we should run each
command only once per family, record the result, and select the GNSS MODEL
based on the result, which is what this patch does.
Before the change, we put 12 commands on the serial bus.
Now we only put 6.
This should markedly improve the speed and reliability of GPS detection.
Fixes https://github.com/meshtastic/firmware/issues/5193
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* 2.6 protos
* [create-pull-request] automated change (#5789)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Hello world support for UDP broadcasts over the LAN on ESP32 (#5779)
* UDP local area network meshing on ESP32
* Logs
* Comment
* Update UdpMulticastThread.h
* Changes
* Only use router->send
* Make NodeDatabase (and file) independent of DeviceState (#5813)
* Make NodeDatabase (and file) independent of DeviceState
* 70
* Remove logging statement no longer needed
* Explicitly set CAD symbols, improve slot time calculation and adjust CW size accordingly (#5772)
* File system persistence fixes
* [create-pull-request] automated change (#6000)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Update ref
* Back to 80
* [create-pull-request] automated change (#6002)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* 2.6 <- Next hop router (#6005)
* Initial version of NextHopRouter
* Set original hop limit in header flags
* Short-circuit to FloodingRouter for broadcasts
* If packet traveled 1 hop, set `relay_node` as `next_hop` for the original transmitter
* Set last byte to 0xFF if it ended at 0x00
As per an idea of @S5NC
* Also update next-hop based on received DM for us
* temp
* Add 1 retransmission for intermediate hops when using NextHopRouter
* Add next_hop and relayed_by in PacketHistory for setting next-hop and handle flooding fallback
* Update protos, store multiple relayers
* Remove next-hop update logic from NeighborInfoModule
* Fix retransmissions
* Improve ACKs for repeated packets and responses
* Stop retransmission even if there's not relay node
* Revert perhapsRebroadcast()
* Remove relayer if we cancel a transmission
* Better checking for fallback to flooding
* Fix newlines in traceroute print logs
* Stop retransmission for original packet
* Use relayID
* Also when want_ack is set, we should try to retransmit
* Fix cppcheck error
* Fix 'router' not in scope error
* Fix another cppcheck error
* Check for hop_limit and also update next hop when `hop_start == hop_limit` on ACK
Also check for broadcast in `getNextHop()`
* Formatting and correct NUM_RETRANSMISSIONS
* Update protos
* Start retransmissions in NextHopRouter if ReliableRouter didn't do it
* Handle repeated/fallback to flooding packets properly
First check if it's not still in the TxQueue
* Guard against clients setting `next_hop`/`relay_node`
* Don't cancel relay if we were the assigned next-hop
* Replies (e.g. tapback emoji) are also a valid confirmation of receipt
---------
Co-authored-by: GUVWAF <thijs@havinga.eu>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
* fix "native" compiler errors/warnings NodeDB.h
* fancy T-Deck / SenseCAP Indicator / unPhone / PICOmputer-S3 TFT screen (#3259)
* lib update: light theme
* fix merge issue
* lib update: home buttons + button try-fix
* lib update: icon color fix
* lib update: fix instability/crash on notification
* update lib: timezone
* timezone label
* lib update: fix set owner
* fix spiLock in RadioLibInterface
* add picomputer tft build
* picomputer build
* fix compiler error std::find()
* fix merge
* lib update: theme runtime config
* lib update: packet logger + T-Deck Plus
* lib update: mesh detector
* lib update: fix brightness & trackball crash
* try-fix less paranoia
* sensecap indicator updates
* lib update: indicator fix
* lib update: statistic & some fixes
* lib-update: other T-Deck touch driver
* use custom touch driver for Indicator
* lower tft task prio
* prepare LVGL ST7789 driver
* lib update: try-fix audio
* Drop received packets from self
* Additional decoded packet ignores
* Honor flip & color for Heltec T114 and T190 (#4786)
* Honor TFT_MESH color if defined for Heltec T114 or T190
* Temporary: point lib_deps at fork of Heltec's ST7789 library
For demo only, until ST7789 is merged
* Update lib_deps; tidy preprocessor logic
* Download debian files after firmware zip
* set title for protobufs bump PR (#4792)
* set title for version bump PR (#4791)
* Enable Dependabot
* chore: trunk fmt
* fix dependabot syntax (#4795)
* fix dependabot syntax
* Update dependabot.yml
* Update dependabot.yml
* Bump peter-evans/create-pull-request from 6 to 7 in /.github/workflows (#4797)
* Bump docker/build-push-action from 5 to 6 in /.github/workflows (#4800)
* Actions: Semgrep Images have moved from returntocorp to semgrep (#4774)
https://hub.docker.com/r/returntocorp/semgrep notes: "We've moved!
Official Docker images for Semgrep now available at semgrep/semgrep."
Patch updates our CI workflow for these images.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Bump meshtestic from `31ee3d9` to `37245b3` (#4799)
Bumps [meshtestic](https://github.com/meshtastic/meshTestic) from `31ee3d9` to `37245b3`.
- [Commits](31ee3d90c8...37245b3d61)
---
updated-dependencies:
- dependency-name: meshtestic
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [create-pull-request] automated change (#4789)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Bump pnpm/action-setup from 2 to 4 in /.github/workflows (#4798)
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 2 to 4.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v2...v4)
---
updated-dependencies:
- dependency-name: pnpm/action-setup
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Raspberry Pico2 - needs protos
* Re-order doDeepSleep (#4802)
Make sure PMU sleep takes place before I2C ends
* [create-pull-request] automated change
* heltec-wireless-bridge
requires Proto PR first
* feat: trigger class update when protobufs are changed
* meshtastic/ is a test suite; protobufs/ contains protobufs;
* Update platform-native to pick up portduino crash fix (#4807)
* Hopefully extract and commit to meshtastic.github.io
* CI fixes
* [Board] DIY "t-energy-s3_e22" (#4782)
* New variant "t-energy-s3_e22"
- Lilygo T-Energy-S3
- NanoVHF "Mesh-v1.06-TTGO-T18" board
- Ebyte E22 Series
* add board_level = extra
* Update variant.h
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Consolidate variant build steps (#4806)
* poc: consolidate variant build steps
* use build-variant action
* only checkout once and clean up after run
* Revert "Consolidate variant build steps (#4806)" (#4816)
This reverts commit 9f8d86cb25.
* Make Ublox code more readable (#4727)
* Simplify Ublox code
Ublox comes in a myriad of versions and settings. Presently our
configuration code does a lot of branching based on versions being
or not being present.
This patch adds version detection earlier in the piece and branches
on the set gnssModel instead to create separate setup methods for Ublox 6,
Ublox 7/8/9, and Ublox10.
Additionally, adds a macro to make the code much shorter and more
readable.
* Make trunk happy
* Make trunk happy
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Consider the LoRa header when checking packet length
* Minor fix (#4666)
* Minor fixes
It turns out setting a map value with the index notation causes
an lookup that can be avoided with emplace. Apply this to one line in
the StoreForward module.
Fix also Cppcheck-determined highly minor performance increase by
passing gpiochipname as a const reference :)
The amount of cycles used on this laptop while learning about these
callouts from cppcheck is unlikely to ever be more than the cycles
saved by the fixes ;)
* Update PortduinoGlue.cpp
* Revert "Update classes on protobufs update" (#4824)
* Revert "Update classes on protobufs update"
* remove quotes to fix trunk.
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Implement optional second I2C bus for NRF52840
Enabled at compile-time if WIRE_INFERFACES_COUNT defined as 2
* Add I2C bus to Heltec T114 header pins
SDA: P0.13
SCL: P0.16
Uses bus 1, leaving bus 0 routed to the unpopulated footprint for the RTC (general future-proofing)
* Tidier macros
* Swap SDA and SCL
SDA=P0.16, SCL=P0.13
* Refactor and consolidate time window logic (#4826)
* Refactor and consolidate windowing logic
* Trunk
* Fixes
* More
* Fix braces and remove unused now variables.
There was a brace in src/mesh/RadioLibInterface.cpp that was breaking
compile on some architectures.
Additionally, there were some brace errors in
src/modules/Telemetry/AirQualityTelemetry.cpp
src/modules/Telemetry/EnvironmentTelemetry.cpp
src/mesh/wifi/WiFiAPClient.cpp
Move throttle include in WifiAPClient.cpp to top.
Add Default.h to sleep.cpp
rest of files just remove unused now variables.
* Remove a couple more meows
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Rename message length headers and set payload max to 255 (#4827)
* Rename message length headers and set payload max to 255
* Add MESHTASTIC_PKC_OVERHEAD
* compare to MESHTASTIC_HEADER_LENGTH
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* Check for null before printing debug (#4835)
* fix merge
* try-fix crash
* lib update: fix neighbors
* fix GPIO0 mode after I2S audio
* lib update: audio fix
* lib update: fixes and improvements
* extra
* added ILI9342 (from master)
* device-ui persistency
* review update
* fix request, add handled
* fix merge issue
* fix merge issue
* remove newline
* remove newlines from debug log
* playing with locks; but needs more testing
* diy mesh-tab initial files
* board definition for mesh-tab (not yet used)
* use DISPLAY_SET_RESOLUTION to avoid hw dependency in code
* no telemetry for Indicator
* 16MB partition for Indicator
* 8MB partition for Indicator
* stability: add SPI lock before saving via littleFS
* dummy for config transfer (#5154)
* update indicator (due to compile and linker errors)
* remove faulty partition line
* fix missing include
* update indicator board
* update mesh-tab ILI9143 TFT
* fix naming
* mesh-tab targets
* try: disable duplicate locks
* fix nodeDB erase loop when free mem returns invalid value (0, -1).
* upgrade toolchain for nrf52 to gcc 9.3.1
* try-fix (workaround) T-Deck audio crash
* update mesh-tab tft configs
* set T-Deck audio to unused 48 (mem mclk)
* swap mclk to gpio 21
* update meshtab voltage divider
* update mesh-tab ini
* Fixed the issue that indicator device uploads via rp2040 serial port in some cases.
* Fixed the issue that the touch I2C address definition was not effective.
* Fixed the issue that the wifi configuration saved to RAM did not take effect.
* rotation fix; added ST7789 3.2" display
* dreamcatcher: assign GPIO44 to audio mclk
* mesh-tab touch updates
* add mesh-tab powersave as default
* fix DIO1 wakeup
* mesh-tab: enable alert message menu
* Streamline board definitions for first tech preview. (#5390)
* Streamline board definitions for first tech preview. TBD: Indicator Support
* add point-of-checkin
* use board/unphone.json
---------
Co-authored-by: mverch67 <manuel.verch@gmx.de>
* fix native targets
* add RadioLib debugging options for (T-Deck)
* fix T-Deck build
* fix native tft targets for rpi
* remove wrong debug defines
* t-deck-tft button is handled in device-ui
* disable default lightsleep for indicator
* Windows Support - Trunk and Platformio (#5397)
* Add support for GPG
* Add usb device support
* Add trunk.io to devcontainer
* Trunk things
* trunk fmt
* formatting
* fix trivy/DS002, checkov/CKV_DOCKER_3
* hide docker extension popup
* fix trivy/DS026, checkov/CKV_DOCKER_2
* fix radioLib warnings for T-Deck target
* wake screen with button only
* use custom touch driver
* define wake button for unphone
* use board definition for mesh-tab
* mesh-tab rotation upside-down
* update platform native
* use MESH_TAB hardware model definition
* radioLib update (fix crash/assert)
* reference seeed indicator fix commit arduino-esp32
* Remove unneeded file change :)
* disable serial module and tcp socket api for standalone devices (#5591)
* disable serial module and tcp socket api for standalone devices
* just disable webserver, leave wifi available
* disable socket api
* mesh-tab: lower I2C touch frequency
* log error when packet queue is full
* add more locking for shared SPI devices (#5595)
* add more locking for shared SPI devices
* call initSPI before the lock is used
* remove old one
* don't double lock
* Add missing unlock
* More missing unlocks
* Add locks to SafeFile, remove from `readcb`, introduce some LockGuards
* fix lock in setupSDCard()
* pull radiolib trunk with SPI-CS fixes
* change ContentHandler to Constructor type locks, where applicable
---------
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: GUVWAF <thijs@havinga.eu>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
* T-Deck: revert back to lovyanGFX touch driver
* T-Deck: increase allocated PSRAM by 50%
* mesh-tab: streamline target definitions
* update RadioLib 7.1.2
* mesh-tab: fix touch rotation 4.0 inch display
* Mesh-Tab platformio: 4.0inch: increase SPI frequency to max
* mesh-tab: fix rotation for 3.5 IPS capacitive display
* mesh-tab: fix rotation for 3.2 IPS capacitive display
* restructure device-ui library into sub-directories
* preparations for generic DisplayDriverFactory
* T-Deck: increase LVGL memory size
* update lib
* trunk fmt
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: Jason Murray <15822260+scruplelesswizard@users.noreply.github.com>
Co-authored-by: Jason Murray <jason@chaosaffe.io>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Austin <vidplace7@gmail.com>
Co-authored-by: virgil <virgil.wang.cj@gmail.com>
Co-authored-by: Mark Trevor Birss <markbirss@gmail.com>
Co-authored-by: Kalle Lilja <15094562+ThatKalle@users.noreply.github.com>
Co-authored-by: GUVWAF <thijs@havinga.eu>
* Version this
* Update platformio.ini (#6006)
* tested higher speed and it works
* Un-extra
* Add -tft environments to the ci matrix
* Exclude unphone tft for now. Something is wonky
* fixed Indicator touch issue (causing IO expander issues), added more RAM
* update lib
* fixed Indicator touch issue (causing IO expander issues), added more RAM (#6013)
* increase T-Deck PSRAM to avoid too early out-of-memory when messages fill up the storage
* update device-ui lib
* Fix T-Deck SD card detection (#6023)
* increase T-Deck PSRAM to avoid too early out-of-memory when messages fill up the storage
* fix SDCard for T-Deck; allow SPI frequency config
* meshtasticd: Add X11 480x480 preset (#6020)
* Littlefs per device
* 2.6 update
* [create-pull-request] automated change (#6037)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* InkHUD UI for E-Ink (#6034)
* Decouple ButtonThread from sleep.cpp
Reorganize sleep observables. Don't call ButtonThread methods inside doLightSleep. Instead, handle in class with new lightsleep Observables.
* InkHUD: initial commit (WIP)
Publicly discloses the current work in progress. Not ready for use.
* feat: battery icon
* chore: implement meshtastic/firmware #5454
Clean up some inline functions
* feat: menu & settings for "jump to applet"
* Remove the beforeRender pattern
It hugely complicates things. If we can achieve acceptable performance without it, so much the better.
* Remove previous Map Applet
Needs re-implementation to work without the beforeRender pattern
* refactor: reimplement map applet
Doesn't require own position
Doesn't require the beforeRender pattern to precalculate; now all-at-once in render
Lays groundwork for fixed-size map with custom background image
* feat: autoshow
Allow user to select which applets (if any) should be automatically brought to foreground when they have new data to display
* refactor: tidy-up applet constructors
misc. jobs including:
- consistent naming
- move initializer-list-only constructors to header
- give derived applets unique identifiers for MeshModule and OSThread logging
* hotfix: autoshow always uses FAST update
In future, it *will* often use FAST, but this will be controlled by a WindowManager component which has not yet been written.
Hotfixed, in case anybody is attempting to use this development version on their deployed devices.
* refactor: bringToForeground no longer requests FAST update
In situations where an applet has moved to foreground because of user input, requestUpdate can be manually called, to upgrade to FAST refresh.
More permanent solution for #23e1dfc
* refactor: extract string storage from ThreadedMessageApplet
Separates the code responsible for storing the limited message history, which was previously part of the ThreadedMessageApplet.
We're now also using this code to store the "most recent message". Previously, this was stored in the `InkHUD::settings` struct, which was much less space-efficient.
We're also now storing the latest DM, laying the foundation for an applet to display only DMs, which will complement the threaded message applet.
* fix: text wrapping
Attempts to fix a disparity between `Applet::printWrapped` and `Applet::getWrappedTextHeight`, which would occasionally cause a ThreadedMessageApplet message to render "too short", overlapping other text.
* fix: purge old constructor
This one slipped through the last commit..
* feat: DM Applet
Useful in combination with the ThreadedMessageApplets, which don't show DMs
* fix: applets shouldn't handle events while deactivated
Only one or two applets were actually doing this, but I'm making a habit of having all applets return early from their event handling methods (as good practice), even if those methods are disabled elsewhere (e.g. not observing observable, return false from wantPacket)
* refactor: allow requesting update without requesting autoshow
Some applets may want to redraw, if they are displayed, but not feel the information is worth being brought to foreground for. Example: ActiveNodesApplet, when purging old nodes from list.
* feat: custom "Recently Active" duration
Allows users to tailor how long nodes will appear in the "Recents" applets, to suit the activity level of their mesh.
* refactor: rename some applets
* fix: autoshow
* fix: getWrappedTextHeight
Remove the "simulate" option from printWrapped; too hard to keep inline with genuine printing (because of AdafruitGFX Fonts' xAdvance, mabye?). Instead of simulating, we printWrapped as normal, and discard pixel output by setting crop. Both methods are similarly inefficient, apparently.
* fix: text wrapping in ThreadedMessageApplet
Wrong arguments were passed to Applet::printWrapped
* feat: notifications for text messages
Only shown if current applet does not already display the same info. Autoshow takes priority over notifications, if both would be used to display the same info.
* feat: optimize FAST vs FULL updates
New UpdateMediator class counts the number of each update type, and suggets which one to use, if the code doesn't already have an explicit prefence. Also performs "maintenance refreshes" unprovoked if display is not given an opportunity to before a FULL refresh through organic use.
* chore: update todo list
* fix: rare lock-up of buttons
* refactor: backlight
Replaces the initial proof-of-concept frontlight code for T-Echo
Presses less than 5 seconds momentarily illuminate the display
Presses longer than 5 seconds latch the light, requiring another tap to disable
If user has previously removed the T-Echo's capacitive touch button (some DIY projects), the light is controlled by the on-screen menu. This fallback is used by all T-Echo devices, until a press of the capacitive touch button is detected.
* feat: change tile with aux button
Applied to VM-E290.
Working as is, but a refactor of WindowManager::render is expected shortly, which will also tidy code from this push.
* fix: specify out-of-the-box tile assignments
Prevents placeholder applet showing on initial boot, for devices which use a mult-tile layout by default (VM-E290)
* fix: verify settings version when loading
* fix: wrong settings version
* refactor: remove unimplemented argument from requestUpdate
Specified whether or not to update "async", however the implementation was slightly broken, Applet::requestUpdate is only handled next time WindowManager::runOnce is called. This didn't allow code to actually await an update, which was misleading.
* refactor: renaming
Applet::render becomes Applet::onRender.
Tile::displayedApplet becomes Tile::assignedApplet.
New onRender method name allows us to move some of the pre and post render code from WindowManager into new Applet::render method, which will call onRender for us.
* refactor: rendering
Bit of a tidy-up. No intended change in behavior.
* fix: optimize refresh times
Shorter wait between retrying update if display was previously busy.
Set anticipated update durations closer to observed values. No signifacant performance increase, but does decrease the amount of polling required.
* feat: blocking update for E-Ink
Option to wait for display update to complete before proceeding. Important when shutting down the device.
* refactor: allow system applets to lock rendering
Temporarily prevents other applets from rendering.
* feat: boot and shutdown screens
* feat: BluetoothStatus
Adds a meshtastic::Status object which exposes the state of the Bluetooth connection. Intends to allow decoupling of UI code.
* feat: Bluetooth pairing screen
* fix: InkHUD defaults not honored
* fix: random Bluetooth pin for NicheGraphics UIs
* chore: button interrupts tested
* fix: emoji reactions show as blank messages
* fix: autoshow and notification triggered by outgoing message
* feat: save InkHUD data before reboot
Implemented with a new Observable. Previously, config and a few recent messages were saved on shutdown. These were lost if the device rebooted, for example when firmware settings were changed by a client. Now, the InkHUD config and recent messages saved on reboot, the same as during an intentional shutdown.
* feat: imperial distances
Controlled by the config.display.units setting
* fix: hide features which are not yet implemented
* refactor: faster rendering
Previously, only tiles which requested update were re-rendered. Affected tiles had their region blanked before render, pixel by pixel. Benchmarking revealed that it is significantly faster to memset the framebuffer and redraw all tiles.
* refactor: tile ownership
Tiles and Applets now maintain a reciprocal link, which is enforced by asserts. Less confusing than the old situation, where an applet and a tile may disagree on their relationship. Empty tiles are now identified by a nullptr *Applet, instead of by having the placeholderApplet assigned.
* fix: notifications and battery when menu open
Do render notifications in front of menu; don't render battery icon in front of menu.
* fix: simpler defaults
Don't expose new users to multiplexed applets straight away: make them enable the feature for themselves.
* fix: Inputs::TwoButton interrupts, when only one button in use
* fix: ensure display update is complete when ESP32 enters light sleep
Many panels power down automatically, but some require active intervention from us. If light sleep (ESP32) occurs during a display update, these panels could potentially remain powered on, applying voltage the pixels for an extended period of time, and potentially damaging the display.
* fix: honor per-variant user tile limit
Set as the default value for InkHUD::settings.userTiles.maxCount in nicheGraphics.h
* feat: initial InkHUD support for Wireless Paper v1.1 and VM-E213
* refactor: Heard and Recents Applets
Tidier code, significant speed boost. Possibly no noticable change in responsiveness, but rendering now spends much less time blocking execution, which is important for correction functioning of the other firmware components.
* refactor: use a common pio base config
Easier to make any future PlatformIO config changes
* feat: tips
Show information that we think the user might find helpful. Some info shown first boot only. Other info shown when / if relevant.
* fix: text wrapping for '\n'
Previously, the newline was honored, but the adojining word was not printed.
* Decouple ButtonThread from sleep.cpp
Reorganize sleep observables. Don't call ButtonThread methods inside doLightSleep. Instead, handle in class with new lightsleep Observables.
* feat: BluetoothStatus
Adds a meshtastic::Status object which exposes the state of the Bluetooth connection. Intends to allow decoupling of UI code.
* feat: observable for reboot
* refactor: Heltec VM-E290 installDefaultConfig
* fix: random Bluetooth pin for NicheGraphics UIs
* update device-ui: fix touch/crash issue while light sleep
* Collect inkhud
* fix: InkHUD shouldn't nag about timezone (#6040)
* Guard eink drivers w/ MESHTASTIC_INCLUDE_NICHE_GRAPHICS
* Case sensitive perhaps?
* More case-sensitivity instances
* Moar
* RTC
* Yet another case issue!
* Sigh...
* MUI: BT programming mode (#6046)
* allow BT connection with disabled MUI
* Update device-ui
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* MUI: fix nag timeout, disable BT programming mode for native (#6052)
* allow BT connection with disabled MUI
* Update device-ui
* MUI: fix nag timeout default and remove programming mode for native
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* remove debuglog leftover
* Wireless Paper: remove stray board_level = extra (#6060)
Makes sure the InkHUD version gets build into the release zip
* Fixed persistence stragglers from NodeDB / Device State divorce (#6059)
* Increase `MAX_THREADS` for InkHUD variants with WiFi (#6064)
* Licensed usage compliance (#6047)
* Prevent psk and legacy admin channel on licensed mode
* Move it
* Consolidate warning strings
* More holes
* Device UI submodule bump
* Prevent licensed users from rebroadcasting unlicensed traffic (#6068)
* Prevent licensed users from rebroadcasting unlicensed traffic
* Added method and enum to make user license status more clear
* MUI: move UI initialization out of main.cpp and adding lightsleep observer + mutex (#6078)
* added device-ui to lightSleep observers for handling graceful sleep; refactoring main.cpp
* bump lib version
* Update device-ui
* unPhone TFT: include into build, enable SD card, increase PSRAM (#6082)
* unPhone-tft: include into build, enable SD card, increase assigned PSRAM
* lib update
* Backup / migrate pub private keys when upgrading to new files in 2.6 (#6096)
* Save a backup of pub/private keys before factory reset
* Fix licensed mode warning
* Unlock spi on else file doesn't exist
* Update device-ui
* Update protos and device-ui
* [create-pull-request] automated change (#6129)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Proto
* [create-pull-request] automated change (#6131)
* Proto update for backup
* [create-pull-request] automated change (#6133)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Update protobufs
* Space
* [create-pull-request] automated change (#6144)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Protos
* [create-pull-request] automated change (#6152)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Updeet
* device-ui lib update
* fix channel OK button
* device-lib update: fix settings panel -> no scrolling
* device-ui lib: last minute update
* defined(SENSECAP_INDICATOR)
* MUI hot-fix pub/priv keys
* MUI hot-fix username dialog
* MUI: BT programming mode button
* Update protobufs
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
Co-authored-by: GUVWAF <thijs@havinga.eu>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: Jason Murray <15822260+scruplelesswizard@users.noreply.github.com>
Co-authored-by: Jason Murray <jason@chaosaffe.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Austin <vidplace7@gmail.com>
Co-authored-by: virgil <virgil.wang.cj@gmail.com>
Co-authored-by: Mark Trevor Birss <markbirss@gmail.com>
Co-authored-by: Kalle Lilja <15094562+ThatKalle@users.noreply.github.com>
Co-authored-by: rcarteraz <robert.l.carter2@gmail.com>
This patch takes a few LOG_INFO messages and turns them into
LOG_DEBUG. The logs appear to be mostly useful to developers, rather
than end users and as such placing them at INFO level is too high a
priority.
In 2020 there was a bad batch of tbeams whose ubloxen went a little
loopy. We factory reset them to bring them sane again.
It's now 2025, the problem with tbeam is long fixed, and this is not
necessary for any other devices we're aware of. Removing the function to
make our code more maintainable.
There is an associated protobuf entry did_gps_reset that we might be able
to re-purpose for something else, or remove in 3.0.
Last release a change introduced different branching functions in
gps.cpp based on the model of a device. This makes the code less
readable and introduces the potential for bugs.
This patch creates a new variable, GPS_PROBETRIES that can be set
in variant.h of devices that will control how many times we will
probe for GPS presence. It sets up the T1000-E to use this variable
and cleans the code in gps.c
* Add support for MeshLink
* Updated, enabled watchdog and added button definition
* added eink variant and removed some compile errors
* Small board json file edit
* Finally got trunk working (somehow?), this is just cleanup with trunk fmt
* Various improvements and cleanup. Removed the use of PIN_3V3_En and defined a specific WD_EN pin instead for better clarity. Will do a bit more testing asap to make sure everything still works as intended :)
* Enable on-board QSPI Flash
* run trunk fmt with clang-format
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Austin <vidplace7@gmail.com>
* Sanity check configuration for the default MQTT server
* Skip for MESHTASTIC_EXCLUDE_MQTT
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* 12- or 24-hour clock work in progress
* 12- and 24-hour added to Settings Frame. Also some adjustments to screen layout.
* Updated Uptime wording to be "Up" to fit within screen real estate
* Removed label from uptime to conserve additional space
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
```text
feat(json): improve UTF-8 string handling in JSONValue
- Add proper UTF-8 multi-byte character sequence handling
- Add boundary checks for UTF-8 sequences
- Keep original code structure and flow
- Add detailed comments for UTF-8 processing logic
This change improves the robustness of JSON string handling
while maintaining compatibility with existing code.
you're leaking the nonce to stdout, if your logs are routed to a folder, this logs the nonce every time, leading to replay attack surface area being higher. Changed to debug.
As reported by @jstockdale, when writing coloured logs we were
writing the full string, including a null terminator. This caused
issues for programs consuming our logs. The fix as identified is
not to write the null.
Fixes https://github.com/meshtastic/firmware/issues/5945
* Space out periodic broadcasts of modules automatically
* Add warning for function usage
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Remove prefs first
* Remove file first
* Remove truncate
* No longer needed
* Missed a param
* That wasn't supposed to be there
* Remove vestigal lfs assert
* Durr
* * Update RAK9154 sensor to tx remote power telemetry
* remove uf2 script, pio run does that inline
* move sensor module to correct position
* disable LED and Accelerometer code on rak2560
* trunk fmt
* mention epaper variant
* attention, revert, revert
* Enable Environment Telemetry of these values
* fix float values
* fix detection of lark weather station
* fix unit tests and add support for Dfrobot rain gauge
* fix name display on bootup
* fix gauge init logic
* trunk fmt
* Rework of CH341 HAL
* Applied trunk fmt
* revert serial reading
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Initial commit of a fuzzer for Meshtastic.
* Use a max of 5 for the phone queues
* Only write files to the temp dir
* Limitless queue + fuzzer = lots of ram :)
* Use $PIO_ENV for path to program
* spelling: s/is/to/
* Use loopCanSleep instead of a lock in Router
* realHardware allows full use of a CPU core
* Ignore checkov CKV_DOCKER_2 & CKV_DOCKER_3
* Add Atak seed
* Fix lint issues in build.sh
* Use exception to exit from portduino_main
* Separate build & source files into $WORK & $SRC
* Use an ephemeral port for the API server
* Include CXXFLAGS in the link step
* Read all shared libraries
* Use a separate work directory for each sanitizer
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Initiate magenetometer based compass calibration from button presses
- only active for BMX160 accelerometers on RAK_4631
- replace automatic calibration on power on with button triggered
calibration
- set 5 presses to trigger 30s calibration
- set 6 presses to trigger 60s calibration (useful if unit is not
handheld, ie vehicle mounted)
- show calibration time remaining on calibration alert screen
* Fix non RAK 4631 builds
- exclude changes from non RAK 4631 builds
- remove calls to screen when not present
* Fix build on RAK4631_eth_gw
- exclude all compass heading updates on variant without screen
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Allow GPIO0; check for conflict with user button
* Guard for no BUTTON_PIN; handle portduino
* Portduino settings: attempt two
We don't really need to #include radio code here just to check if the pin is RADIOLIB_NC. We're only interested if scanAndSelect pin matches user button pin, but they won't match if user button is RADIOLIB_NC.
* Portduino attempt 3: glue
* For each GPIO PIN, allow to specify gpiochip and line
* Added support for LLCC68 in native env.
* Removed one if by employing &&
* Fix for log, as std::string and not const char*
* Remove CH341 flag, enabling it for all LoRa chips
* Provide a default example
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Correct function comment
* Enqueue the intended packet, not the pointer to what we just dropped!
* Add some log output when we drop packets due to a full queue
* Make it clear when a non-late packet is dropped
* Remove from queue before release, not after
* Erase dropped packet from queue
* Declared type
* Log TX queue length after every send
* Fix operand order
* Add worst-case cap on TX delay vs current time
* Added support for Polish fonts for E-Ink devices
* Added support for Polish fonts for E-Ink devices FIX
* Polilsh E-Ink/OLED font retouch, fixed Czech/Slovak font double space bug
* Fixed platformio.ini uncommented flag
* Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28
* Merge PR #420
* Fixed double and missing Default class.
* Use correct format specifier and fixed typo.
* Removed duplicate code.
* Fix error: #if with no expression
* Fix warning: extra tokens at end of #endif directive.
* Fix antenna switching logic. Complementary-pin control logic is required on the rp2040-lora board.
* Fix deprecated macros.
* Set RP2040 in dormant mode when deep sleep is triggered.
* Fix array out of bounds read.
* Admin key count needs to be set otherwise the key will be zero loaded after reset.
* Don't reset the admin key size when loading defaults. Preserve an existing key in config if possible.
* Remove log spam when reading INA voltage sensor.
* Remove static declaration for admin keys from userPrefs.h. Load hard coded admin keys in case config file has empty slots.
* Removed newlines from log.
* Fix issue #5665.
* Fix build for Pico2 RP2350 platform.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
* add more locking for shared SPI devices (#5595)
* add more locking for shared SPI devices
* call initSPI before the lock is used
* remove old one
* don't double lock
* Add missing unlock
* More missing unlocks
* Add locks to SafeFile, remove from `readcb`, introduce some LockGuards
* fix lock in setupSDCard()
* pull radiolib trunk with SPI-CS fixes
* change ContentHandler to Constructor type locks, where applicable
---------
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: GUVWAF <thijs@havinga.eu>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
* mesh-tab: lower I2C touch frequency
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: GUVWAF <thijs@havinga.eu>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
MESHTASTIC_EXCLUDE_SOCKETAPI disables the API Server when set.
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: GUVWAF <thijs@havinga.eu>
* In graphics/Screen.cpp, a copy/paste error to do with hearts
* In mesh/http/ContentHandler.cpp, an unused variable
* in mqtt/MQTT.cpp, remove unneded logic " '!A || (A && B)' is equivalent to '!A || B'"
* update indicator board
* Fixed the issue that indicator device uploads via rp2040 serial port in some cases.
* esp debug logs
* USB mode=1 messed up the debug log
* dummy for config transfer (#5154)
---------
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: virgil <virgil.wang.cj@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Selection of minor edits from the TFT branch that are too
challenging to cherry-pick cleanly, including:
* introducing the HAS_TFT flag
* fixing pins in unphone
* Adding pinterdevice to portduino settings
Will always rebroadcast packets, but will do so after all other modes.
Intended for router nodes that are there to provide additional coverage
in areas not already covered by other routers, or to bridge around
problematic terrain, but should not be given priority over other routers
in order to avoid unnecessaraily consuming hops.
By default, this role will rebroadcast during the normal client window.
However, if another node is overheard rebroadcasting the packet, then it
will be moved to a second window *after* the normal client one, with the
same timing behaviour.
As reported by @Mason10198, the WisMesh Pocket was always waking
on accelerometer motion.
This change gates the LIS3DH sensor's call to wakeScreen based on
config.display.wake_on_tap_or_motion .
fixes https://github.com/meshtastic/firmware/issues/5579
* INA219 charging detection
minimal implementation: if there is a configured INA219 sensor for battery monitoring we can take the current flow across the shunt resistor to know if we are charging the battery - negative milliamps indicate charging
* Update Power.cpp
added comments and 2 extra defines to disable and swap detection direction
* Update Power.cpp
fix disabled case
* move getCurrentMa() to new CurrentSensor class
* INA219 charging detection
minimal implementation: if there is a configured INA219 sensor for battery monitoring we can take the current flow across the shunt resistor to know if we are charging the battery - negative milliamps indicate charging
* Update Power.cpp
added comments and 2 extra defines to disable and swap detection direction
* Update Power.cpp
fix disabled case
* move getCurrentMa() to new CurrentSensor class
* add INA3221 charging detection
* RP2040: Update core; add mDNS support (#5355)
* Update arduino-pico core
* RP2040: Add mDNS support
* SimpleMDNS `begin` now returns a bool
* Add `-g` option to `debug_build_flags` to link files for gdb
* RAK11310 needs old platform as well
* Change defines to specific architecture
* Core version 4.2.1 is out
* Add sudo to apt-get commands for Raspbian Build (#5364)
Without sudo, inadequate permissions to runs the commands meant
the build was failing.
* Typo fix in build_raspbian.yml (#5365)
s/sudp/sudo :(:(:(
* Rework some things
* Trunk
* Separate littlefs bundle
* version tags
* Diag
* Add littlefswebui
* Bug fixed in ExternalNotificationModule (#5375)
While `nagging` setExternalState wasn't written to Buzzer & Vibra so output was never toggled.
Possible fix for #5348
* Cleanup static files from bad Web UI bundle on 2.5.13 release (#5376)
* Cleanup static files from bad Web UI bundle on 2.5.13 release
* Check existence first
* Esp32 is the only one we care about
* Move some actions to after `startTransmit()` (#5383)
To minimize the time between channel scan and actual transmit
* [create-pull-request] automated change (#5380)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Allows all 3 PKI keys to be added to userPrefs.h (#4969) and a tool. (#5368)
* more userPrefs.h
Added PKI Admin keys to userPrefs.h
* Update userPrefs.h
Allows all 3 PKI keys to be added to userPrefs.h (#4969)
* Update NodeDB.cpp
Trunk
* Update userPrefs.h
Changed wording
* Create base64_to_hex.py
A little tool for converting base64 PKI Keys to decoded byte that userPrefs.h can understand.
* more userPrefs.h
Added PKI Admin keys to userPrefs.h
* Update userPrefs.h
Allows all 3 PKI keys to be added to userPrefs.h (#4969)
* Update NodeDB.cpp
Trunk
* Update userPrefs.h
Changed wording
* Create base64_to_hex.py
A little tool for converting base64 PKI Keys to decoded byte that userPrefs.h can understand.
* [create-pull-request] automated change (#5388)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* add smiley emoji (#5391)
* add smiley emoji
* clang-formatted
* Anable trace route function on wismeshtap platform (#5389)
* fix 'symbal' typo (#5395)
* [create-pull-request] automated change (#5399)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* /api/v1/fromradio: add OPTIONS handler for CORS. (#5386)
This avoids hitting the 404 Not Found handler, which breaks connection
keep-alive, so this change fixes a big performance regression for Web Client in
Chrome: https://github.com/meshtastic/firmware/issues/5385
Tested on Heltec V3.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Make heart emoji usable (#5403)
* Create a specific hw_model for WisMesh Tap (#5400)
* Create a specific hw_model for WisMesh Tap
* Trunk
* HAS_ETHERNET
* Remove it altogether
* Don't need these either
* Fix RTC time injection and consolidate position logic (#5396)
* Fix RTC time injection and consolidate position logic
* Comment out unused var warning
* Backerds
* Update arduino-pico core to fix sporadic hangs (#5406)
* Update platform-raspberrypi also (#5407)
* Update arduino-pico core to fix sporadic hangs
* Update platform-raspberrypi also
* --web added to device-install(.sh/.bat) (#5405)
* Add --web
* Update device-install.bat
Forgot a "-" a few places.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* add GPS in indicator board (#5411)
* Fixed NMEA sentence issue in CalTopo as well as bug with no printing all of the nodes (#5412)
* --web littlefswebui-* typo fix (#5416)
* Add --web
* Update device-install.bat
Forgot a "-" a few places.
* Typo fix.
* Typo fix
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
* Temporarily disable MDNS when MQTT is enabled (#5418)
Leads to a panic
* Check for OkToMqtt flag presence before uplinking to MQTT (#5413)
* Check for oktomqtt flag presence before uplinking to MQTT
* Move to mqtt->onSend
* Temetry can respond to want-response for LocalStats variant (#5414)
* Seems like the last DIY board that's not "extra" (#5420)
* Cherry pick tdeck fixes (#5422)
* Try-fix (workaround) T-Deck audio crash
* set T-Deck audio to unused 48 (mem mclk)
* swap mclk to gpio 21
* dreamcatcher: assign GPIO44 to audio mclk
---------
Co-authored-by: mverch67 <manuel.verch@gmx.de>
* add canned message and keyboard in indicator board (#5410)
* add canned message and keyboard in indicator board
* Added virtual keyboard macro and enabled for Indicator
* Cleanup macros by applying USE_VIRTUAL_KEYBOARD and DISPLAY_CLOCK_FRAME
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Update build-native.sh (#5415)
* Update build-native.sh
Device-install.sh and device-update.sh are not used on native platform, skip copying to release directory after build and copy native-install.sh and native-run.sh instead.
* Update build-native.sh
Skip native-run.sh copy
* Cleans up visibility in GPS.h (#5426)
Signed-off-by: Christopher Hoover <ch@murgatroid.com>
* Fix admin key loading from userPrefs.h (#5417)
* Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28
* Merge PR #420
* Fixed double and missing Default class.
* Use correct format specifier and fixed typo.
* Removed duplicate code.
* Fix error: #if with no expression
* Fix warning: extra tokens at end of #endif directive.
* Fix antenna switching logic. Complementary-pin control logic is required on the rp2040-lora board.
* Fix deprecated macros.
* Set RP2040 in dormant mode when deep sleep is triggered.
* Fix array out of bounds read.
* Admin key count needs to be set otherwise the key will be zero loaded after reset.
* Don't reset the admin key size when loading defaults. Preserve an existing key in config if possible.
* Remove log spam when reading INA voltage sensor.
* Remove static declaration for admin keys from userPrefs.h. Load hard coded admin keys in case config file has empty slots.
* Removed newlines from log.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* try to detect dfrobot station to tell it apart from an ublox gps. (#5393)
* Remove BMA-423 and STK8X by default (#5429)
* Remove BMA-423 by default
* STK
* Wrong macro
* Helps if you include the file
* [create-pull-request] automated change (#5431)
Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com>
* Support for the ClimateGuard RadSens Geiger-Muller tube (#5425)
* fixes https://github.com/meshtastic/firmware/issues/5434 (#5435)
* update libpax
* fix interval init
* Fix memory leaks by adding missing `free()` calls before early returns in `MQTT::onReceive` (#5439)
This fix addresses memory leaks in the `MQTT::onReceive` function by ensuring that dynamically allocated resources (`e.channel_id`, `e.gateway_id` and `e.packet`) are properly freed before each early return. Previously, these resources were only freed at the end of the function, leaving them unhandled in certain exit paths. Adding the missing `free()` calls prevents memory leaks and ensures proper resource cleanup in all scenarios.
* Removing 1.0 legacy boards from releases and completely removing Heltec wireless capsule from support (#5436)
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* A second round of cleanup on GPS.h. (#5433)
* Move yet more stuff out of GPS.h and into file scope.
* Protect code macros from eating semicolons.
* Remove unused (and unimplemented) getDOPString.
* clang-format with project style file on affected files.
Signed-off-by: Christopher Hoover <ch@murgatroid.com>
* enable MQTT with TLS on RPi picow (#5442)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Don't powersave on Wifi (#5443)
* Don't go into light sleep with wifi enabled
* Move
* Trunk
* Revert "Seems like the last DIY board that's not "extra" (#5420)" (#5446)
This reverts commit e6fb6b115a.
* Actually gunzip all the files when building a .deb (#5449)
* [create-pull-request] automated change (#5457)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Cleanup i2c scan logs and macro to save some bytes and remain consistent (#5455)
* Cleanup i2c scan logs and macro to save some bytes and remain consistent
* Functions are better than macros
* Exclude i2c scan for STM32
* Useless log
* Clean up some inline functions (#5454)
* Use isWithinTimespanMs to avoid refererence to NodeDb instance inside of NodeDb (#5453)
* fix cors for meshtasticd to allow use of cross origin clients (#5463)
* Remove ATECC crypto chip placeholder code (#5461)
* GPS.h cleanups round 3. (#5447)
* GPS.h cleanups round 3.
No effective behavior change.
Protected members can be private so make it so. (Supporting
subclasses needs a lot more work.)
Moves uBloxGnssModelInfo into file scope.
Moves uBloxProtocolVersion into uBloxGnssModelInfo.
Moves baud rate arrays into file scope.
Removes unused/ unimplemented powerStateToString.
Signed-off-by: Christopher Hoover <ch@murgatroid.com>
* Trunk Format.
---------
Signed-off-by: Christopher Hoover <ch@murgatroid.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Fix ukrainian fonts (#5468)
* FIX: rollback to !4624
* UPDATE: new 16 and 24 UA Fonts and fixes
* fix: Solve the lightsleep crash problem via disable lightsleep for indicator. (#5470)
* Trunk
* Warnings and log cleanup (#5472)
* Don't log if keyboard not found
* Signed comparison issue
* [create-pull-request] automated change (#5475)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Adds libusb dev package to Raspbian build steps (#5480)
* [create-pull-request] automated change (#5478)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Portduino fixes (#5479)
* Set config.yaml defaults even if General is missing
* Unsigned values should get %u in logging
* Update arduino-pico core and remove MDNS restriction (#5483)
* Update xiao_esp32 fully support L67K (#5488)
L67K module hardware changed
* Convert userprefs to a json file instead of header file which has to be included everywhere (#5471)
* WIP
* Got string quoting and macro expansion working
* Need the placeholder
* Cleanup
* Missed a user prefs reference
* Update jsonc
* SimRadio: clean-up and emulate collisions (#5487)
* Clean up SimRadio and don't let it use PKC
* Add collision emulation for SimRadio
* Add stats from SimRadio to LocalStats
* Make emulating collisions optional
* add nodeId to nodeinfo update log lines and removed redundant nodeinfo update log line (#5493)
* Refact the macro definition of GPS initialization of GPSDEFAULTD_NOT_PRESENT and added seeeed Indicator to this sequence (#5494)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Extend Length of Source and Destination Node IDs Logged (#5492)
* show 8 chars for logging source and destination ids
* extend legnth of source and destination nodes in log
* Added femtofox configs (#5477)
* added femtofox configs
* Rename bin/config.d/femtofox_Waveshare-SX126X-XXXM_AI-Thinker-RA-01SH.yaml to bin/config.d/femtofox/femtofox_Waveshare-SX126X-XXXM_AI-Thinker-RA-01SH.yaml
* moved femtofox configs to subdir
* [Add] LR1110, LR1120 and LR1121 to linux native Portduino (#5496)
* Update main.cpp
* Update PortduinoGlue.h
* Update PortduinoGlue.cpp
* Update PortduinoGlue.cpp
* Update PortduinoGlue.cpp
* Update main.cpp
* [create-pull-request] automated change (#5500)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Fix minor typos in package workflows (#5505)
* Don't use channel index for encrypted packet (#5509)
* Don't use channel index for encrypted packet
* Remove assert in `getKey`, set invalid key length
So encrypting will fail without reboot
* Reset channel to 0 when unable to encrypt
Such that the NAK doesn't use the failing channel hash
* Always Announce MDNS meshtastic service (#5503)
* refactor server api port into define
* always announce MDNS meshtastic service
* fix nodeDB erase loop when free mem returns invalid value (0, -1). (#5519)
Co-authored-by: mverch67 <manuel.verch@gmx.de>
* Add heltec capsule back
* Revert "Add heltec capsule back"
This reverts commit fc16d93421.
* Lets try this again minus device ui
* Add popular nrf52 pro micro to the builds (#5523)
* Add MACAddress to config.yaml (#5506)
* Add MACAddress to config.yaml
* Better error handling on native, including failing to launch with blank MAC Address and real hardware.
* Re-arrange Mac Address handling and add MACAddressSource
* Bump portduino to remove macaddr function there
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Configure Seeed Xiao S3 RX enable pin (#5517)
* Create OpenWRT_One_mikroBUS_sx1262.yaml (#5529)
* tlora_v2_1_16: Unset BUTTON_PIN and BUTTON_NEED_PULLUP (#5535)
Unset BUTTON_PIN and BUTTON_NEED_PULLUP as the board ships without a user button.
Devices and users expecting a button on GPIO12 have to set [GPIO for user button](https://meshtastic.org/docs/configuration/radio/device/#gpio-for-user-button) to 12 (or any GPIO pin the momentary switch was connected to) to restore functionality.
Signed-off-by: Andrew Yong <me@ndoo.sg>
* [create-pull-request] automated change (#5530)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Fix detection for some RadSens hardware versions (#5542)
Co-authored-by: Jake-B <jake-b@users.noreply.github.com>
* Initialize dmac array to nulls (#5538)
* Initialize dmac array to nulls
* Use std::cout for print before console is init.
* Update OpenWRT_One_mikroBUS_sx1262.yaml (#5544)
* Add portduino-buildroot variant (#5540)
* Add portduino-buildroot variant
* Update platform-native for platform-buildroot
* portduino-buildroot: Define c standard (#5547)
* Portduino: Move meshtasticd/web out of /usr/share/doc/ (#5548)
* Portduino: fix transitional symlinks (#5550)
* Windows Support - Trunk and Platformio (#5397) (#5518)
* Add support for GPG
* Add usb device support
* Add trunk.io to devcontainer
* Trunk things
* trunk fmt
* formatting
* fix trivy/DS002, checkov/CKV_DOCKER_3
* hide docker extension popup
* fix trivy/DS026, checkov/CKV_DOCKER_2
Co-authored-by: Kalle Lilja <15094562+ThatKalle@users.noreply.github.com>
* Synch minor changes from TFT branch (#5520)
* Synch minor changes from TFT branch
Includes:
* New nordicnrf52 minor version (10.5.0 --> 10.6.0)
* Optimisations for T_DECK
* preparation for MESH_TAB
* add ext notification module to portduino
---------
Co-authored-by: mverch67 <manuel.verch@gmx.de>
* DIO3_TCXO_VOLTAGE in config.yaml can now take an exact voltage (#5558)
* Support TLORA_V3.0 (#5563)
- Support TLORA_V3.0. Update of the legendary 2.1_1.6.1 with solar charger, TCXO and IPEX connector.
- 'extra' some short-lived EOL intermediate boards in that range. If possible use T3S3 instead of all of these!
- update trunk to latest version
* Create OpenWRT-One-mikroBUS-LR-IOT-CLICK.yaml (#5564)
* Portduino: fix setting hwId via argument (#5565)
* INA219 charging detection
minimal implementation: if there is a configured INA219 sensor for battery monitoring we can take the current flow across the shunt resistor to know if we are charging the battery - negative milliamps indicate charging
* Update Power.cpp
added comments and 2 extra defines to disable and swap detection direction
* Trunk Fixes
* Add INA226 support
---------
Signed-off-by: Christopher Hoover <ch@murgatroid.com>
Signed-off-by: Andrew Yong <me@ndoo.sg>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: Michael Gjelsø <36234524+gjelsoe@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Co-authored-by: jcyrio <50239349+jcyrio@users.noreply.github.com>
Co-authored-by: Daniel.Cao <144674500+DanielCao0@users.noreply.github.com>
Co-authored-by: Catalin Patulea <cronos586@gmail.com>
Co-authored-by: dylanli <dylan3000dylan@gmail.com>
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: madeofstown <33820964+madeofstown@users.noreply.github.com>
Co-authored-by: Christopher Hoover <ch@murgatroid.com>
Co-authored-by: Mictronics <github@mictronics.de>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com>
Co-authored-by: jake-b <1012393+jake-b@users.noreply.github.com>
Co-authored-by: César de Tassis Filho <CTassisF@users.noreply.github.com>
Co-authored-by: Tomas Dubec <tomas.dubec@gmail.com>
Co-authored-by: Liam Cottle <liam@liamcottle.com>
Co-authored-by: panaceya <panaceya@users.noreply.github.com>
Co-authored-by: virgil <virgil.wang.cj@gmail.com>
Co-authored-by: Robert <r@rbrt.io>
Co-authored-by: noon92 <40807970+noon92@users.noreply.github.com>
Co-authored-by: Mark Trevor Birss <markbirss@gmail.com>
Co-authored-by: broglep <20624281+broglep@users.noreply.github.com>
Co-authored-by: Matthias Granberry <matthias.granberry@gmail.com>
Co-authored-by: Andrew Yong <me@ndoo.sg>
Co-authored-by: Jake-B <jake-b@users.noreply.github.com>
Co-authored-by: Austin <vidplace7@gmail.com>
Co-authored-by: Kalle Lilja <15094562+ThatKalle@users.noreply.github.com>
As reported by @Fastomat, if a user had enabled "Share Phone
Position" in the app, RangeTest did not use this position and
recorded a 0,0 lat/lon.
This change preferences GPS where avaialble, but otherwise
uses the position stored for the node in NodeDB.
fixes https://github.com/meshtastic/firmware/issues/5620
* Very hacky first attempt at usermod ech341
* Fixes and debug printfs
* Move to library version of libpinedio-usb
* Add spidev: ch341 option in meshtasticd config.yaml
* Only check settingsStrings on native
* Use new CH341 code
* Bump ch341 lib
* Cleanup USBHal
* Add ch341 config.d files
* Remove ch341quirk
* Bump to most recent spi-userspace driver
* Add handling for ch341 serial, pid, and vid
* Minor fixes from pio check
* Trunk
* Add include for musl compliance
* Point to upstream libch341
* Remove unnecessary memcpy for PKI crypto
* Update comment s/packet_id/id/
* Create a copy of bytes for each channel decrypt
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Presently we base the default long name (Meshtastic XXXX) and short
names (XXXX) on a node's MAC address. This works fine, unless you
have a node with no bluetooth, like Portduino.
Our logic for node numbers is also based on MAC address. However,
it has the added feature that it will create a random node number
if the Mac address is no good. The name is always "Meshtastic 0001".
This change switches node names (long and short) to instead rely
on the node number for defaults. For nodes with mac addresses,
there should be no user-visible change. For nodes without, they'll
now have a name other than "Meshtastic 0001".
Fixes https://github.com/meshtastic/firmware/issues/5370
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>