Files
Abtin Keshavarzian 0a2cad1e65 [dataset] remove legacy wake-up channel from operational dataset (#13614)
The wake-up channel TLV was originally introduced into OpenThread as part
of early experimental prototyping for wake-up / peer-to-peer features
before the design was finalized in the Thread Group. Unfortunately, it
was added directly to the public Operational Dataset structures and
MeshCoP definitions without any compile-time feature flags or build
guards, exposing it as standard dataset API.

The finalized Thread Direct specification has significantly evolved and
no longer utilizes a network-wide wake-up channel in the Operational
Dataset. As a result, retaining wake-up channel support in the dataset is
obsolete, non-compliant with the spec, and can lead to confusion when
configuring Thread networks.

This commit removes the legacy wake-up channel from the Operational
Dataset across public APIs, core modules, CLI, and tooling:

- Public API (`include/openthread/dataset.h`):
  - Removes `mIsWakeupChannelPresent` from `otOperationalDatasetComponents`.
  - Removes `mWakeupChannel` from `otOperationalDataset`.
  - Removes `OT_MESHCOP_TLV_WAKEUP_CHANNEL` from `otMeshcopTlvType`.

- Core MeshCoP & MLE (`src/core/`):
  - Removes `kWakeupChannel` from `MeshCoP::Dataset` components, types,
    and TLV definitions (`meshcop_tlvs.hpp`).
  - Removes `WakeupChannelTlv` handling and default generation from
    `ActiveDatasetManager` (`dataset_manager_ftd.cpp`).
  - Removes `kWakeupChannel` from `Mle::Tlv::Type` (`mle_tlvs.hpp`).

- CLI and Tooling:
  - Removes `dataset wakeupchannel` CLI command and its documentation
    (`cli_dataset.cpp`, `cli_dataset.hpp`, `README_DATASET.md`).
  - Cleans up `dataset wakeupchannel` parsing and buffer helpers in the
    OTCI Python utility (`tools/otci/otci/otci.py`).
  - Removes `WakeupChannel` entry and TLV type from the TCAT BLE client
    (`tools/tcat_ble_client/`).
2026-09-22 08:30:04 -07:00

81 lines
2.7 KiB
Python

"""
Copyright (c) 2024, The OpenThread Authors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
from enum import Enum
class MeshcopTlvType(Enum):
CHANNEL = 0
PANID = 1
EXTPANID = 2
NETWORKNAME = 3
PSKC = 4
NETWORKKEY = 5
NETWORK_KEY_SEQUENCE = 6
MESHLOCALPREFIX = 7
STEERING_DATA = 8
BORDER_AGENT_RLOC = 9
COMMISSIONER_ID = 10
COMM_SESSION_ID = 11
SECURITYPOLICY = 12
GET = 13
ACTIVETIMESTAMP = 14
COMMISSIONER_UDP_PORT = 15
STATE = 16
JOINER_DTLS = 17
JOINER_UDP_PORT = 18
JOINER_IID = 19
JOINER_RLOC = 20
JOINER_ROUTER_KEK = 21
PROVISIONING_URL = 32
VENDOR_NAME_TLV = 33
VENDOR_MODEL_TLV = 34
VENDOR_SW_VERSION_TLV = 35
VENDOR_DATA_TLV = 36
VENDOR_STACK_VERSION_TLV = 37
UDP_ENCAPSULATION_TLV = 48
IPV6_ADDRESS_TLV = 49
PENDINGTIMESTAMP = 51
DELAYTIMER = 52
CHANNELMASK = 53
COUNT = 54
PERIOD = 55
SCAN_DURATION = 56
ENERGY_LIST = 57
THREAD_DOMAIN_NAME = 59
DISCOVERYREQUEST = 128
DISCOVERYRESPONSE = 129
JOINERADVERTISEMENT = 241
@classmethod
def from_value(cls, value: int):
return cls._value2member_map_.get(value)
def to_bytes(self):
return bytes([self.value])