To enable CSL, it is necessary to get received Enh-ACK timestamp so
that the next sample time could be calculated with this timestamp and
CSL phase in CSL IE.
This commit implements the CSL feature in Thread 1.2.
- Add macro definitions for low power to control the compiling of
source code.
- Add data and methods for running CSL in Mac and SubMac. This mainly
includes setting CSL parameters, starting/stopping CSL, and the
timer handling process.
- Add otPlatTimeGetAPI and implementation.
- Add CSL transmission implementation. CSL transmission is a new kind
of transmission, the related definition and implementaion for the
whole transmitting process is added.
- Add calling of start/stop CSL in certain cases.
- Implement CSL synchronization maintainence. If a CSL cordinator
didn't get a frame containing CSL IE for CSLTimeout, the CSL
receiver is regarded as de-synchronized.
- Add Cli interface for using CSL.
- Implement enhanced Ack with IE. The original code can only generate
auto ack for Imm-Ack. As CSL requires CSL IE included in enhanced
ack. This PR implements it.
- Add basic functional test for CSL transmission. More tests
corresponding to test plan would be added later.
In 802.15.4-2015 spec Table 7-2, it is possible to receive frame with
destination address but without destination PAN ID. This commit
changes the address filter function to avoid dropping such frames.
Use the config specified on the command line, so that overriding this
with a project specific config doesn't cause preprocessor macro
redefinition errors.
Seems the strong otPlatOtnsStatus is not used, but the weak
otPlatOtnsStatus was used in the original code if built by cmake.
This commit fixes this issue. Now both cmake and make builds
correctly.
This option allows to pass Spinel Encrypter library to predefined
Makefiles for different platforms.
Example usage:
make -f examples/Makefile-nrf52840 SPINEL_ENCRYPTER_LIBS=my_encrypter_lib.a
This commit includes:
- Adding compile configurations necessary for MLR features
- Adding source/header files necessary for MLR features
- Send MLR.req for local MAs on ThreadNetif
- At most one MLR.req is outstanding
- Reregistration according to PBBR configuration
- Renewing periods according to PBBR configuration
- BBRs receive MLR.req with minimal processing and send MLR.rsp
- Add a test to verify that MLR.req is sent for local MAs.
This fixes an issue with Channel Monitoring for the EFR32 platform
(MG1, MG12, MG13), where in, turning the radio to a new channel and
immediately gathering background RSSI information was returning
invalid results.
A further investigation with the RAIL team indicated that this issue
was occurring because the usage of `RAIL_GetRssi()` is
incorrect. While the Rail_GetRssi API functions as documented, the
problem is that the current implementation of this API returns valid
results only in certain specified radio states and does not fit the
use case for the OpenThread Channel Monitoring feature. (i.e computing
RSSI value in the RxWarm radio state).
To fix the issue, I am switching the affected platforms to the
efr32mg21 implementation for `otPlatRadioGetRssi()`, which uses
`RAIL_StartAverageRssi()` instead of
`RAIL_GetRssi()`. `RAIL_StartAverageRssi()` uses hardware to trigger
an interrupt once the RSSI is valid and should provide valid results.
This approach was added by Marven when testing DMP support with
OpenThread (https://github.com/openthread/openthread/pull/4321)
When analyzing the energy mode transitions for a sleepy node, running
the sleepy-demo-mtd app, it was observed that, the current
implementation of the platform radio driver (efr32RadioProcess())
although correct, can be optimized by processing the next received
packet (processNextRxPacket()) before other actions being carried out
in this routine. For example, in a situation where a 802.15.4 MAC Ack
needs to be processed in response to a sent packet, adding this call
towards the end of this routine then delays stack notification (that a
Tx was done) until the next call to efr32RadioProcess().
This adds platform support for Silabs EFR32MG1 (series1 Mighty Gecko
with 32K RAM + 64K flash).
A few notes on this commit:
- MG1 cannot fit FTD builds with certain options enabled (like
diagnostics). In testing, I simply removed FTD from build
options. We may want to add this to README
- Most platform files are directly duplicated from MG12
- Only created BRD4151A reference. Suspect Silabs team will want to
add other reference platforms like Thunderboard 1
- Should include latest crypto acceleration changes made by Silabs
team
- This has been tested using RCP and CLI builds both on BRD4151A WSTK
and a custom design based on MG1.
This removes unnecessary open/close calls that were being made when
handling nvm operations.
In a normal mode of operation, the nvm open call should be made only
once during initialization.
The only way these changes could be verified was by building a binary,
flashing it on a node and making sure that the node's network operations
(like forming a network) were okay.
This commit adds transmit security support for simulation radio so
that security Enh-ACK could be handled at radio layer. This commit
also fixes issue #5041.
This commit adds `OPENTHREAD_CONFIG_LOG_MESHCOP` which enable
MeshCoP modules logging. This replaces the use of MLE log config
`OPENTHREAD_CONFIG_LOG_MLE` for controlling MeshCop logging.
The makefiles are also updated to include the new config when
"FULL_LOGS" option is used.
To support CSL on RCP mode, POSIX host needs to know current time on
RCP. This commit adds function to periodically calculate the time
offset between host and RCP so that host can get an estimated RCP time
by adding its current time with this offset.
Detected on EFR32MG21 with hardware acceleration turned on, all inside
mbedTLS' library/ecdsa.c:
* Turning on ECDSA signing acceleration (MBEDTLS_ECDSA_SIGN_ALT)
triggers an unused parameter on rs_ctx in
mbedtls_ecdsa_write_signature_restartable
* Turning on ECDSA verification acceleration
(MBEDTLS_ECDSA_VERIFY_ALT) triggers an unused parameter on rs_ctx in
mbedtls_ecdsa_read_signature_restartable
* Turning on both ECDSA signing & verification acceleration
(MBEDTLS_ECDSA_SIGN_ALT + MBEDTLS_ECDSA_VERIFY_ALT) triggers an
unused function error on static function derive_mpi
Looking at the latest mbed TLS development branch, it seems this issue
will not be resolved soon. Therefore, we're turning off warnings for
unused parameters and unused functions inside mbedTLS for the platform
which uses this configuration (EFR32MG21).
Turns on the following:
* SHA256 acceleration on all EFR32 devices (used for SHA256,
HMAC-SHA256, ECDSA and DRBG)
* ECDSA/ECDH acceleration on EFR32MG21 (used in DTLS and exposed to
application through otCryptoEcdsaSign)
* AES-CCM acceleration on EFR32MG21 (in case OT is updated to take
advantage of mbedTLS' AES-CCM API)
* AES-CMAC acceleration on EFR32MG21 (used for PBKDF2)
Awaiting new GSDK release:
* end-to-end EC-JPAKE acceleration on EFR32MG21 (used in DTLS)
In Thread 1.2, it is possible to receive an IEEE 802.15.4-2015
packet. Per specification, receiver should acknowledge this packet
with an IEEE 802.15.4-2015 ACK(Enh-ACK). This Enh-ACK can include
header IE with it and requires security enabled bit in FCF be set to
true. It is impractical for the host to generate the Enh-ACK and send
to RCP for transmission within AIFS time(192us). So RCP should prepare
the Enh-ACK by itself, which requires it to fill in the frame counter
and do the encryption/authentication.
This commit tries to address the need of filling auxiliary frame
counter in RCP by including the following changes:
- Move frame counter related functions from MAC layer to SubMac layer,
which is mirrored in RCP.
- Set mMacFrameCounter to RCP using newly added spinel properties.
- RCP reports last used frame counter to host in TxDone and RxDone.
- Add a simulation test for reset verification.