Skip to content

Instantly share code, notes, and snippets.

@agners
Created January 11, 2024 13:05
Show Gist options
  • Save agners/c477c6f55d98929c094e64b300ef678b to your computer and use it in GitHub Desktop.
Save agners/c477c6f55d98929c094e64b300ef678b to your computer and use it in GitHub Desktop.
enum CommissioningStage with numeric values
// enum CommissioningStage with numeric values
// from
// https://github.com/project-chip/connectedhomeip/blob/v1.2.0.1/src/controller/CommissioningDelegate.h
enum CommissioningStage : uint8_t
{
kError = 0,
kSecurePairing = 1, ///< Establish a PASE session with the device
kReadCommissioningInfo = 2, ///< Query General Commissioning Attributes, Network Features and Time Synchronization Cluster
kReadCommissioningInfo2 = 3, ///< Query SupportsConcurrentConnection, ICD state, check for matching fabric
kArmFailsafe = 4, ///< Send ArmFailSafe (0x30:0) command to the device
kConfigRegulatory = 5, ///< Send SetRegulatoryConfig (0x30:2) command to the device
kConfigureUTCTime = 6, ///< SetUTCTime if the DUT has a time cluster
kConfigureTimeZone = 7, ///< Configure a time zone if one is required and available
kConfigureDSTOffset = 8, ///< Configure DST offset if one is required and available
kConfigureDefaultNTP = 9, ///< Configure a default NTP server if one is required and available
kSendPAICertificateRequest = 10, ///< Send PAI CertificateChainRequest (0x3E:2) command to the device
kSendDACCertificateRequest = 11, ///< Send DAC CertificateChainRequest (0x3E:2) command to the device
kSendAttestationRequest = 12, ///< Send AttestationRequest (0x3E:0) command to the device
kAttestationVerification = 13, ///< Verify AttestationResponse (0x3E:1) validity
kSendOpCertSigningRequest = 14, ///< Send CSRRequest (0x3E:4) command to the device
kValidateCSR = 15, ///< Verify CSRResponse (0x3E:5) validity
kGenerateNOCChain = 16, ///< TLV encode Node Operational Credentials (NOC) chain certs
kSendTrustedRootCert = 17, ///< Send AddTrustedRootCertificate (0x3E:11) command to the device
kSendNOC = 18, ///< Send AddNOC (0x3E:6) command to the device
kConfigureTrustedTimeSource = 19, ///< Configure a trusted time source if one is required and available (must be done after SendNOC)
kICDGetRegistrationInfo = 20, ///< Waiting for the higher layer to provide ICD registraion informations.
kICDRegistration = 21, ///< Register for ICD management
kICDSendStayActive = 22, ///< Send Keep Alive to ICD
kWiFiNetworkSetup = 23, ///< Send AddOrUpdateWiFiNetwork (0x31:2) command to the device
kThreadNetworkSetup = 24, ///< Send AddOrUpdateThreadNetwork (0x31:3) command to the device
kFailsafeBeforeWiFiEnable = 25, ///< Extend the fail-safe before doing kWiFiNetworkEnable
kFailsafeBeforeThreadEnable = 26, ///< Extend the fail-safe before doing kThreadNetworkEnable
kWiFiNetworkEnable = 27, ///< Send ConnectNetwork (0x31:6) command to the device for the WiFi network
kThreadNetworkEnable = 28, ///< Send ConnectNetwork (0x31:6) command to the device for the Thread network
kFindOperational = 29, ///< Perform operational discovery and establish a CASE session with the device
kSendComplete = 30, ///< Send CommissioningComplete (0x30:4) command to the device
kCleanup = 31, ///< Call delegates with status, free memory, clear timers and state
/// Send ScanNetworks (0x31:0) command to the device.
/// ScanNetworks can happen anytime after kArmFailsafe.
/// However, the cirque tests fail if it is earlier in the list
kScanNetworks = 32,
/// Waiting for the higher layer to provide network credentials before continuing the workflow.
/// Call CHIPDeviceController::NetworkCredentialsReady() when CommissioningParameters is populated with
/// network credentials to use in kWiFiNetworkSetup or kThreadNetworkSetup steps.
kNeedsNetworkCreds = 33,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment