* Make STM compile again and update toolchain. The binary is too big for the flash. WIP
* Making progress with OSFS, still WIP
* more progress, still too big. Adding RAK3172 to the equasion
* Make STM compile again and update toolchain. The binary is too big for the flash. WIP
* Making progress with OSFS, still WIP
* more progress, still too big. Adding RAK3172 to the equasion
* still too big
* minimize build
* trunk fmt
* fix a couple of symbol clashes
* trunk fmt
* down to 101% with a release vs. debug build and omitting the flash strings
* fix compilation
* fix compilation once more
* update protobufs linkage
* - Toolchain updated
- Fixed macro error
* silence compiler warning
note: do something about this assert...
* new toolkit and fix Power.cpp
* STM32WL make it fit (#4330)
* Add option to exclude I2C parts
The I2C hals and related code uses a significant amount of flash space and aren't required for a basic node.
* Add option to disable Admin and NodeInfo modules
Disabled by default in minimal build. This saves a significant amount of flash
* Disable unused hals
These use up significant flash
* Add float support for printf for debugging
Makes serial look nice for debugging
* This breaks my build for some reason
* These build flags can save a bit of flash
* Don't disable NodeInfo and Admin modules in minimal build
They fit in flash
* Don't include printf float support by default
Only useful for debugging
---------
Co-authored-by: Adam Lawson <dev@goshawk22.uk>
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Adam Lawson <dev@goshawk22.uk>
* feature-T1000-E: add Added the board definition for T1000-E
- integrate a script for rapid dependency download that is compatible with both Linux and Windows platforms.
- add the pin definitions for UART, SPI, GPIO, and other peripherals have been ensured to be correct.
- add the env configuration for PlatformIO.
* refact-T1000-E: redefine T1000-E board
* feature-T1000-E: add basic sensors
* feature-T1000-E: add button init
* feat: add DRADIOLIB_GODMODE defination for use function setDioAsRfSwitch to DIO LORA RF
* feat : add gps(GNSS_Airoha) sleep mode
* feat: add behavier when rec or send message
* chore: hang IIC bus usage to avoid sensor address conflict
* feat: add sensor data acquisition
* feat : support Airoha GPS
- add disable it in FSM
- update lookForTime and lookForLocation function
* fix: fix a bug
* version: change version to 0.9.0
* Update tracker-t1000-e.json
Remove a space
* Delete variants/tracker-t1000-e/run_once.sh
Delete not need as we will change platformio.ini
* Update platformio.ini
Update SoftDevice 7.3.0 usage in line with other lr1110 targets
Do we need to keep GODMODE ?
* fix: Button behavier incorrect bug
* fix:remove some invaild code of TextMessageModule
* fix: remove invaild comment
* version: change version to 0.9.1
- update mark's patch
- remove some invaild code and comments
- fix button behavier
* trunk format
* fix: HELTEC_CAPSULE_SENSOR_V3 block got accidentally deleted
* fix: EnvironmentTelemetry upstream merge went awry.
* fix: Added macro definitions to ensure correct operation of LORA section
* fix :GNSS_AIROHA macro defination in line with others
* fix: upstream backmerge accidentally.
* fix: wrap macro PIN_3V3_EN BUZZER_EN_PIN GNSS_AIROHA in the TRACKER_T1000_E macro guard
---------
Co-authored-by: Mark Trevor Birss <markbirss@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* Make sure to call randomSeed() on esp32
* Randomize the top 22 bits of the Message ID
* Make it clear that we are not calling randomSeed() on purpose
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* 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
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Upgrade module config state version but don't blow everything away
* ModuleConfig version intervals roll forward
* Be specific about version migration criteria
* initModuleConfigIntervals fix
* Don't forget power!
* Send StoreForward history of the server to a connected client
To extend the ToPhoneQueue
* Add delay after sending history info
* Don't allow history request over LoRa on default channel
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add congestion scaling coefficient
* Added active mesh sized based interval scaling
* Moved back to bottom
* Format
* Add observers and use correct number of online nodes
* Updated setFrames in Screen.cpp
Added code to attempt to revert back to the same frame that user was on prior to setFrame reload.
* Space added Screen.cpp
* Update Screen.cpp
Make screen to revert to Frame 0 if the originally displayed frame is no longer there.
* Update Screen.cpp
Inserted boolean holdPosition into setFrames to indicate the requirement to stay on the same frame ( if =true) or else it will switch to new frame .
Only Screen::handleStatusUpdate calls with setFrame(true). ( For Node Updates)
All other types of updates call as before setFrame(), so it will change focus as needed.
* Hold position, even if number of frames increases
* Hold position, if handling an outgoing text message
* Update Screen.cpp
* Reverted chnages related to devicestate.has_rx_text_message
* Reset to master
* CannedMessages only handles routing packets when waiting for ACK
Previously, this was calling Screen::setFrames at unexpected times
* Gather position info about screen frames while regenerating
* Make admin module observable
Notify only when relevant. Currently: only to handle remove_nodenum.
* Optionally specify which frame to focus when setFrames runs
* UIFrameEvent uses enum instead of multiple booleans
* Allow modules to request their own frame to be focussed
This is done internally by calling MeshModule::requestFocus()
Easier this way, insteady of passing the info in the UIFrameEvent:
* Modules don't always know whether they should be focussed until after the UIFrameEvent has been raised, in dramFrame
* Don't have to pass reference to module instance as parameter though several methods
* E-Ink screensaver uses FOCUS_PRESERVE
Previously, it had its own basic implementation of this.
* Spelling: regional variant
* trunk
* Fix HAS_SCREEN guarding
* More HAS_SCREEN guarding
---------
Co-authored-by: BIST <77391720+slash-bit@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: slash-bit <v-b2@live.com>
* Turn off vscode cmake prompt - we don't use cmake on meshtastic
* Add rak4631_dap variant for debugging with NanoDAP debug probe device.
* The rak device can also run freertos (which is underneath nrf52 arduino)
* Add semihosting support for nrf52840 devices
Initial platformio.ini file only supports rak4630
Default to non TCP for the semihosting log output for now...
Fixes https://github.com/meshtastic/firmware/issues/4135
* powermon WIP (for https://github.com/meshtastic/firmware/issues/4136 )
* oops - mean't to mark the _dbg variant as an 'extra' board.
* powermon wip
* Make serial port on wio-sdk-wm1110 board work
By disabling the (inaccessible) adafruit USB
* Instrument (radiolib only for now) lora for powermon
per https://github.com/meshtastic/firmware/issues/4136
* powermon gps support
https://github.com/meshtastic/firmware/issues/4136
* Add CPU deep and light sleep powermon states
https://github.com/meshtastic/firmware/issues/4136
* Change the board/swversion bootstring so it is a new "structured" log msg.
* powermon wip
* add example script for getting esp S3 debugging working
Not yet used but I didn't want these nasty tricks to get lost yet.
* Add PowerMon reporting for screen and bluetooth pwr.
* make power.powermon_enables config setting work.
* update to latest protobufs
* fix bogus shellcheck warning
* make powermon optional (but default enabled because tiny and no runtime impact)
* tell vscode, if formatting, use whatever our trunk formatter wants
without this flag if the user has set some other formatter (clang)
in their user level settings, it will be looking in the wrong directory
for the clang options (we want the options in .trunk/clang)
Note: formatOnSave is true in master, which means a bunch of our older
files are non compliant and if you edit them it will generate lots of
formatting related diffs. I guess I'll start letting that happen with
my future commits ;-).
* add PowerStress module
* nrf52 arduino is built upon freertos, so let platformio debug it
* don't accidentally try to Segger ICE if we are using another ICE
* clean up RedirectablePrint::log so it doesn't have three very different implementations inline.
* remove NoopPrint - it is no longer needed
* when talking to API clients via serial, don't turn off log msgs instead encapsuate them
* fix the build - would loop forever if there were no files to send
* don't use Segger code if not talking to a Segger debugger
* when encapsulating logs, make sure the strings always has nul terminators
* nrf52 soft device will watchdog if you use ICE while BT on...
so have debugger disable bluetooth.
* Important to not print debug messages while writing to the toPhone scratch buffer
* don't include newlines if encapsulating log records as protobufs
* update to latest protobufs (needed for powermon goo)
* PowerStress WIP
* fix linter warning
* MESHTASTIC_EXCLUDE_WIFI and HAS_WIFI cleanup...
Our code was checking HAS_WIFI and the new MESHTASTIC_EXCLUDE_WIFI
flags in various places (even though EXCLUDE_WIFI forces HAS_WIFI
to 0). Instead just check HAS_WIFI, only use EXCLUDE_WIFI inside
configuration.h
* cleanup: use HAS_NETWORKING instead of HAS_WIFI || HAS_ETHERNET
We already had HAS_NETWORKING as flag in MQTT to mean 'we have
tcpip'. Generallize that and move it into configuration.h so that
we can use it elsewhere.
* Use #pragma once, because supported by gcc and all modern compilers
instead of #ifdef DOTHFILE_H etc...
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* New UUID
* New log radio characteristic with LogRecord protobuf
* LogRecord
* Merge derp
* How did you get there
* Trunk
* Fix length
* Remove assert
* clean up RedirectablePrint::log so it doesn't have three very different implementations inline.
* remove NoopPrint - it is no longer needed
* when talking to API clients via serial, don't turn off log msgs instead encapsuate them
* fix the build - would loop forever if there were no files to send
* don't use Segger code if not talking to a Segger debugger
* when encapsulating logs, make sure the strings always has nul terminators
* nrf52 soft device will watchdog if you use ICE while BT on...
so have debugger disable bluetooth.
* Important to not print debug messages while writing to the toPhone scratch buffer
* don't include newlines if encapsulating log records as protobufs
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Move static functions into Screen.h, show compass during calibration
* Move to _fontHeight macro to avoid collision
* Move some alert functions to new alert handler
* Catch missed reboot code
* ESP32 fixes
* Bump esp8266-oled-ssd1306
* Fixes for when a device has no screen
* Use new startAlert(char*) helper class
* Add EINK bits back to alert handling
* Add noop class for no-display devices
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* DAC and DB values based on dBm using interpolation
* Moved getDACandDB funtion
Moved getDACandDB funtion up so it won't conflict with RF95_MAX_POWER
* Added DAC output to LOG_INFO
Added DAC output to LOG_INFO
* Make Trunk Happy
* Send NAK on primary if original packet couldn't be decoded
* Add checks for `isDecoded` when accessing `decoded`
* Channel index should be of original packet, not of newly allocated NAK
REGULATORY_GAIN is the total system gain in dBm to subtract from the configured Tx power, to remain within regulatory ERP limit for non-licensed operators.
This value should be set in variant.h and is PA gain + antenna gain (if system ships with an antenna).
This is similar to antenna_gain/NL80211_ATTR_WIPHY_ANTENNA_GAIN/NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN setting in Linux Regulatory/OpenWrt/mac80211/nl80211/iw.
Signed-off-by: Andrew Yong <me@ndoo.sg>
Add REGULATORY_ prefix to LORA_REGIONCODE to prepare for more regulatory configuration options, and update comment block accordingly too.
Signed-off-by: Andrew Yong <me@ndoo.sg>
* DOES NOT WORK
* trunk
* DOES NOT WORK
* trunk
* DOES NOT WORK
* trunk
* WIP: LR11x0 non functional interface code. Please don't expect a working firmware out of this! I don't know what i am doing! :-)
* trunk fmt
* use canon toolchain
* update and fix radiolib dependency
* Switch Radiolib back to GIT checkout
* enable tcxo and fix startReceive
* progress
* Correct midjudgement on scope of build defines.
* - enable peripheral power rail during startup init
- fix portduino builds
* add tracker pinout variant
* update to radiolib 6.6.0 API (aka: godmode is not for mere mortals)
* tracker is not so 'extra' any more
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
by rearranging the arguments to match the expected input order.
The lwip library makes an internal reorder or the arguments
depending on the netmask to work with both ESP and Arduino
platforms.
The input order was incorrect when running on an rp2040 device.
Co-authored-by: Henrik Witt-Hansen <henrik@hardttoolkit.org>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This seems to fix the ch341 quirk where large packets fail to send. As it can be problematic for other radios, we gate it behind "ch341_quirk" in the config.
* Fix type of nodeNum
Type of nodeNum is NodeNum, not uint
* typo
fixed typo "resumeAdverising()"
* fix missing #include "time.h"
Missing include breaks compilation with gccnoneeabi 12.3.1 for nrf52 targets on windows hosts.
* change type uint to unsigned int
uint is not a standard type. Using uint breaks compilation with gccnoneeabi 12.3.1 for nRF52 targets on windows hosts.
* fix type of channel_num
Type of channel_num should be uint32_t (as this is the type of hash() and numChannels).
Using uint non-standard type uint breaks compilation with gccnoneeabi 12.3.1 for nRF52 targets on windows hosts.
* Update nrf52.ini
Default build type should be "release" as this is the default of platformio.
* Update GPS.cpp
uint to unsigned int
The TW region had now power limit set, so defaulted to 16dBm.
The relevant regulation is section 5.8.1 of the Low-power Radio-frequency Devices Technical Regulations, which notes the limits of 0.5W (27dBM) indoor or coastal, 1.0W (30dBM) outdoor.
This patch updates the power limit to 27dbM, using the the lower limit specified in the regulations to be conservative.
Regulation references:
https://www.ncc.gov.tw/english/files/23070/102_5190_230703_1_doc_C.PDF (latest English version)
https://gazette.nat.gov.tw/egFront/e_detail.do?metaid=147283 (latest Chinese version, February 2024)
* 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.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
The main use case for this will be to create a custom Heltec WiFi LoRa 32 V3 SG_923 variant, which will be pre-flashed and sent for regulatory approval for retail sale.
Signed-off-by: Andrew Yong <me@ndoo.sg>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Use `alterReceivedProtobuf()` for NeighborInfo and Traceroute
`alterReceived()` should never return NULL
Traceroute should be promiscuous
* Remove extensive logging from NeighborInfo module
* Add MaxNodes to Native
* It compiles...
* Convert nodedb to use new
* Closer but still broken.
* Finally working
* Remove unintended lines
* Don't include a pointer
* Capitalization matters.
* avoid rename in protocol regen
* When trimming the nodeDB, start with a cleanup
* Remove extra cleanupMeshDB() call for now
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Adds configuration option to not build/include the webserver.
* Adds configuration option to not build/include the webserver.
* Keep initApiServer when excluding webserver
* fixes for failed formatting check
* Once more with feeling! Fix for regression.
* Fix includes for ARCH_ESP32
* Format changes from trunk
* Merge updates from origin
* Revert "Format changes from trunk"
This reverts commit 436e631774.
* jeez!
* tryfix proto conflict
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* More comprehensive MQTT thread and queue guards
* Consolidate logic
* Remove channel check
* Check for map_reporting_enabled as well
* Update message
* Remove channel check from here as well
* One liner
* Start the mqtt thread back up when channels change and we want mqtt
* Set `hop_start` in header to determine how many hops each packet traveled
* Set hopLimit of response according to hops used by request
* Identify neighbors based on `hopStart` and `hopLimit`
* NeighborInfo: get all packets and assume a default broadcast interval
* Add fail-safe in case node in between is running modified firmware
* Add `viaMQTT` and `hopsAway` to NodeInfo
* Replace `HOP_RELIABLE` with hopStart for repeated packet
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Added WebServer/WebServices for Native Linux Meshtastic and web gui
* Fix bug in login functionality
* Added customized config of portdunio.ini with LovyannGFX from marelab repro
* Compile Problem resolved with developer version of LovyanGFX.git
* Compile against dev version
* Fixes to fit into main branch
* Update variant.h, main.cpp, .gitignore, WebServer.cpp, esp32s2.ini, WebServer.h, ContentHandler.cpp, rp2040.ini, nrf52.ini, ContentHelper.cpp, Dockerfile, ContentHandler.h, esp32.ini, stm32wl5e.ini
* Added linux pi std /usr/include dir
* Adding /usr/innclude for Linux compile against native libs that are not hadled by platformio
* Review log level changes & translation
* Update Dockerfile
* Fix Typo & VFS ref. Part1
* Fix Typo & VFS ref.
* Dev Version for ulfius web lib
* Update platformio.ini
* Free VFS path string
* Remove unintended changes
* More unintentional changes
* Make the HTTP server optional on native
* Tune-up for Native web defaults
* Don't modify build system yet
* Remove more unneeded changes
---------
Co-authored-by: marc hammermann <marchammermann@googlemail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Such that direct message to MQTT node gets published and we get rid of always rebroadcasting when MQTT is enabled
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add debug options for RP2040
* Rename: "observed" should be plural: "observables"
* PhoneAPI: return failure on timeout
In `onNotify()`, when disconnected, PhoneAPI removed itself from the list of observers that was looped through in `notifyObservers()`. We should exit that loop in that case.
* fix: allow MQTT `encryption_enabled` with `json_enabled`
* fix: copy decoded MeshPacket and release memory after use
* fix: use `packetPool` allocCopy and release methods
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Mark packets received via MQTT and add option to ignore them
* Don't send packets received via MQTT back into MQTT
Generate implicit ACK for packets we as an MQTT gateway sent
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>