Some commands have been renamed since version 1.9.0 and 1.10.0.
To still provide compatibility with older debuggers, allow one to
override the firmware version assumed. A dependency for packaging
was added for comparing version numbers.
The tool would always exit if no probes are detected, even if `--port`
was provided. By making this assertion conditional, it becomes
possible to override the port in any case.
Use cases for this is running the BMP externally, and connecto to it
via ser2net, for example.
Per conventions:
- Put main code in a function.
- Move argument parsing to separate function to not pollute global
scope. This does mean that all invocations now need `args` as an
additional argument.
Python 3.12 removed the `distutils` package, which is only used for
checking if GDB is available on PATH.
The `shutil.which` method does the same, and is available since
Python 3.3.
Since https://github.com/RIOT-OS/RIOT/pull/21012 a netdev in the new API
can return > 0 directly in netdev_driver_t::send() to indicate the
driver is naturally synchronous and has already completed the
transmission.
The adaption of lwIP to that API change contained a bug: It handled the
case after the thread is already blocked waiting for the signal that
is never going to arrive. This is now fixed.
When module `nanocoap_server_separate` is not used, the functions to
send separate responses are still provided, just in a broken version:
They will send the separate replies from a different endpoint than the
request was received at (even on machines with only one IP address, as
also the source port is randomized).
This changes the behavior to only provide the functions for separate
response when the do work, so that others will detect an invalid
configuration at compile time rather than at run time.
The documentation is duly updated.
An RST message has no token, so don't reply with a token when sending
RST.
This also adds unit tests to ensure this this exact bug does not sneak
back in.
This adds the client_token shell command that allows to specify the
CoAP Token. This is particularly useful to test extended length Tokens,
as enabled with module `nanocoap_token_ext`.
Co-authored-by: benpicco <benpicco@googlemail.com>
When RFC 8974 support (module `nanocoap_token_ext`) is in use, the
request token may be longer than the buffer in the separate response
context is large. This adds a check to not overflow the buffer.
Sadly, this is an API change: Preparing the separate response context
can actually fail, so we need to report this with a return value.
The example application has been adapted to only proceed if the separate
reply context could have been prepared, and rather directly emit a
reset message if the token exceeds the static buffer.
Co-authored-by: benpicco <benpicco@googlemail.com>