mirror of
https://github.com/espressif/openthread.git
synced 2026-08-05 02:17:47 +00:00
[low-power] implement enhanced-ack based probing (#5780)
This commit implements Enhanced-ACK Probing (on simulation platform). - Add a new public API otLinkMetricsConfigEnhAckProbing which sends Link Metrics Management Request to configure the probing. This is called on Probing Initiator side. - Add a new radio platform API otPlatRadioConfigureEnhAckProbing. This API should be called on Probing Subject side when handling the requests from Initiators. This API notifies the radio to start/stop aggregating link metrics info and include the data into Vendor IE in enhanced-ACK for the specific neighbor. As discussed in #5746, the code for doing such thing should be put in radio driver. - Add a util module util/link_metrics, which provides a group of APIs to implement Probing Subject side logic for Enh-ACK Probing. Any platform could use this module to implement the feature easily in radio driver. - Add new util APIs in util/mac_frame to generate Enh-ACK Probing IE (Vendor IE with Thread OUI and SubType = 0) and set value for this IE. - Update the implementation in simulation/radio.c to support Probing Subject side logic for Enh-ACK Probing, using APIs in util/link_metrics and util/mac_frame. - Add a test v1_2_LowPower_7_1_01_SingleProbeLinkMetricsWithEnhancedAcks.py for testing. Misc: - Add check for all the public Link Metrics APIs (Initiator side) to ensure that the Subject is a neighbor of the Initiator. If the address is not link-local or the neighbor is not found, an error UNKNOWN_NEIGHBOR would be returned. - Update PrepareEmptyFrame so that when it's called for reference device, its frame version would be set to 2015.
This commit is contained in:
@@ -1936,6 +1936,19 @@ class NodeImpl:
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
|
||||
def link_metrics_mgmt_req_enhanced_ack_based_probing(self,
|
||||
dst_addr: str,
|
||||
enable: bool,
|
||||
metrics_flags: str,
|
||||
ext_flags=''):
|
||||
cmd = "linkmetrics mgmt %s enhanced-ack" % (dst_addr)
|
||||
if enable:
|
||||
cmd = cmd + (" register %s %s" % (metrics_flags, ext_flags))
|
||||
else:
|
||||
cmd = cmd + " clear"
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
|
||||
def link_metrics_mgmt_req_forward_tracking_series(self, dst_addr: str, series_id: int, series_flags: str,
|
||||
metrics_flags: str):
|
||||
cmd = "linkmetrics mgmt %s forward %d %s %s" % (dst_addr, series_id, series_flags, metrics_flags)
|
||||
|
||||
Reference in New Issue
Block a user