This commit adds support to simulate Thread radio over IPv6.
With this commit, a simulation will be simulated over either IPv6 or IPv4.
If it's simulated on IPv6, it communicates with other simulation nodes
in IPv6 group `ff02::116`. And if it's simulated on IPv4, it communicates
with other simulation nodes in IPv4 group `224.0.0.116`.
Note that simulating virtual time is not included in this commit.
This commit allows developers to set the preferred channel mask and
the supported channel mask in the configuration file. The posix
platform selects channel masks from the configuration file based on
the region code when the region code is updated.
According to Thread 1.3.0 Section 4.7.1.3, router synchronization
after reset requires the multicast link request message to be
retransmitted until a response is received, or the maximum
transmission limit has been reached. If the router was a leader or had
more than 5 children prior to reset, it MUST be retransmitted as a
critical message. Each multicast retransmission of an MLE Message on a
TL1 or TL2 Link must be delayed by MLE_MULTICAST_RETRANSMISSION_DELAY
multiplied by a random value between 0.9 and 1.1 with a resolution of
at least 1 ms.
This commit implements the above requirement. With this requirement,
in the cases when a router is reset and there is no other router to
respond to the link request then it takes longer time for the router
to join thread network. Thus some test cases are modified to allow
longer router sync time in such cases.
This commit disallows concurrent commands.
With this commit, the CLI only execute a new command after it complete
the previous command. CLI can also prompt properly after the command
execution is done.
Other fixes and enhancements:
- Fixes premature command prompt
- Add ping async command for ping in async mode: output Done
immediately but print ping responses later on.
- Fixes networkdiagnostic get outputs multiple Done by always waiting
for 5 seconds.
This commit adds APIs to get Link/Realm Local All Thread Nodes
multicast addresses. This commit also adds cli command to get
meshlocal prefix alone for writing tests.
This commit enables expect tests on macOS, also includes the following
required changes:
* Fixed bound to interface issue on macOS.
* Added ability to configure scan period, because macOS environment on
GitHub Actions is much slower.
Expect sometimes matches the pattern before a line is fully printed to
TTY. As a result, the address returned may not be accurate. This commit
fixes this issue by matching line breaks.
When initializing, we should use randomly generated network parameters
instead of default ones, to eliminate the possibility of unintentional
use of default credentials.
This commit ensures each node create its own profile data, so that they
can be merged after tests to produce more accurate profile data.
This commit also prints the coverage data of message.cpp after all
profile data are merged.
This commit enables the feature IPV6_MULTICAST_LOOP into OpenThread IPv6
stack. The default-enabled feature allows a node receives a multicast
message sent by its own.
This commit adds support joiner discerner in CLI. The format of joiner
discerner is `number/length`. For example `0xabc/12` means the discerner
value is `0xabc` and the length is `12`.
This moves all settings of timeout to one place. Also changes the
default timeout to 10 seconds, can probably solve the occasional
timeout when dataset commit active.
This commit tries to reduce expects fails in GitHub actions:
- wait_for only sends command when it's not empty
- increases the default expect timeout from 1s to 3s.
This makes expect run all cli-*.exp and posix-*.exp tests in RCP mode.
New scripts should use the function spawn_node in _common.exp to spawn
new processes. This is compatible with both simulation mode and RCP
mode.
This puts the scripts setting up Thread networks into separate files
so that they can be reused by multiple test scripts. After this we can
split the tests in cli-2-nodes.exp into multiple files without having
to repeat codes in each file.