Skip to content

Added TCP/IP and Packet Validation Examples#80

Draft
jorgesg82 wants to merge 9 commits intomainfrom
robust-tcpip
Draft

Added TCP/IP and Packet Validation Examples#80
jorgesg82 wants to merge 9 commits intomainfrom
robust-tcpip

Conversation

@jorgesg82
Copy link
Contributor

@jorgesg82 jorgesg82 commented Feb 28, 2026

TCP/IP and Packet Validation Examples

Summary

This PR adds hardware-focused validation flows to the template project for both socket robustness and generated packet parsing.

  • Adds ExampleTCPIP, a full Ethernet stress example covering TCP server/client, UDP traffic, reconnect behavior, bursts, and health telemetry.
  • Adds ExamplePackets, a generated packet/order validation example built on OrderPackets and DataPackets.
  • Adds host-side tooling for automated validation, including stress, quality-gate, soak, and packet-check scripts.
  • Adds tools/build-example.sh to simplify building examples and selecting named TEST_* variants.
  • Expands documentation with per-example guides and deeper TCP/IP testing references.
  • Stops tracking generated packet headers (DataPackets.hpp, OrderPackets.hpp) and documents them as build artifacts.

Impact

This makes the template project much more usable as a hardware validation base: examples are easier to build, Ethernet behavior is easier to stress automatically, and generated packet parsing can be verified end-to-end against the active schema.

Validation

Validated with a Nucleo Development Board using repeated TCP/UDP stress runs, packet parsing checks, reconnect scenarios, and long-duration soak workflows (yes, thanks to Chatty to create those scripts)

Notes

Yes, I also made the fix of the fix of the fix of the fix of the fix of the fix of the fix of the fix "a puntito de caramelo" "ahora si que si chicos" "esta va confiar" "esta es la definitva" "3.0" @Cantonplas
The Packet generator is now parsing properly the int types, not only de uints

@jorgesg82 jorgesg82 requested a review from Copilot February 28, 2026 12:47
@jorgesg82 jorgesg82 self-assigned this Feb 28, 2026
@jorgesg82 jorgesg82 marked this pull request as draft February 28, 2026 12:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds hardware-focused TCP/IP stress testing and generated packet/order validation examples, plus host-side automation scripts and documentation, to make the template project a more complete hardware validation base.

Changes:

  • Introduces ExampleTCPIP (firmware) and a host-side Python stress harness with quality-gate/soak runners.
  • Introduces ExamplePackets (firmware) and a host-side checker driven by the active JSON packet schema.
  • Adds tools/build-example.sh, expands docs, and gitignores generated packet headers.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tools/run_example_tcpip_stress.sh Wrapper to run the TCP/IP stress harness from repo root.
tools/run_example_tcpip_nucleo.sh End-to-end build/flash/ping/gate runner for Nucleo Ethernet.
tools/example_tcpip_stress.py Host-side TCP/UDP stress + validation harness for ExampleTCPIP.
tools/example_tcpip_soak_hours.sh Multi-hour soak wrapper with pass-ratio summary.
tools/example_tcpip_soak.sh Repeated stress-run soak engine with per-run logs.
tools/example_tcpip_quality_gate.sh Strict base/aggressive run matrix and log capture.
tools/example_packets_check.py Host-side schema-driven TCP/UDP parsing validator for ExamplePackets.
tools/build-example.sh Helper to build named examples and select TEST_* variants.
docs/template-project/testing.md Adds pointers to TCP/IP stress + packet validation flows.
docs/template-project/tcpip-change-manual.md Deep-dive manual describing TCP/IP robustness changes and tooling.
docs/template-project/example-tcpip.md Detailed guide for building/running/validating ExampleTCPIP.
docs/template-project/build-debug.md Documents generated packet headers as build artifacts.
docs/examples/example-tcpip.md Quick per-example guide for ExampleTCPIP.
docs/examples/example-packets.md Quick per-example guide for ExamplePackets + schema dependency notes.
docs/examples/example-mpu.md Adds/updates MPU example guide content.
docs/examples/example-linear-sensor-characterization.md Documents schema incompatibility and how to restore/build the example.
docs/examples/example-hardfault.md Adds hardfault example guide content.
docs/examples/example-exti.md Adds EXTI example guide content.
docs/examples/example-ethernet.md Adds Ethernet bring-up example guide content.
docs/examples/example-adc.md Adds ADC example guide content.
docs/examples/README.md New index and workflow notes for all examples.
deps/ST-LIB Updates ST-LIB submodule to include TCP/IP robustness changes.
README.md Adds links to per-example docs and notes about generated headers.
Core/Src/main.cpp Switches default main guard to EXAMPLE_SELECTED.
Core/Src/Examples/ExampleTCPIP.cpp Adds ExampleTCPIP firmware stress/telemetry example.
Core/Src/Examples/ExamplePackets.cpp Adds ExamplePackets firmware schema-validation example.
Core/Inc/Code_generation/Packet_generation/Packet_descriptions.py Extends numeric type correction for signed/unsigned ints.
Core/Inc/Code_generation/JSON_ADE Updates JSON_ADE submodule to match new packet example/schema.
CMakeLists.txt Changes default BOARD_NAME, tracks generator deps, and provides EXAMPLE_SELECTED.
.gitignore Stops tracking generated packet headers as source.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants