Add firmware log event support and update trace payloads - #24
Open
usrflo wants to merge 24 commits into
Open
Conversation
Co-authored-by: Copilot <copilot@github.com>
…fixed notifyTxComplete Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
- Introduced `SendChannelTextMessageWithCorridor` command for corridor-scoped message delivery. - Added `corridor` field to `ChannelMessageConfig` for specifying geo-corridor triples. - Implemented geographic position fields in node configurations for corridor checks. - Updated protocol constants and added new properties for corridor configuration. - Created example behaviors and topologies to demonstrate corridor-scoped message forwarding. - Enhanced tests to validate corridor-based message delivery and repeater behavior.
- Introduced `max_resend_attempts` field in NodeConfig, RepeaterConfig, CompanionConfig, and RoomServerConfig to control firmware-level resend attempts per packet. - Updated default values and added methods to set max resend attempts in respective structs. - Enhanced simulation building to incorporate max resend attempts from YAML configurations. - Added a new example topology demonstrating the impact of resend attempts in an 8-hop chain scenario.
- Introduced `path_warmup_count` to control the number of uncounted warmup DMs sent before the main session. - Updated `Agent` state machine to manage warmup DMs and their ACKs. - Enhanced metrics tracking to differentiate between warmup and counted DMs. - Modified example behaviors and topologies to demonstrate the new warmup functionality.
Added simulation support for repeated sending and the corridor approach
- Introduced TraceConfig struct for configuring TRACE sending behavior. - Updated AgentConfig to include TRACE configuration. - Implemented TRACE state machine in Agent for sending and handling TRACE packets. - Added properties for TRACE configuration in the model, including enabling, startup timing, and message limits. - Created example YAML files for TRACE stress testing and retry scenarios. - Enhanced existing properties and registry to support TRACE functionality.
…Core dev branch plus experimental features by usrflo
The sim shims (simulator/*/sim_main.cpp) assigned `prefs->max_resend_attempts` unconditionally, coupling mcsim to a firmware field that only exists on pr-2670 branches. Building against firmware branches lacking the field (e.g. dev / bugfix/login-msg-timer) failed with "no member named 'max_resend_attempts' in 'NodePrefs'". Feature-detect the field in build.rs (grep CommonCLI.h and companion_radio/NodePrefs.h) and define SIM_FW_HAS_MAX_RESEND_ATTEMPTS only when present; wrap the shim assignment in #ifdef so it is skipped on firmwares without the field. Also define MESH_DEBUG=1 in the build so firmware DEBUG prints on any branch via the existing `#if MESH_DEBUG && ARDUINO` path, instead of requiring a firmware-side `|| defined(MESHCORE_SIMULATOR)` debug guard. mcsim now builds+runs against both ufo/pr-2670 and branches without it.
- Introduced `LoginConfig` struct for server login behavior. - Updated `AgentConfig` to include login configuration. - Implemented login state machine in the agent for handling login attempts. - Added properties for login configuration in the properties module. - Created example YAML files for login behavior and topology.
- Introduced `app_clock_offset_secs` in `AgentConfig` to model clock divergence. - Updated message timestamp generation to incorporate app clock offset. - Added new property `AGENT_APP_CLOCK_OFFSET_S` for configuration. - Enhanced example behaviors to demonstrate app clock divergence handling.
- Introduced `login_repro_2hop_noresend.yaml` and `login_repro_noresend.yaml` to test scenarios with repeated sending disabled. - Added `retry_showcase_dus.yaml` to simulate an 11-repeater, 12-hop path in Düsseldorf, reflecting real-world conditions. - Created `swarm_relay.yaml` and `swarm_relay_5hop.yaml` to demonstrate neighbour-swarm relay mechanics, enhancing packet delivery through opportunistic relaying. - Updated `sim_api.h` and `sim_radio.h` to support new swarm relay features, including SNR thresholds and flood suppression parameters. - Enhanced `sim_main.cpp` to configure swarm relay and flood suppression settings based on simulation parameters.
… SPIFFS compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI added a firmware log event so DEBUG output is merged into the JSON log output.
This way I can see output like the following that I didn't expect or wasn't aware of so far.
The trace output would have revealed this as well but filtering the JSON output can be done better.
1 line needs to be patched in Meshcore.h, see the modification in the patch file.
I worked on Linux but should be re-checked on Windows IMHO.