Previously, a global 'map.map' filename was used. However, when
building FTD and MTD versions of a given application, the 'map.map'
files would overwrite each other. This commit gives different filenames
to each .map file for a given binary.
On attach, a device clears its network pending dataset. If the device
has a newer local pending dataset, it should generate and send a /c/ps
message to the Leader.
When a child is not attached, set the last heard and timeout values on
receiving an MLE Parent Request message. This ensures that the child
state is not prematurely timed out when a child is trying to attach.
This commit removes the `error` from `ScheduleTransmissionTask()` and
also removes the corresponding log line printing the error. The BUSY
error log is not really helpful as `ScheduleTransmissionTask` is
posted whenever a new messages is queued and within this method it is
first checked if we are busy (i.e., in middle of an earlier tx) and
simply return and wait for end of current tx to process the next one.
* Solution for MLE Announce processing corner case
Adding an additional check to prevent executing SendAnnounce in case localtimestamp and timestamp are equal
After Travis updated its environment, Travis fails distcheck due to insufficient memory. Although OpenThread itself doesn't use much memory, the address sanitizer does.
This commit separates large scale test cases to lower peak memory usage when running certification tests on Travis.
* [radio] Add call from radio to MAC layer to indicate transmission start.
This call is used to start ACK timer. When transmission requested by the MAC
layer is delayed by the radio layer (e.g. due to BLE activity) ACK timer should
not be started when MAC requests transmission but when tranmission is started.
This commit provides required functions.
* [nRF52840] Queue transmission in radio platform to allow delayed transmission after BLE activity.
* Add note that otPlatRadioTxStarted() should be called by main OpenThread thread.
* [mac filter] add rssfilter support and integrate whitelist/blacklist
- provide RssIn filter function to fix the received signal strength for test purpose.
- provide Address filter function which integrates whitelist and blacklist, save (~300B) RAM.
- update cli and spinel-cli to reflect new otLinkFilterX() APIs.
- keep whitelist/blacklist spinel properties the same as before while implemented with new otLinkFilterX() APIs.
- THCI: add setOutBoundLinkQuality() API for DEV-1530
- THCI: update Allow/Block relative APIs
- update some test scripts due to new OT_ERROR_ALEADY when adding duplicate address to whitelist
* update for comments
* add MAC_FIXED_RSS spinel property
* rebase and apply new OutboundFrameBegin(aHeader)
* update OpenThread.py
Frame counter values are stored to non-volatile memory whether or not
the device is attached to a network, since MLE messages are sent prior
to being attached to a network.
MLE Parent Request messages may be sent by an existing child that is
searching for parents or trying to reattach. Simply receiving an MLE
Parent Request message should not result in Router(s) flushing any
existing state and associated messages for the Child.
This commit makes the following changes:
- RemoveNeighbor() is no longer called from HandleParentRequest.
- MLE Parent Response messages are explicitly marked for direct
transmission.
- A new method MeshForwarder::RemoveMessages() is introduced to remove
all messages (direct and indirect) matching a particular sub-type for
a given child.
- All queued MLE messages are removed for a given child upon receiving
an MLE Child ID Request message.
- No queued data messages for a given child are removed.
This commit introduces a new class `RssAverager` (which contains the
existing averaging logic from`LinkQualityInfo` class). It also updates
`Message` class to maintain the average RSS for a received message
(note that a message may be composed of multiple 802.15.4 fragments
data frames each received with different signal strength). The
`MeshForwarder::LogIp6Message()` is updated to log the RSS value for
received/dropped messages.
* [timer] multiple microseconds timer support
* Remove TimerSchedulerLocator, Timer inherit from Ip6Locator instead to get TimerScheduler.
* Add separate UsecTimer and UsecTimerScheduler for multiple microseconds timer support.
* [timer] refine Timer names
* Rename alarm header files to alarm-milli.h and alarm-micro.h
* Rename alarm APIs to start with otPlatAlarmMilli and otPlatAlarmMicro
* Rename Timer classes to TimerMilli/TimerMilliScheduler and TimerMicro/TimerMicroScheduler
* [Timer] Refactor Timer code structure
* Create TimerBase and TimerSchedulerBase class for common functions;
* Use TimerMilli/TimerMicro and TimerMilliScheduler/TimerMicroScheduler for different functions;
* Define AlarmApi, so then TimerMilliScheduler/TimerMicroScheduler could use different AlarmApi.
This commit adds support for setting two levels of priority (high or
low) to frames stored in `NcpFrameBuffer`. High-priority frames are
read before any queued low-priority frames. Within the same priority
level FIFO order is preserved.
The `NcpBase` is updated to send/queue the spinel response frames (with
non- zero `tid`) as higher-priority frames. This ensures faster response
time for spinel commands.
This commit also adds/updates test cases for unit testing the NCP
buffer and its new priority feature.
This commit updates the logs in supervision module to indicate when
a supervision message is sent to a sleepy child It also adds a new
log in `MeshForwarder::HandleReceivedFrame()` to indicate when an
empty payload frame is received.
With the local operational dataset being retrieved from non-volatile storage
on demand, the restore method is now no longer necessary.
This PR also fixes a bug in initializing the in-memory dataset representation
when no operational dataset exists in non-volatile storage.
* Update the usec-alarm API to use single 32-bit microsecond
* Update nRf52840's alarm implementation to support the new usec-alarm API
* So both milliseconds timer and microsecond timer will maintain 32-bit time
The local Active and Pending Operational Datsets are stored in non-volatile
memory. This commit dynamically retrieves those datasets from non-volatile
memory when they are needed.
This commit also simplifies the use of the Operational Datasets by having the
RAM buffer store the local Operational Dataset when in the detached state.
This commit new configuration option `enable-multiple-instances` and
its corresponding option `OPENTHREAD_ENABLE_MULTIPLE_INSTANCES`. When
enabled OpenThread supports handling of multiple instances. By default
this is disabled.
This commit also adds two optimizations for single instance case to
simplify the code and also help reduce memory/RAM usage:
(1) OpenThread objects/classes typically keep a reference to a higher
level object (e.g., many classes keep track of owning `ThreadNetif`)
to be able to access other objects/methods within OpenThread class
hierarchy. In single instance mode, the reference member variables are
removed and instead global functions are used to access the singleton
objects from one class to the other. To implement this, a group of
`<Object>Locator` classes are defined (e.g., `ThreadNetifLocator`,
etc.) which are then used as base class of other OpenThread classes.
(2) OpenThread objects which provide a callback/handler (e.g.,
`Timer`, `Tasklet`, etc.) have `void *mContext` member variable which
is used to keep track of the owner of the object. In single instance
mode the `mConext` member variables are removed since the owner is
expected to be a singleton and can be uniquely determined from the
callback function.
To implement this, two changes are made: First the handler methods are
modified to provide a reference to the object (e.g., `Timer` handler
will provide a `Timer &aTimer` as a parameter of its handler
callback). Second, a new base class `Context` is introduced which
hides the implementation providing an arbitrary context information. A
new static method `GetOwner(aContext)` is added to classes which own a
callback providing objects. This method help convert a `Context` to
the reference of the owner class object.
* Pause transmission while waiting for data.
* Adding feature to keep radio awake between fragments.
In some platforms, it is more energy efficient to keep the radio awake
between fragments (both received and sent) instead of sleeping and
immediately waking up. This feature can be enabled using
OPENTHREAD_CONFIG_STAY_AWAKE_BETWEEN_FRAGMENTS.
* Do not check keep-alive timeout when a recorded active commissioner re-petitions
* Force resign before accepting when active commissioner re-petitions
* Reduce duplicate code by putting mTimer.stop() inside of ResignCommissioner()