commits
* Rename some examples to have a tcp suffix in preparation for adding udp implementations.
* First cut of tokio udp pair.
* Add some trace logging for when the storage is full.
* without this, the error gets thrown away and results in a 'NoRoute' error being returned from the `broadcast` method.
* Add some trace logging when errors occur in the send methods (raw/borrowed/typed).
* Display packet rate statistics in the `yeet_listener`.
* this was added in order to try and find the limitations of the connection between an H743 and a desktop machine.
* Use `error!` for actual errors. Use a result return type for `broadcast` arguments. Don't report routing errors as errors (use debug level). When routing errors occur when broadcasting, don't return an error `NoRoute` error.
* this allows errors to be reported without requiring trace level logging to be enabled.
* if `NoRoute` is really required upstream from broadcast when routing errors occur, the approach can be re-visited.
* Use `RoutingLoop` error when the only interface is the origin.
* This allows actual errors to be reported, while ignoring the routing loop errors, e.g. when sending broadcast messages.
* Add a TODO regarding use of remote_address in the tokio UDP implementation.
* Add support for a tokio UDP direct router.
* Fix unused import warning.
* Use framed rather than cobs.
* Fix typo in demo crate name.
* Add logging and device discovery to ergot-bridge-pair-udp.
* log sink on the target.
* log service and discovery on the controller.
* Update the tokio-udp router to use framed instead of cobs.
* Show the error kind in warnings.
* Format with `rustc 1.91.0 (f8297e351 2025-10-28)`
* using `fmtall.sh`
* the use-case is where you need to request that a unicast message is sent to a specific port on the source address. sending unicast messages requires a complete address, but in `serve` the source address is not available. with `serve_full` the source address is in the header; so an address for unicasting can be constructed from the source address but with the port substituted by the port in the message `T`.
* Add a NucleoH743ZI blinky demo.
* Add a NucleoH723ZG blinky demo.
* Initial Embassy NET UDP support.
* NucleoH743ZI embassy net udp demos.
* NucleoH723ZG embassy net udp demos.
* Change embassy udp implementation to use framed consumer/producer instead of streamed.
* tested with h723 controller <-> h743 target and h743 controller <-> h723 target.
* Fix clippy warnings 1
log macros that use the internal ergot logger
this is needed to not conflict with std applications that don't need
embassy-time, which is needed only by the embassy-usb-v0_5 interface
implementation
* run discovery on a set interval.
* don't abort and restart discovery when another future finishes before discovery.
* sync the interval and timeouts of the two `do_discovery` methods.
* run discovery, then wait for the interval, instead of the other way around.
* Select defmt or log at compile time for some logging. Use defmt and log compatible formatting.
* Log formatting changes to fix CI lints.
* Don't use defmt when both 'defmt-v1' and 'std' features are enabled.
* is this really a supported configuration?
* Bump embassy dependencies on demo apps
Bump embassy dependencie on demo apps to their latest. We're also
leaving ESP32 alone for now as it won't compile with latest
embassy-executor.
* esp32c3-serial: fix RxWorker instantiation
The constructor is `new_target()` fix it to get the demo to compile.
* Add esp32c3 to checkall.sh
Also build esp32c3 with checkall.sh otherwise regressions may be
missed.
* Add esp32c3 to build-demos-nostd workflow
Build esp32c3 in CI too.
Bump embassy dependencies such that we can use the latest
embassy-executor and embassy-time crates. Along the way, embassy-usb
v0.4 support is dropped.
Inspired by a similar PR on `postcard-rpc`.
Signed-off-by: Haobo Gu <haobogu@outlook.com>
* add microbit-null demo
* add microbit demo to CI and scripts
* Prep for v0.11 release
* Update deps
fixes a regression in #134
A retooling of how we use headers in `send_raw` operations. Major changes:
* `NetStack::send_raw` now takes `HeaderSeq` instead of `Header`
* `NetStack::send_raw` no longer takes `hdr_raw`, as well as many other parts of the system
* Reduce usage of `CommonHeader` and `AnyAllAppendix`, instead using `HeaderSeq` more consistently
* Headers are now generally re-serialized down at the InterfaceSink level, so they don't need to be re-encoded more than once.
Originally, the idea behind passing around `hdr_raw` was to avoid cases where profiles/interfaces or borrowed sockets would need to re-serialize the header when forwarding. However, there are places in the code where the header may be modified, particularly for broadcast flooding, or even for updating the TTL count when forwarding, meaning that the serialized and in-memory versions could get out of sync with each other.
To avoid this, we no longer pass around the "raw" header, and just demand it is re-serialized when necessary. This is actually likely not very burdensome at all, as the max header size is 28 bytes, which should be trivial to do.
* Add a method that lets you set the rx worker to "controller" mode
This isn't a great fix, but fine for now. We should revisit this.
* Clean things up a bit, make separate target/controller constructors
* Add Display impl for Address and Header, use in logging
* Consistent spacing
* Add method to access socket headers
* Add Socket Query topic
* Add seed router service
* Add (std) socket discovery service
* cargo fmt
* Cleanup after a checkall
* Discovery and bridge assignment work :D
* Write some docs
* Teach DirectRouter how to be a seed router
* Add docs, don't allow sends to tombstoned routes
* Introduce the concept of separate routes and netids
* Rename "Edge Interface Plus"
* Remove some outdated checks for DirectRouter
* Start plumbing interface ID of source
* More plumbing
* More plumbing
* Fork off DirectEdge, so DirectRouter is not using the real DirectEdge anymore.
* Check destination to avoid reporting Routing Loop
* Update test
* Switch to MCU time instead of IMU time
This is because the IMU time rolls over every 24 bits, which
happens somewhat regularly, while MCU time basically never
rolls over, and has a 1us resolution
* Hmmmm
* More putzing, but lifetimes are still sad
* Get demo working
* Restore the lifetime of the socket in the sockethandle
* Some cleanup and docs
* Add some safety comments
* Add test to get miri's opinion about these changes.
* Fix broken readme links
* fix links for licenses
* Add first demo to visualize ergot stream with simulated data
* add a screenshot to readme
* draw plot on every update (even if no data in channel)
* Add real data
* add possibility to use either simulated or ergot stream
* add data stats, yield sim data every 1us
data rate is in reality slower, but we await now 1us to next data point.
* borrow slices for plotting
* polish the gui
* cleanup and fmt
* update lock file
---------
Co-authored-by: James Munns <james@onevariable.com>
* Initial work, not *great*, but nominally works
* Clean up a bit
* Ensure it works on embedded
* Re-organize general log items
* Move to logger folder
* Iterate on the log interface, get it ready to switch the internals over
* Collapse tokio-tcp and embedded-io-async's RX workers
* Remove a closure
* Turns out we can replace the eusb handlers too!
* First step towards a conformance tester
* Work work work
* Flesh out conformance docs/tests a bit
* Generate smaller and named test cases
* stm32f3discovery_examples
* cleanup unused deps
* button example
* heapless strings in service discovery to avoid doing too many hacks
* use new postcard-schema release and smol fixes from james
* tests pass
* whoopie
randomized layout miri test
* Add device discovery endpoint
* Add discovery operations
* Add test, but requires hacks
* Document hax
* Flesh out test a bit, fmt
* Fix some gaps in edge-router that led to dropped packets
This PR splits the "tokio-std" feature into "std", which isn't tokio-dependent, and "tokio-std", which is, and depends on the "std" feature.
There are sockets that are not tokio-specific, which makes the distinction more clear.
Make some tweaks to the log service
Pushing onward after #85, this also adds a proxy type for topics and endpoints as well
* Rename some examples to have a tcp suffix in preparation for adding udp implementations.
* First cut of tokio udp pair.
* Add some trace logging for when the storage is full.
* without this, the error gets thrown away and results in a 'NoRoute' error being returned from the `broadcast` method.
* Add some trace logging when errors occur in the send methods (raw/borrowed/typed).
* Display packet rate statistics in the `yeet_listener`.
* this was added in order to try and find the limitations of the connection between an H743 and a desktop machine.
* Use `error!` for actual errors. Use a result return type for `broadcast` arguments. Don't report routing errors as errors (use debug level). When routing errors occur when broadcasting, don't return an error `NoRoute` error.
* this allows errors to be reported without requiring trace level logging to be enabled.
* if `NoRoute` is really required upstream from broadcast when routing errors occur, the approach can be re-visited.
* Use `RoutingLoop` error when the only interface is the origin.
* This allows actual errors to be reported, while ignoring the routing loop errors, e.g. when sending broadcast messages.
* Add a TODO regarding use of remote_address in the tokio UDP implementation.
* Add support for a tokio UDP direct router.
* Fix unused import warning.
* Use framed rather than cobs.
* Fix typo in demo crate name.
* Add logging and device discovery to ergot-bridge-pair-udp.
* log sink on the target.
* log service and discovery on the controller.
* Update the tokio-udp router to use framed instead of cobs.
* Show the error kind in warnings.
* Format with `rustc 1.91.0 (f8297e351 2025-10-28)`
* using `fmtall.sh`
* the use-case is where you need to request that a unicast message is sent to a specific port on the source address. sending unicast messages requires a complete address, but in `serve` the source address is not available. with `serve_full` the source address is in the header; so an address for unicasting can be constructed from the source address but with the port substituted by the port in the message `T`.
* Add a NucleoH743ZI blinky demo.
* Add a NucleoH723ZG blinky demo.
* Initial Embassy NET UDP support.
* NucleoH743ZI embassy net udp demos.
* NucleoH723ZG embassy net udp demos.
* Change embassy udp implementation to use framed consumer/producer instead of streamed.
* tested with h723 controller <-> h743 target and h743 controller <-> h723 target.
* Fix clippy warnings 1
* Bump embassy dependencies on demo apps
Bump embassy dependencie on demo apps to their latest. We're also
leaving ESP32 alone for now as it won't compile with latest
embassy-executor.
* esp32c3-serial: fix RxWorker instantiation
The constructor is `new_target()` fix it to get the demo to compile.
* Add esp32c3 to checkall.sh
Also build esp32c3 with checkall.sh otherwise regressions may be
missed.
* Add esp32c3 to build-demos-nostd workflow
Build esp32c3 in CI too.
A retooling of how we use headers in `send_raw` operations. Major changes:
* `NetStack::send_raw` now takes `HeaderSeq` instead of `Header`
* `NetStack::send_raw` no longer takes `hdr_raw`, as well as many other parts of the system
* Reduce usage of `CommonHeader` and `AnyAllAppendix`, instead using `HeaderSeq` more consistently
* Headers are now generally re-serialized down at the InterfaceSink level, so they don't need to be re-encoded more than once.
Originally, the idea behind passing around `hdr_raw` was to avoid cases where profiles/interfaces or borrowed sockets would need to re-serialize the header when forwarding. However, there are places in the code where the header may be modified, particularly for broadcast flooding, or even for updating the TTL count when forwarding, meaning that the serialized and in-memory versions could get out of sync with each other.
To avoid this, we no longer pass around the "raw" header, and just demand it is re-serialized when necessary. This is actually likely not very burdensome at all, as the max header size is 28 bytes, which should be trivial to do.
* Switch to MCU time instead of IMU time
This is because the IMU time rolls over every 24 bits, which
happens somewhat regularly, while MCU time basically never
rolls over, and has a 1us resolution
* Hmmmm
* More putzing, but lifetimes are still sad
* Get demo working
* Restore the lifetime of the socket in the sockethandle
* Some cleanup and docs
* Add some safety comments
* Add test to get miri's opinion about these changes.
* Add first demo to visualize ergot stream with simulated data
* add a screenshot to readme
* draw plot on every update (even if no data in channel)
* Add real data
* add possibility to use either simulated or ergot stream
* add data stats, yield sim data every 1us
data rate is in reality slower, but we await now 1us to next data point.
* borrow slices for plotting
* polish the gui
* cleanup and fmt
* update lock file
---------
Co-authored-by: James Munns <james@onevariable.com>