Commit Graph

2896 Commits

Author SHA1 Message Date
Jonathan Hui 8a037c8aa5 [travis] add build checks for qpg6095 platform (#3567) 2019-02-08 08:41:47 -08:00
Łukasz Duda 070fd834e8 [nrf52811] add support for nRF52811 platform (#3566) 2019-02-08 08:41:22 -08:00
Jonathan Hui 46d0b62ec7 [travis] move platform builds to common functions (#3562) 2019-02-07 08:44:40 -08:00
RaKu bfe0c492d9 [nrf52840] disable compilation of unused transports (#3561)
Add DISABLE_TRANSPORTS switch which disables build of all transports and examples using them.
Disable compilation of USB and UART transports if NCP_SPI switch is set. This also disables
the build of CLI example.
2019-02-07 08:42:27 -08:00
Abtin Keshavarzian f01e3f34e5 [mac] always emit OT_CHANGED_THREAD_CHANNEL on channel change (#3560) 2019-02-06 08:42:53 -08:00
Abtin Keshavarzian f31f8c1f3c [link-raw] handle get/set channel when LinkRaw is enabled (#3559)
This commit updates `otLinkGetChannel()` and `otLinkSetChannel()`
to handle the situation where raw-link mode is enabled.
2019-02-06 08:42:37 -08:00
Abtin Keshavarzian bd4ca8113d [ncp] add support for getting MLE counters (#3558)
A new spinel property `SPINEL_PROP_CNTR_MLE_COUNTERS` is defined,
which can be used to get Thread MLE counters (`otMleCounters`).
2019-02-06 08:41:50 -08:00
Jonathan Hui 3070948ec5 [travis] enhance samr21 build checks (#3556)
- enable gcc 7 and 8 build checks
- upgrade to asf-standalone-archive-3.45.0.85
2019-02-06 08:40:54 -08:00
Abtin Keshavarzian d2e9bdfca3 [notifier] auto-register callback from its constructor (#3555)
This commit helps simplify the implementation and use of `Notifier`
by having the `Callback` constructor registering the callback with
the `Notifier`.
2019-02-04 21:51:41 -08:00
Abtin Keshavarzian ede320712e [mle] use IsAttached() to start border agent (#3554) 2019-02-04 21:08:11 -08:00
Abtin Keshavarzian ab871b5025 [mle] skip saving network info on role change to detached (#3553)
This commit changes the behavior of `Mle` to skip the saving of
network info (to non-volatile memory) on role change to detached. Note
that `Store()` does only update the MAC/MLE counters if device is not
attached. The MAC/MLE counters update is tracked already by
`KeyManager`.
2019-02-04 21:07:54 -08:00
Abtin Keshavarzian e990ede832 [settings] skip non-volatile save with same NetworkInfo/ParentInfo (#3552)
This commit adds new check in `settings.cpp` for saving of
`NetworkInfo` and `ParentInfo` in non-volatile memory to verify that
the new value is different from previously saved content. This reduces
number of writes after a device reboot.
2019-02-04 21:06:22 -08:00
Abtin Keshavarzian 7698c21020 [mle] use local ref to KeyManager/Mac/MleRouter for reused objects in methods (#3551) 2019-02-04 21:05:53 -08:00
Abtin Keshavarzian 29d637683f [settings-flash] ensure SETTINGS_CONFIG_PAGE_NUM >=2 (#3416)
This commit adds code to ensure `SETTINGS_CONFIG_PAGE_NUM` is at
least two. This helps simplify the code and also address
Coverity warnings for unreachable code.
2019-02-04 20:46:23 -08:00
Oleksandr Grytsov c31ab99080 [samr21] Define SETTINGS_CONFIG_PAGE_NAME with const (#3491)
Currently SETTINGS_CONFIG_PAGE_NAME is defined indirectly by addresses of
__d_nv_mem_start and __d_nv_mem_end. But such definition doesn't allow to
perform compile time sanity check. Define this macro with const value 16.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov e7a6bde56d [samr21] Implement otPlatLog for SAMR21 XPLAINED PRO board (#3491)
Use EDBG DGI SPI interface to put log.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov 513b0f8b8d [samr21] Pass ack frame to otPlatRadioTxDone (#3491)
SAMR21 RF doesn't provide ACK frame payload. Create it manually and pass to
otPlatRadioTxDone.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov cf7b57a5cf [samr21] Set RF state to OT_RADIO_STATE_RECEIVE on tx finished (#3491)
OT doesn't always call otPlatRadioReceive to set rx state explicitly. It
causes RF is in wrong state in some cases. SAMR21 RF is switched to
rx state internally when tx is finished and OT platform radio state should
be updated accordingly. This fix is set sState to OT_RADIO_STATE_RECEIVE
when tx is done.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov f304177726 [samr21] Add hardware acceleration for the AES block cipher (#3491)
samr21 has HW aes-128 module. It couldn't be used before as mbedtls uses
256 bit random generator. Recently mbedtls introduces
MBEDTLS_CTR_DRBG_USE_128_BIT_KEY flag which makes mbedtls to use 128 bit
random generator. It limits the security of generated keys but allows
to use HW aes-128 module for encrypt/decrypt 802.15.4 frames.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov 0073a49dbd [samr21] Update README.md to latest ASF 3.45.0 (#3491)
* update reference to ASF 3.45.0 and gcc 7.3.1
* update other links

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov c4a7e8570d [samr21] Add possibility to define board with command line (#3491)
By default Makefile-samr21 builds for SAM R21 Xplained Pro board. Another
board can be specified with BOARD variable through command line:

    make -f examples/Makefile-samr21 BOARD=<TARGET_BOARD>

Currently supported following boards: SAMR21_XPLAINED_PRO,
SAMR21G18_MODULE, SAMR21B18_MODULE.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov 9fee87c071 [samr21] Remove memcpy from otPlatRadioTransmit (#3491)
samr21 rf driver requires that first byte of transmit buffer should be
psdu length. The psdu was copied to a local buffer with one byte shift then
the local buffer was passed to rf driver. This copying is removed by
extending length of sTransmitPsdu by 1 byte and use &sTransmitPsdu[1] as
transmit frame psdu.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Oleksandr Grytsov 68d527a530 [samr21] Fix compilation issue with gcc 7.3.1 (#3491)
Internal compiler.h defines __always_inline macro and includes cdefs.h
indirectly. cdefs.h also defines this macro. As result we have redefined
macro error which can't be suppressed. The fix is to use custom compiler.h
which is copy of ASF compiler.h bu defines __always_inline only if it is
not yet defined.

Signed-off-by: Oleksandr Grytsov <al1img@gmail.com>
2019-02-04 18:24:37 -08:00
Jeffrey Hayes 2c866feb48 [efr32] random number generation fix (#3367) 2019-02-04 15:59:18 -08:00
Markov Vladislav 28cf269481 [topology] add static assertion to exclude counter overflow (#3550) 2019-02-04 10:53:09 -08:00
Jonathan Hui 362f97df1e [fuzz] return valid radio transmit buffer (#3549) 2019-02-04 10:52:00 -08:00
Jonathan Hui 404d946150 [cli] validate ping interval is positive to avoid Timer::Start() assert (#3548) 2019-02-04 10:51:45 -08:00
Jonathan Hui b2bbad7674 [ncp] disable assert and watchdog property when fuzz testing (#3547) 2019-02-04 10:51:31 -08:00
erja-gp 392cfecff8 [qpg6095] add Qorvo QPG6095 platform (#3525) 2019-02-04 10:50:27 -08:00
Yakun Xu b79d5d6a92 [toranj] allow specifying wpantund path (#3544) 2019-02-01 22:13:25 -08:00
Yakun Xu 69aa5c4f04 [posix-app] add daemon mode (#3463)
This commit adds the daemon mode for POSIX CLI app. The daemon simply
receive UART input from a unix socket connection.
2019-02-01 22:05:59 -08:00
Yakun Xu e68e86317e [ci] test with time sync and header ie (#3514)
This commit adds the missing test with ie present by enabling TIME_SYNC
feature, so that IE code are covered.
2019-02-01 16:08:43 -08:00
Yakun Xu db67b3a980 [posix] fix build for SPI bus (#3546) 2019-02-01 10:01:41 -08:00
Łukasz Duda 66476070a5 [toolchain] define __COUNTER__ for keil compiler (#3545) 2019-02-01 09:26:33 -08:00
Jonathan Hui ac89fd5496 [style] return void where code always returns OT_ERROR_NONE (#3543) 2019-02-01 09:03:24 -08:00
Abtin Keshavarzian c7911adcb1 [mle] remove unused attach state kAttachStateSynchronize (#3542)
The attach state `kAttachStateSynchronize` was intended for sending
"Child Update Requests" after a reset (if device was previously
attached) using the `mAttachTimer` for retransmissions. However,
"Child Update" transmissions use `mMessageTransmissionTimer`
instead.
2019-02-01 09:03:10 -08:00
Yakun Xu 5b4e7f9331 [diag] check buffer size definition (#3541) 2019-01-31 13:04:46 -08:00
Abtin Keshavarzian 57e2f4e26d [mle] stop attach timer from SetStateChild() (#3538)
This commit changes `SetStateChild()` to stop `mAttachTimer`. This
ensures that as the `mAttachState` is set to idle, the attach timer is
also stopped (note that the attach timer callback asserts on idle
attach state). This addresses a rare issue where an inopportune device
mode change request on an already attached device while it is
performing periodic parent search (or possibly delaying processing of
a received announce) could cause an assert; `SetDeviceMode()` would
call `SetStateChild()` setting the attach state to idle while attach
timer would continue to run.
2019-01-31 13:03:02 -08:00
Abtin Keshavarzian 987ff3c017 [mle] change SetStateDetached()/SetStateChild() to be void (no return) (#3539) 2019-01-31 08:50:07 -08:00
Abtin Keshavarzian bd41c63a0a [mle] remove redundant mAttachTimer stop (#3537)
The call to `SetStateDetached()` will stop the attach timer.
2019-01-31 08:49:13 -08:00
Jonathan Hui 0e8967f5ed [fuzz] disable HDLC FCS check during fuzz tests (#3536) 2019-01-31 08:48:44 -08:00
Yakun Xu 8dcdc2cf31 [meshcop] border agent of native commissioner (#3535)
This commit enables a node serve as the border agent of native commissioner
by adding the border agent UDP port to unsecure port when the security
policy allows.

To fully test verify this commit, we need a native commissioner, which I
will submit a separate commit to enable that.
2019-01-31 08:48:27 -08:00
Jonathan Hui da12dca4d9 [cli] fix arg count checks in dataset command (#3533) 2019-01-30 08:47:53 -08:00
Jonathan Hui ba9709b674 [dtls] simplify dtls state machine (#3529)
This commit also adds checks to ensure there is only one outstanding
connection at a time.
2019-01-30 08:47:42 -08:00
Abtin Keshavarzian f9d757a161 [router-table] fix allocated router ids bit-vector size (#3534) 2019-01-29 19:09:25 -08:00
Abtin Keshavarzian 144270105d [router-table] add new methods to help iterate over router entries (#3527) 2019-01-29 12:12:56 -08:00
Abtin Keshavarzian e71bd6267e [test] fix PRETTY_FILES definition in unit test makefile (#3532)
The `test_string` source is also made "pretty".
2019-01-29 11:55:16 -08:00
Jonathan Hui 1c2e7033bf [cli] fix ping interval bounds check to avoid Timer::Start() assert (#3531) 2019-01-29 11:54:38 -08:00
Jonathan Hui 96076d3aa4 [coap] process Option Length = 0xf as a format error (#3530) 2019-01-29 08:55:59 -08:00
Jeff Bumgardner 3101ba7f0e [docs] Update README logo soup (#3528) 2019-01-29 08:54:50 -08:00