Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/ble_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-silabs authored Oct 22, 2024
2 parents 22912da + 4269ff5 commit 5997869
Show file tree
Hide file tree
Showing 66 changed files with 2,112 additions and 4,917 deletions.
14 changes: 12 additions & 2 deletions .github/issue-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ darwin:
# (?![a-z]) means "there is no next char in the range a-z".
- "/(\\b[Ii][Oo][Ss](?![a-zA-Z])|[Hh][Oo][Mm][Ee][Pp][Oo][Dd]|[Dd][Aa][Rr][Ww][Ii][Nn]|\\bm[Aa][Cc]\\b|\\bMa[Cc]\\b|\\bM[Aa]c\\b|[Mm][Aa][Cc][Oo][Ss])/"

linux:
- "/(linux)/i"

# NOTE:
# Linux intentionally disabled: most people compile either on linux or darwin and
# as a result a lot of issues get tagged as such even though they are not platform specific
# (e.g. we get test case failures reported as linux even though they are just normal
# test runs)
#
# Linux label should be reserved to platform-specific problems (usually bootstrap/packages
# or integration with wifi/ethernet/bluetootn/etc.)
#
# linux:
# - "/(linux)/i"

# Special Keywords for Cert Blockers
air purifiers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4709,13 +4709,13 @@ provisional cluster DeviceEnergyManagement = 152 {
command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5;
/** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */
command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6;
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */
command CancelRequest(): DefaultSuccess = 7;
}

/** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */
cluster EnergyEvse = 153 {
revision 4;
revision 3;

enum EnergyTransferStoppedReasonEnum : enum8 {
kEVStopped = 0;
Expand Down Expand Up @@ -4880,9 +4880,9 @@ cluster EnergyEvse = 153 {

/** Allows a client to disable the EVSE from charging and discharging. */
timed command Disable(): DefaultSuccess = 1;
/** This command allows a client to enable the EVSE to charge an EV, */
/** This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. */
timed command EnableCharging(EnableChargingRequest): DefaultSuccess = 2;
/** Upon receipt, this SHALL allow a client to enable the discharge of an EV, */
/** Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. */
timed command EnableDischarging(EnableDischargingRequest): DefaultSuccess = 3;
/** Allows a client to put the EVSE into a self-diagnostics mode. */
timed command StartDiagnostics(): DefaultSuccess = 4;
Expand Down Expand Up @@ -4951,7 +4951,7 @@ cluster PowerTopology = 156 {

/** Attributes and commands for selecting a mode from a list of supported options. */
cluster EnergyEvseMode = 157 {
revision 1;
revision 2;

enum ModeTag : enum16 {
kAuto = 0;
Expand All @@ -4967,6 +4967,7 @@ cluster EnergyEvseMode = 157 {
kManual = 16384;
kTimeOfUse = 16385;
kSolarCharging = 16386;
kV2X = 16387;
}

bitmap Feature : bitmap32 {
Expand All @@ -4986,8 +4987,6 @@ cluster EnergyEvseMode = 157 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -5004,8 +5003,7 @@ cluster EnergyEvseMode = 157 {
optional char_string<64> statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

Expand Down Expand Up @@ -5046,8 +5044,6 @@ cluster WaterHeaterMode = 158 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -5061,17 +5057,16 @@ cluster WaterHeaterMode = 158 {

response struct ChangeToModeResponse = 1 {
enum8 status = 0;
optional char_string statusText = 1;
optional char_string<64> statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional cluster DeviceEnergyManagementMode = 159 {
revision 1;
revision 2;

enum ModeTag : enum16 {
kAuto = 0;
Expand Down Expand Up @@ -5107,8 +5102,6 @@ provisional cluster DeviceEnergyManagementMode = 159 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -5125,8 +5118,7 @@ provisional cluster DeviceEnergyManagementMode = 159 {
optional char_string<64> statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ provisional cluster DeviceEnergyManagement = 152 {
command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5;
/** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */
command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6;
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */
command CancelRequest(): DefaultSuccess = 7;
}

Expand All @@ -2254,7 +2254,7 @@ cluster PowerTopology = 156 {

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional cluster DeviceEnergyManagementMode = 159 {
revision 1;
revision 2;

enum ModeTag : enum16 {
kAuto = 0;
Expand Down Expand Up @@ -2290,8 +2290,6 @@ provisional cluster DeviceEnergyManagementMode = 159 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -2308,8 +2306,7 @@ provisional cluster DeviceEnergyManagementMode = 159 {
optional char_string<64> statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

Expand Down Expand Up @@ -2792,8 +2789,6 @@ endpoint 3 {
server cluster DeviceEnergyManagementMode {
callback attribute supportedModes;
callback attribute currentMode;
ram attribute startUpMode;
ram attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ provisional cluster DeviceEnergyManagement = 152 {
command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5;
/** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */
command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6;
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */
command CancelRequest(): DefaultSuccess = 7;
}

Expand All @@ -2165,7 +2165,7 @@ cluster PowerTopology = 156 {

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional cluster DeviceEnergyManagementMode = 159 {
revision 1;
revision 2;

enum ModeTag : enum16 {
kAuto = 0;
Expand Down Expand Up @@ -2201,8 +2201,6 @@ provisional cluster DeviceEnergyManagementMode = 159 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -2219,8 +2217,7 @@ provisional cluster DeviceEnergyManagementMode = 159 {
optional char_string<64> statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

Expand Down Expand Up @@ -2652,8 +2649,6 @@ endpoint 3 {
server cluster DeviceEnergyManagementMode {
callback attribute supportedModes;
callback attribute currentMode;
ram attribute startUpMode;
ram attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2019,13 +2019,13 @@ provisional cluster DeviceEnergyManagement = 152 {
command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5;
/** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */
command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6;
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */
command CancelRequest(): DefaultSuccess = 7;
}

/** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */
cluster EnergyEvse = 153 {
revision 4;
revision 3;

enum EnergyTransferStoppedReasonEnum : enum8 {
kEVStopped = 0;
Expand Down Expand Up @@ -2190,9 +2190,9 @@ cluster EnergyEvse = 153 {

/** Allows a client to disable the EVSE from charging and discharging. */
timed command Disable(): DefaultSuccess = 1;
/** This command allows a client to enable the EVSE to charge an EV, */
/** This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. */
timed command EnableCharging(EnableChargingRequest): DefaultSuccess = 2;
/** Upon receipt, this SHALL allow a client to enable the discharge of an EV, */
/** Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. */
timed command EnableDischarging(EnableDischargingRequest): DefaultSuccess = 3;
/** Allows a client to put the EVSE into a self-diagnostics mode. */
timed command StartDiagnostics(): DefaultSuccess = 4;
Expand Down Expand Up @@ -2227,7 +2227,7 @@ cluster PowerTopology = 156 {

/** Attributes and commands for selecting a mode from a list of supported options. */
cluster EnergyEvseMode = 157 {
revision 1;
revision 2;

enum ModeTag : enum16 {
kAuto = 0;
Expand All @@ -2243,6 +2243,7 @@ cluster EnergyEvseMode = 157 {
kManual = 16384;
kTimeOfUse = 16385;
kSolarCharging = 16386;
kV2X = 16387;
}

bitmap Feature : bitmap32 {
Expand All @@ -2262,8 +2263,6 @@ cluster EnergyEvseMode = 157 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -2280,8 +2279,7 @@ cluster EnergyEvseMode = 157 {
optional char_string<64> statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

Expand Down Expand Up @@ -2322,8 +2320,6 @@ cluster WaterHeaterMode = 158 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -2337,17 +2333,16 @@ cluster WaterHeaterMode = 158 {

response struct ChangeToModeResponse = 1 {
enum8 status = 0;
optional char_string statusText = 1;
optional char_string<64> statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional cluster DeviceEnergyManagementMode = 159 {
revision 1;
revision 2;

enum ModeTag : enum16 {
kAuto = 0;
Expand Down Expand Up @@ -2383,8 +2378,6 @@ provisional cluster DeviceEnergyManagementMode = 159 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -2401,8 +2394,7 @@ provisional cluster DeviceEnergyManagementMode = 159 {
optional char_string<64> statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

Expand Down
16 changes: 11 additions & 5 deletions examples/fabric-admin/device_manager/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,19 @@ void DeviceManager::RemoveSyncedDevice(NodeId nodeId)
ChipLogValueX64(device->GetNodeId()), device->GetEndpointId());
}

void DeviceManager::OpenDeviceCommissioningWindow(NodeId nodeId, uint32_t iterations, uint16_t commissioningTimeoutSec,
void DeviceManager::OpenDeviceCommissioningWindow(ScopedNodeId scopedNodeId, uint32_t iterations, uint16_t commissioningTimeoutSec,
uint16_t discriminator, const ByteSpan & salt, const ByteSpan & verifier)
{
ChipLogProgress(NotSpecified, "Opening commissioning window for Node ID: " ChipLogFormatX64, ChipLogValueX64(nodeId));
// PairingManager isn't currently capable of OpenCommissioningWindow on a device of a fabric that it doesn't have
// the controller for. Currently no implementation need this functionality, but should they need it they will hit
// the verify or die below and it will be the responsiblity of whoever requires that functionality to implement.
VerifyOrDie(PairingManager::Instance().CurrentCommissioner().GetFabricIndex() == scopedNodeId.GetFabricIndex());
ChipLogProgress(NotSpecified, "Opening commissioning window for Node ID: " ChipLogFormatX64,
ChipLogValueX64(scopedNodeId.GetNodeId()));

// Open the commissioning window of a device within its own fabric.
CHIP_ERROR err = PairingManager::Instance().OpenCommissioningWindow(nodeId, kRootEndpointId, commissioningTimeoutSec,
iterations, discriminator, salt, verifier);
CHIP_ERROR err = PairingManager::Instance().OpenCommissioningWindow(
scopedNodeId.GetNodeId(), kRootEndpointId, commissioningTimeoutSec, iterations, discriminator, salt, verifier);
if (err != CHIP_NO_ERROR)
{
ChipLogError(NotSpecified, "Failed to open commissioning window: %s", ErrorStr(err));
Expand Down Expand Up @@ -412,7 +417,8 @@ void DeviceManager::HandleReverseOpenCommissioningWindow(TLV::TLVReader & data)
ChipLogProgress(NotSpecified, " PAKEPasscodeVerifier size: %lu", value.PAKEPasscodeVerifier.size());
ChipLogProgress(NotSpecified, " salt size: %lu", value.salt.size());

OpenDeviceCommissioningWindow(mLocalBridgeNodeId, value.iterations, value.commissioningTimeout, value.discriminator,
ScopedNodeId scopedNodeId(mLocalBridgeNodeId, PairingManager::Instance().CurrentCommissioner().GetFabricIndex());
OpenDeviceCommissioningWindow(scopedNodeId, value.iterations, value.commissioningTimeout, value.discriminator,
ByteSpan(value.salt.data(), value.salt.size()),
ByteSpan(value.PAKEPasscodeVerifier.data(), value.PAKEPasscodeVerifier.size()));
}
Expand Down
4 changes: 2 additions & 2 deletions examples/fabric-admin/device_manager/DeviceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class DeviceManager : public PairingDelegate
*
* This function initiates the process to open the commissioning window for a device identified by the given node ID.
*
* @param nodeId The ID of the node that should open the commissioning window.
* @param scopedNodeId The scoped node ID of the device that should open the commissioning window.
* @param iterations The number of PBKDF (Password-Based Key Derivation Function) iterations to use
* for deriving the PAKE (Password Authenticated Key Exchange) verifier.
* @param commissioningTimeoutSec The time in seconds before the commissioning window closes. This value determines
Expand All @@ -102,7 +102,7 @@ class DeviceManager : public PairingDelegate
* @param verifier The PAKE verifier used to authenticate the commissioning process.
*
*/
void OpenDeviceCommissioningWindow(chip::NodeId nodeId, uint32_t iterations, uint16_t commissioningTimeoutSec,
void OpenDeviceCommissioningWindow(chip::ScopedNodeId scopedNodeId, uint32_t iterations, uint16_t commissioningTimeoutSec,
uint16_t discriminator, const chip::ByteSpan & salt, const chip::ByteSpan & verifier);

/**
Expand Down
Loading

0 comments on commit 5997869

Please sign in to comment.