This commit updates the MLE attach process so that in the first attach
cycle device tries a total of six MLE Parent Requests, the first two
to routers only followed by four to routers and REEDs. For example,
the six Parent Request message will be used before device can decide
to act the leader. An MTD in the next attach attempt (if cannot find a
parent in first attempt cycle), will go to the model of two Parent
Requests (first to routers, then to routers/REEDs).
This change impacts the time it takes for a device to start as leader
(due to increased number of Parent Request and wait time). This commit
updates different test scripts to address the change in the wait
time. It adds a new `config.LEADER_STARTUP_DELAY` constants which is
used for wait time for leader to start.
Adding support for 1.3 style border router configurations which are
different from the 1.2 style border router configurations. The
'device capabilities' is used to differentiate between these 2 device
types to assign them their needed configuration parameters.
Also moving restartAgentService to the proper class.
A BR with `BORDER_ROUTING` feature may add OMR prefix and external
routes to the network data when Thread is started. The network data
changes may incur additional Thread communications that may interfere
with certification traffic.
This commit enhances THCI to wait for the network data to stabilize
after the BR is started.
A device sends a multicast Link Request message after becoming a
router to quickly and efficiently establish links with neighboring
routers. However, sending a Link Request too quickly can fail in cases
where the neighboring router(s) have not yet received the updated
Router ID set from the Leader.
This commit delays sending the Link Request to allow time for
neighboring routers to receive the updated Router ID from the Leader.
Return different output of `ValidateDeviceFirmware` depending on the
device's capabilities. This allows to have a single THCI file for the
same vendor for different device's versions.
Remove excesive logging redundancy:
- `API` decorator is enough to show test script calls with arguments
- `__executeCommand` already prints all OT commands and arguments
- Command timestamp is irrelevant in most cases
- Some extra detail logging lines are left commented in case they
are needed for some debugging
As a result test logs are much easier to follow and resulting files
are much smaller.
Test L5.3.5 is failing sometimes because there are unwanted data
requests during the second ping round. This can be mitigated by
finishing earlier with this round so there is no need for children
to synchronize CSL.
This commit implements new logging model in OpenThread. Each core
module can specify its own module name using `RegisterLogModule()`.
The registered log module name is then included in the all the log
messages emitted from the specific file. This model replaces and
enhances the log region model.
THCI used to catch Exceptions and print errors using
`ModuleHelper.WriteIntoDebugLogger`. However, in most of time it just
help hide the actual issue and make it harder to debug.
Re-raising the exceptions should be a better approach:
- @API decorator will print the full exception Traceback via
`ModuleHelper.WriteIntoDebugLogger` and then re-raise.
- THCI changes for bbr reset procedure to make a better effort to
reset and to also make sure to restart the otbr-agent prior to
attempting a factoryreset to cover the case where the agent cannot
currently communicate to the rcp.
- THCI change to move from sudo service restart otbr-agent to sudo
systemctl restart otbr-agent, which is more comprehensive.
- THCI changes for multicast to use ipmaddr in both soc and bbr cases.
During running T.1.1 tests with the T.1.2 capable sample it turned out
that 9.2.4 commissioner TC is not working when using the device that
is T.1.2 capable. The reason is that in MGMT_ACTIVE_SET
listSecurityPolicy list has only two elements and we are entering the
code, where we assume it is three element, which raises IndexError.
Previous approach with `dig` was not enough because it was only
parsing one mDNS response and not taking account that the response
could be from an inactive Border Router.
Use Python Zeroconf to properly parse all services.
In some cases the first element from the output from __executeCommand
might be empty line, which casues command failures like on below
trace:
__executeCommand('extaddr',) returns ['', '166e0a0000000001', '', 'Done']
FUNC getMAC failed: invalid literal for int() with base 16: ''
This commit filters out empty string from the result of
__executeCommand.
When the GRL starts, it calls initialize() reset() method on each
device. Reset method call fails due to missing (uninitialized)
attribute `isPowerDown`.
Some certification tests are failing because otbr-agent service is not
started back after calling powerDown (isPowerDown flag is kept False
and reset function fails on checking thread state - since the service
is stopped, we can't return status).
Also minor fixes for printing logs, disabling paramiko DEBUG level.
Avoid parsing responses for not expected cases.
Fixes some issues with Thread 1.2 certification test cases in which
it's not required to parse the mDNS response.
Some certification tests are failing because not enough delay is
applied after a Linux ping command is sent and the capture misses the
ICMP transaction.
Also removing unneeded check for Thread 1.2 harness version when
reconnecting to the serial port after a reset.