diff --git a/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp b/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp
index 4eedd8d..fc10455 100644
--- a/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp
+++ b/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp
@@ -144,8 +144,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -193,8 +193,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -384,8 +384,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1475,8 +1475,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1595,8 +1595,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -3002,8 +3002,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -3198,8 +3198,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -3564,8 +3564,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -3676,8 +3676,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -3790,8 +3790,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -4320,8 +4320,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -4375,8 +4375,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -5064,8 +5064,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -5345,8 +5345,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -5412,8 +5412,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -5920,8 +5920,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -6421,8 +6421,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -6488,8 +6488,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp b/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp
index 829363d..8fde99d 100644
--- a/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp
+++ b/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp
@@ -150,8 +150,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -346,8 +346,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -876,8 +876,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1565,8 +1565,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1632,8 +1632,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2140,8 +2140,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/lighting-app/efr32/src/AppTask.cpp b/examples/lighting-app/efr32/src/AppTask.cpp
index 79f32ef..1f3ad3c 100644
--- a/examples/lighting-app/efr32/src/AppTask.cpp
+++ b/examples/lighting-app/efr32/src/AppTask.cpp
@@ -82,7 +82,7 @@
 
 int AppTask::StartAppTask()
 {
-    int err = CHIP_ERROR_MAX;
+    int err = CHIP_CONFIG_CORE_ERROR_MAX;
 
     sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct);
     if (sAppEventQueue == NULL)
@@ -275,7 +275,7 @@
     }
     else
     {
-        err = CHIP_ERROR_MAX;
+        err = CHIP_CONFIG_CORE_ERROR_MAX;
     }
 
     if (err == CHIP_NO_ERROR)
@@ -419,7 +419,7 @@
     if (xTimerStop(sFunctionTimer, 0) == pdFAIL)
     {
         EFR32_LOG("app timer stop() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mFunctionTimerActive = false;
@@ -439,7 +439,7 @@
     if (xTimerChangePeriod(sFunctionTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS)
     {
         EFR32_LOG("app timer start() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mFunctionTimerActive = true;
diff --git a/examples/lighting-app/efr32/src/LightingManager.cpp b/examples/lighting-app/efr32/src/LightingManager.cpp
index 006b6d7..4f30a0b 100644
--- a/examples/lighting-app/efr32/src/LightingManager.cpp
+++ b/examples/lighting-app/efr32/src/LightingManager.cpp
@@ -40,7 +40,7 @@
     if (sLightTimer == NULL)
     {
         EFR32_LOG("sLightTimer timer create failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mState                 = kState_OffCompleted;
@@ -135,7 +135,7 @@
     if (xTimerChangePeriod(sLightTimer, (aTimeoutMs / portTICK_PERIOD_MS), 100) != pdPASS)
     {
         EFR32_LOG("sLightTimer timer start() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 }
 
@@ -144,7 +144,7 @@
     if (xTimerStop(sLightTimer, 0) == pdFAIL)
     {
         EFR32_LOG("sLightTimer stop() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 }
 
diff --git a/examples/lighting-app/efr32/src/Rpc.cpp b/examples/lighting-app/efr32/src/Rpc.cpp
index e1be7f2..846adc8 100644
--- a/examples/lighting-app/efr32/src/Rpc.cpp
+++ b/examples/lighting-app/efr32/src/Rpc.cpp
@@ -120,7 +120,7 @@
 
 int Init()
 {
-    int err = CHIP_ERROR_MAX;
+    int err = CHIP_CONFIG_CORE_ERROR_MAX;
     pw_sys_io_Init();
 
     // Start App task.
diff --git a/examples/lighting-app/efr32/src/main.cpp b/examples/lighting-app/efr32/src/main.cpp
index f6f850c..00e82ca 100644
--- a/examples/lighting-app/efr32/src/main.cpp
+++ b/examples/lighting-app/efr32/src/main.cpp
@@ -99,7 +99,7 @@
 // ================================================================================
 int main(void)
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     init_efrPlatform();
     mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);
diff --git a/examples/lighting-app/k32w/main/AppTask.cpp b/examples/lighting-app/k32w/main/AppTask.cpp
index b533022..8f44a64 100644
--- a/examples/lighting-app/k32w/main/AppTask.cpp
+++ b/examples/lighting-app/k32w/main/AppTask.cpp
@@ -72,7 +72,7 @@
     sAppEventQueue = xQueueCreate(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent));
     if (sAppEventQueue == NULL)
     {
-        err = CHIP_ERROR_MAX;
+        err = CHIP_CONFIG_CORE_ERROR_MAX;
         K32W_LOG("Failed to allocate app event queue");
         assert(err == CHIP_NO_ERROR);
     }
@@ -408,7 +408,7 @@
     }
     else
     {
-        err = CHIP_ERROR_MAX;
+        err = CHIP_CONFIG_CORE_ERROR_MAX;
     }
 
     if (err == CHIP_NO_ERROR)
diff --git a/examples/lighting-app/k32w/main/main.cpp b/examples/lighting-app/k32w/main/main.cpp
index 6426a52..31737fc 100644
--- a/examples/lighting-app/k32w/main/main.cpp
+++ b/examples/lighting-app/k32w/main/main.cpp
@@ -55,7 +55,7 @@
 
 extern "C" void main_task(void const * argument)
 {
-    CHIP_ERROR ret = CHIP_ERROR_MAX;
+    CHIP_ERROR ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     /* Call C++ constructors */
     InitFunc * pFunc = &__init_array_start;
diff --git a/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp b/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp
index 829363d..8fde99d 100644
--- a/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp
+++ b/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp
@@ -150,8 +150,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -346,8 +346,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -876,8 +876,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1565,8 +1565,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1632,8 +1632,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2140,8 +2140,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/lighting-app/qpg6100/include/AppTask.h b/examples/lighting-app/qpg6100/include/AppTask.h
index baa87f2..23bfbb2 100644
--- a/examples/lighting-app/qpg6100/include/AppTask.h
+++ b/examples/lighting-app/qpg6100/include/AppTask.h
@@ -61,7 +61,7 @@
     static void FunctionHandler(AppEvent * aEvent);
 
     static void LightingActionEventHandler(AppEvent * aEvent);
-    static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, chip::System::Error aError);
+    static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, CHIP_ERROR aError);
 
     void StartTimer(uint32_t aTimeoutMs);
 
diff --git a/examples/lighting-app/qpg6100/src/AppTask.cpp b/examples/lighting-app/qpg6100/src/AppTask.cpp
index f7a29bb..d8d7e8d 100644
--- a/examples/lighting-app/qpg6100/src/AppTask.cpp
+++ b/examples/lighting-app/qpg6100/src/AppTask.cpp
@@ -251,7 +251,7 @@
     sAppTask.PostEvent(&button_event);
 }
 
-void AppTask::TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, chip::System::Error aError)
+void AppTask::TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, CHIP_ERROR aError)
 {
     AppEvent event;
     event.Type               = AppEvent::kEventType_Timer;
diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp
index a14d391..8011191 100644
--- a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp
+++ b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp
@@ -77,7 +77,6 @@
 
 int AppTask::Init()
 {
-    int ret = CHIP_ERROR_MAX;
     LED_Params ledParams;
     Button_Params buttionParams;
     ConnectivityManager::ThreadPollingConfig pollingConfig;
@@ -87,7 +86,7 @@
     // Init Chip memory management before the stack
     chip::Platform::MemoryInit();
 
-    ret = PlatformMgr().InitChipStack();
+    CHIP_ERROR ret = PlatformMgr().InitChipStack();
     if (ret != CHIP_NO_ERROR)
     {
         PLAT_LOG("PlatformMgr().InitChipStack() failed");
diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/main.cpp b/examples/lock-app/cc13x2x7_26x2x7/main/main.cpp
index b721f9e..1ed5409 100644
--- a/examples/lock-app/cc13x2x7_26x2x7/main/main.cpp
+++ b/examples/lock-app/cc13x2x7_26x2x7/main/main.cpp
@@ -62,8 +62,6 @@
 // ================================================================================
 int main(void)
 {
-    int ret = CHIP_ERROR_MAX;
-
     Board_init();
     bpool((void *) GlobalHeapZoneBuffer, TOTAL_ICALL_HEAP_SIZE);
 
@@ -79,7 +77,7 @@
 
     SHA2_init();
 
-    ret = GetAppTask().StartAppTask();
+    CHIP_ERROR ret = GetAppTask().StartAppTask();
     if (ret != CHIP_NO_ERROR)
     {
         // can't log until the kernel is started
diff --git a/examples/lock-app/efr32/src/AppTask.cpp b/examples/lock-app/efr32/src/AppTask.cpp
index 67ad41d..44144ca 100644
--- a/examples/lock-app/efr32/src/AppTask.cpp
+++ b/examples/lock-app/efr32/src/AppTask.cpp
@@ -77,7 +77,7 @@
 
 int AppTask::StartAppTask()
 {
-    int err = CHIP_ERROR_MAX;
+    int err = CHIP_CONFIG_CORE_ERROR_MAX;
 
     sAppEventQueue = xQueueCreate(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent));
     if (sAppEventQueue == NULL)
@@ -271,7 +271,7 @@
     }
     else
     {
-        err = CHIP_ERROR_MAX;
+        err = CHIP_CONFIG_CORE_ERROR_MAX;
     }
 
     if (err == CHIP_NO_ERROR)
@@ -415,7 +415,7 @@
     if (xTimerStop(sFunctionTimer, 0) == pdFAIL)
     {
         EFR32_LOG("app timer stop() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mFunctionTimerActive = false;
@@ -435,7 +435,7 @@
     if (xTimerChangePeriod(sFunctionTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS)
     {
         EFR32_LOG("app timer start() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mFunctionTimerActive = true;
diff --git a/examples/lock-app/efr32/src/BoltLockManager.cpp b/examples/lock-app/efr32/src/BoltLockManager.cpp
index a7cfa06..b5acfa5 100644
--- a/examples/lock-app/efr32/src/BoltLockManager.cpp
+++ b/examples/lock-app/efr32/src/BoltLockManager.cpp
@@ -40,7 +40,7 @@
     if (sLockTimer == NULL)
     {
         EFR32_LOG("sLockTimer timer create failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mState              = kState_LockingCompleted;
@@ -135,7 +135,7 @@
     if (xTimerChangePeriod(sLockTimer, (aTimeoutMs / portTICK_PERIOD_MS), 100) != pdPASS)
     {
         EFR32_LOG("sLockTimer timer start() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 }
 
@@ -144,7 +144,7 @@
     if (xTimerStop(sLockTimer, 0) == pdFAIL)
     {
         EFR32_LOG("Lock timer timer stop() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 }
 
diff --git a/examples/lock-app/efr32/src/main.cpp b/examples/lock-app/efr32/src/main.cpp
index 67735ef..e1ba161 100644
--- a/examples/lock-app/efr32/src/main.cpp
+++ b/examples/lock-app/efr32/src/main.cpp
@@ -91,7 +91,7 @@
 // ================================================================================
 int main(void)
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     init_efrPlatform();
     mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);
diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp
index f1c2487..fb243da 100644
--- a/examples/lock-app/esp32/main/AppTask.cpp
+++ b/examples/lock-app/esp32/main/AppTask.cpp
@@ -65,7 +65,7 @@
 
 int AppTask::StartAppTask()
 {
-    int err = CHIP_ERROR_MAX;
+    int err = CHIP_CONFIG_CORE_ERROR_MAX;
 
     sAppEventQueue = xQueueCreate(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent));
     if (sAppEventQueue == NULL)
@@ -237,7 +237,7 @@
     }
     else
     {
-        err = CHIP_ERROR_MAX;
+        err = CHIP_CONFIG_CORE_ERROR_MAX;
     }
 
     if (err == CHIP_NO_ERROR)
diff --git a/examples/lock-app/esp32/main/BoltLockManager.cpp b/examples/lock-app/esp32/main/BoltLockManager.cpp
index 9df6bf1..661d576 100644
--- a/examples/lock-app/esp32/main/BoltLockManager.cpp
+++ b/examples/lock-app/esp32/main/BoltLockManager.cpp
@@ -39,7 +39,7 @@
     if (sLockTimer == NULL)
     {
         ESP_LOGE(TAG, "sLockTimer timer create failed");
-        return CHIP_ERROR_MAX;
+        return CHIP_CONFIG_CORE_ERROR_MAX;
     }
 
     mState              = kState_LockingCompleted;
diff --git a/examples/lock-app/k32w/main/AppTask.cpp b/examples/lock-app/k32w/main/AppTask.cpp
index c43ea73..36cfe0e 100644
--- a/examples/lock-app/k32w/main/AppTask.cpp
+++ b/examples/lock-app/k32w/main/AppTask.cpp
@@ -413,7 +413,7 @@
     }
     else
     {
-        err = CHIP_ERROR_MAX;
+        err = CHIP_ERROR_INTERNAL;
     }
 
     if (err == CHIP_NO_ERROR)
diff --git a/examples/lock-app/k32w/main/main.cpp b/examples/lock-app/k32w/main/main.cpp
index 0dd82eb..210b1cf 100644
--- a/examples/lock-app/k32w/main/main.cpp
+++ b/examples/lock-app/k32w/main/main.cpp
@@ -54,8 +54,6 @@
 
 extern "C" void main_task(void const * argument)
 {
-    CHIP_ERROR ret = CHIP_ERROR_MAX;
-
     /* Call C++ constructors */
     InitFunc * pFunc = &__init_array_start;
     for (; pFunc < &__init_array_end; ++pFunc)
@@ -77,7 +75,7 @@
     // Init Chip memory management before the stack
     chip::Platform::MemoryInit();
 
-    ret = PlatformMgr().InitChipStack();
+    CHIP_ERROR ret = PlatformMgr().InitChipStack();
     if (ret != CHIP_NO_ERROR)
     {
         K32W_LOG("Error during PlatformMgr().InitWeaveStack()");
diff --git a/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp b/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp
index 4c7374d..4e77593 100644
--- a/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp
+++ b/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp
@@ -150,8 +150,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -346,8 +346,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1035,8 +1035,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1102,8 +1102,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1610,8 +1610,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/lock-app/qpg6100/include/AppTask.h b/examples/lock-app/qpg6100/include/AppTask.h
index 7dc789c..74c3e6b 100644
--- a/examples/lock-app/qpg6100/include/AppTask.h
+++ b/examples/lock-app/qpg6100/include/AppTask.h
@@ -59,7 +59,7 @@
     static void FunctionTimerEventHandler(AppEvent * aEvent);
     static void FunctionHandler(AppEvent * aEvent);
     static void LockActionEventHandler(AppEvent * aEvent);
-    static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, chip::System::Error aError);
+    static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, CHIP_ERROR aError);
 
     void StartTimer(uint32_t aTimeoutMs);
 
diff --git a/examples/lock-app/qpg6100/src/AppTask.cpp b/examples/lock-app/qpg6100/src/AppTask.cpp
index aa6d773..51a9971 100644
--- a/examples/lock-app/qpg6100/src/AppTask.cpp
+++ b/examples/lock-app/qpg6100/src/AppTask.cpp
@@ -207,7 +207,7 @@
     }
     else
     {
-        err = CHIP_ERROR_MAX;
+        err = CHIP_ERROR_INTERNAL;
     }
 
     if (err == CHIP_NO_ERROR)
@@ -245,7 +245,7 @@
     }
 }
 
-void AppTask::TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, chip::System::Error aError)
+void AppTask::TimerEventHandler(chip::System::Layer * aLayer, void * aAppState, CHIP_ERROR aError)
 {
     AppEvent event;
     event.Type               = AppEvent::kEventType_Timer;
diff --git a/examples/lock-app/qpg6100/src/BoltLockManager.cpp b/examples/lock-app/qpg6100/src/BoltLockManager.cpp
index 7bed6db..b60ccee 100644
--- a/examples/lock-app/qpg6100/src/BoltLockManager.cpp
+++ b/examples/lock-app/qpg6100/src/BoltLockManager.cpp
@@ -41,7 +41,7 @@
     {
         ChipLogProgress(NotSpecified, "sLockTimer timer create failed");
         // TODO:
-        // appError(CHIP_ERROR_MAX);
+        // appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mState              = kState_LockingCompleted;
@@ -136,7 +136,7 @@
     if (xTimerChangePeriod(sLockTimer, (aTimeoutMs / portTICK_PERIOD_MS), 100) != pdPASS)
     {
         ChipLogError(NotSpecified, "sLockTimer timer start() failed");
-        // appError(CHIP_ERROR_MAX);
+        // appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 }
 
@@ -145,7 +145,7 @@
     if (xTimerStop(sLockTimer, 0) == pdFAIL)
     {
         ChipLogError(NotSpecified, "Lock timer timer stop() failed");
-        // appError(CHIP_ERROR_MAX);
+        // appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 }
 
diff --git a/examples/minimal-mdns/client.cpp b/examples/minimal-mdns/client.cpp
index ddc1aba..b1ad74d 100644
--- a/examples/minimal-mdns/client.cpp
+++ b/examples/minimal-mdns/client.cpp
@@ -333,7 +333,7 @@
     {
         timer->Start(
             gOptions.runtimeMs,
-            [](System::Layer *, void *, System::Error err) {
+            [](System::Layer *, void *, CHIP_ERROR err) {
                 DeviceLayer::PlatformMgr().StopEventLoopTask();
                 DeviceLayer::PlatformMgr().Shutdown();
             },
diff --git a/examples/platform/nrfconnect/util/test/TestInetCommon.cpp b/examples/platform/nrfconnect/util/test/TestInetCommon.cpp
index a5a0ada..efd36a9 100644
--- a/examples/platform/nrfconnect/util/test/TestInetCommon.cpp
+++ b/examples/platform/nrfconnect/util/test/TestInetCommon.cpp
@@ -65,7 +65,7 @@
 
 void InetFailError(int32_t err, const char * msg)
 {
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         LOG_ERR("%s: %s", msg, ErrorStr(err));
         exit(-1);
diff --git a/examples/platform/qpg6100/app/main.cpp b/examples/platform/qpg6100/app/main.cpp
index 693aac1..6c05305 100644
--- a/examples/platform/qpg6100/app/main.cpp
+++ b/examples/platform/qpg6100/app/main.cpp
@@ -60,7 +60,7 @@
 
 int Application_Init(void)
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     /* Launch application task */
     ChipLogProgress(NotSpecified, "============================");
@@ -79,7 +79,7 @@
 
 int CHIP_Init(void)
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     ret = chip::Platform::MemoryInit();
     if (ret != CHIP_NO_ERROR)
diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp
index 1682d81..01efb58 100644
--- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp
+++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp
@@ -79,7 +79,7 @@
 
 int AppTask::Init()
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
     LED_Params ledParams;
     Button_Params buttionParams;
     ConnectivityManager::ThreadPollingConfig pollingConfig;
diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/main.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/main.cpp
index b721f9e..091681d 100644
--- a/examples/pump-app/cc13x2x7_26x2x7/main/main.cpp
+++ b/examples/pump-app/cc13x2x7_26x2x7/main/main.cpp
@@ -62,7 +62,7 @@
 // ================================================================================
 int main(void)
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     Board_init();
     bpool((void *) GlobalHeapZoneBuffer, TOTAL_ICALL_HEAP_SIZE);
diff --git a/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp b/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp
index 511f2ea..22bacaf 100644
--- a/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp
+++ b/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp
@@ -79,8 +79,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -199,8 +199,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -395,8 +395,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -925,8 +925,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1555,8 +1555,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1622,8 +1622,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2130,8 +2130,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp
index 1682d81..01efb58 100644
--- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp
+++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp
@@ -79,7 +79,7 @@
 
 int AppTask::Init()
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
     LED_Params ledParams;
     Button_Params buttionParams;
     ConnectivityManager::ThreadPollingConfig pollingConfig;
diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp b/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp
index b721f9e..091681d 100644
--- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp
+++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp
@@ -62,7 +62,7 @@
 // ================================================================================
 int main(void)
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     Board_init();
     bpool((void *) GlobalHeapZoneBuffer, TOTAL_ICALL_HEAP_SIZE);
diff --git a/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp b/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp
index 3412e53..c647760 100644
--- a/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp
+++ b/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp
@@ -79,8 +79,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -199,8 +199,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -395,8 +395,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1084,8 +1084,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1592,8 +1592,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/shell/efr32/src/main.cpp b/examples/shell/efr32/src/main.cpp
index ea13605..bb6ee91 100644
--- a/examples/shell/efr32/src/main.cpp
+++ b/examples/shell/efr32/src/main.cpp
@@ -107,7 +107,7 @@
 
 int main(void)
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     init_efrPlatform();
     mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);
diff --git a/examples/shell/k32w/main/main.cpp b/examples/shell/k32w/main/main.cpp
index 6a90b26..cf5850e 100644
--- a/examples/shell/k32w/main/main.cpp
+++ b/examples/shell/k32w/main/main.cpp
@@ -64,7 +64,7 @@
 
 extern "C" void main_task(void const * argument)
 {
-    CHIP_ERROR ret = CHIP_ERROR_MAX;
+    CHIP_ERROR ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     /* Call C++ constructors */
     InitFunc * pFunc = &__init_array_start;
diff --git a/examples/shell/shell_common/cmd_misc.cpp b/examples/shell/shell_common/cmd_misc.cpp
index da05dbd..a99ec89 100644
--- a/examples/shell/shell_common/cmd_misc.cpp
+++ b/examples/shell/shell_common/cmd_misc.cpp
@@ -35,29 +35,29 @@
 using namespace chip::Shell;
 using namespace chip::Logging;
 
-int cmd_echo(int argc, char ** argv)
+CHIP_ERROR cmd_echo(int argc, char ** argv)
 {
     for (int i = 0; i < argc; i++)
     {
         streamer_printf(streamer_get(), "%s ", argv[i]);
     }
     streamer_printf(streamer_get(), "\n\r");
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
-int cmd_log(int argc, char ** argv)
+CHIP_ERROR cmd_log(int argc, char ** argv)
 {
     for (int i = 0; i < argc; i++)
     {
         ChipLogProgress(chipTool, "%s", argv[i]);
     }
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
-int cmd_rand(int argc, char ** argv)
+CHIP_ERROR cmd_rand(int argc, char ** argv)
 {
     streamer_printf(streamer_get(), "%d\n\r", GetRandU8());
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
 static shell_command_t cmds_misc[] = {
diff --git a/examples/shell/shell_common/cmd_otcli.cpp b/examples/shell/shell_common/cmd_otcli.cpp
index 8d7fa00..8dbf9b6 100644
--- a/examples/shell/shell_common/cmd_otcli.cpp
+++ b/examples/shell/shell_common/cmd_otcli.cpp
@@ -61,21 +61,21 @@
 
 static chip::Shell::Engine sShellOtcliSubcommands;
 
-int cmd_otcli_help_iterator(shell_command_t * command, void * arg)
+CHIP_ERROR cmd_otcli_help_iterator(shell_command_t * command, void * arg)
 {
     streamer_printf(streamer_get(), "  %-15s %s\n\r", command->cmd_name, command->cmd_help);
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
-int cmd_otcli_help(int argc, char ** argv)
+CHIP_ERROR cmd_otcli_help(int argc, char ** argv)
 {
     sShellOtcliSubcommands.ForEachCommand(cmd_otcli_help_iterator, nullptr);
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
 #if CHIP_TARGET_STYLE_EMBEDDED
 
-int cmd_otcli_dispatch(int argc, char ** argv)
+CHIP_ERROR cmd_otcli_dispatch(int argc, char ** argv)
 {
     CHIP_ERROR error = CHIP_NO_ERROR;
 
@@ -116,10 +116,8 @@
 
 #elif CHIP_TARGET_STYLE_UNIX
 
-int cmd_otcli_dispatch(int argc, char ** argv)
+CHIP_ERROR cmd_otcli_dispatch(int argc, char ** argv)
 {
-    CHIP_ERROR error = CHIP_NO_ERROR;
-
     int pid;
     uid_t euid         = geteuid();
     char ctl_command[] = "/usr/local/sbin/ot-ctl";
@@ -128,15 +126,14 @@
     if (euid != 0)
     {
         streamer_printf(streamer_get(), "Error otcli: requires running chip-shell as sudo\n\r");
-        error = CHIP_ERROR_INCORRECT_STATE;
-        ExitNow();
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
-    VerifyOrExit(argc > 0, error = CHIP_ERROR_INVALID_ARGUMENT);
+    VerifyOrReturnError(argc > 0, CHIP_ERROR_INVALID_ARGUMENT);
 
     // Fork and execute the command.
     pid = fork();
-    VerifyOrExit(pid != -1, error = CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(pid != -1, CHIP_ERROR_INCORRECT_STATE);
 
     if (pid == 0)
     {
@@ -154,11 +151,8 @@
         // Parent process to wait on child.
         int status;
         wait(&status);
-        error = (status) ? CHIP_ERROR_INCORRECT_STATE : CHIP_NO_ERROR;
+        return (status) ? CHIP_ERROR_INCORRECT_STATE : CHIP_NO_ERROR;
     }
-
-exit:
-    return error;
 }
 
 #endif // CHIP_TARGET_STYLE_UNIX
diff --git a/examples/shell/shell_common/cmd_ping.cpp b/examples/shell/shell_common/cmd_ping.cpp
index c6a4415..aa4f889 100644
--- a/examples/shell/shell_common/cmd_ping.cpp
+++ b/examples/shell/shell_common/cmd_ping.cpp
@@ -132,7 +132,7 @@
 Transport::AdminPairingTable gAdmins;
 
 CHIP_ERROR SendEchoRequest(streamer_t * stream);
-void EchoTimerHandler(chip::System::Layer * systemLayer, void * appState, chip::System::Error error);
+void EchoTimerHandler(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR error);
 
 Transport::PeerAddress GetEchoPeerAddress()
 {
@@ -166,7 +166,7 @@
     gSessionManager.Shutdown();
 }
 
-void EchoTimerHandler(chip::System::Layer * systemLayer, void * appState, chip::System::Error error)
+void EchoTimerHandler(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR error)
 {
     if (gPingArguments.GetEchoRespCount() != gPingArguments.GetEchoCount())
     {
@@ -374,10 +374,9 @@
     streamer_printf(stream, "  -s  <size>      application payload size in bytes\n");
 }
 
-int cmd_ping(int argc, char ** argv)
+CHIP_ERROR cmd_ping(int argc, char ** argv)
 {
     streamer_t * sout = streamer_get();
-    int ret           = 0;
     int optIndex      = 0;
 
     gPingArguments.Reset();
@@ -388,7 +387,7 @@
         {
         case 'h':
             PrintUsage(sout);
-            return 0;
+            return CHIP_NO_ERROR;
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT
         case 'u':
             gPingArguments.SetUsingTCP(false);
@@ -401,7 +400,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -i\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -412,7 +411,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -c\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -423,7 +422,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -p\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -434,7 +433,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -s\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -445,7 +444,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -r\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -461,12 +460,12 @@
                 }
                 else
                 {
-                    ret = -1;
+                    return CHIP_ERROR_INVALID_ARGUMENT;
                 }
             }
             break;
         default:
-            ret = -1;
+            return CHIP_ERROR_INVALID_ARGUMENT;
         }
 
         optIndex++;
@@ -475,16 +474,13 @@
     if (optIndex >= argc)
     {
         streamer_printf(sout, "Missing IP address\n");
-        ret = -1;
+        return CHIP_ERROR_INVALID_ARGUMENT;
     }
 
-    if (ret == 0)
-    {
-        streamer_printf(sout, "IP address: %s\n", argv[optIndex]);
-        StartPinging(sout, argv[optIndex]);
-    }
+    streamer_printf(sout, "IP address: %s\n", argv[optIndex]);
+    StartPinging(sout, argv[optIndex]);
 
-    return ret;
+    return CHIP_NO_ERROR;
 }
 
 } // namespace
diff --git a/examples/shell/shell_common/cmd_send.cpp b/examples/shell/shell_common/cmd_send.cpp
index 45bdeb6..5caa790 100644
--- a/examples/shell/shell_common/cmd_send.cpp
+++ b/examples/shell/shell_common/cmd_send.cpp
@@ -312,10 +312,9 @@
     streamer_printf(stream, "  -s  <size>      application payload size in bytes\n");
 }
 
-int cmd_send(int argc, char ** argv)
+CHIP_ERROR cmd_send(int argc, char ** argv)
 {
     streamer_t * sout = streamer_get();
-    int ret           = 0;
     int optIndex      = 0;
 
     gSendArguments.Reset();
@@ -326,7 +325,7 @@
         {
         case 'h':
             PrintUsage(sout);
-            return 0;
+            return CHIP_NO_ERROR;
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT
         case 'u':
             gSendArguments.SetUsingTCP(false);
@@ -339,7 +338,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -P\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -350,7 +349,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -T\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -361,7 +360,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -p\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -372,7 +371,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -s\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -383,7 +382,7 @@
             if (++optIndex >= argc || argv[optIndex][0] == '-')
             {
                 streamer_printf(sout, "Invalid argument specified for -r\n");
-                return -1;
+                return CHIP_ERROR_INVALID_ARGUMENT;
             }
             else
             {
@@ -399,12 +398,12 @@
                 }
                 else
                 {
-                    ret = -1;
+                    return CHIP_ERROR_INVALID_ARGUMENT;
                 }
             }
             break;
         default:
-            ret = -1;
+            return CHIP_ERROR_INVALID_ARGUMENT;
         }
 
         optIndex++;
@@ -413,16 +412,13 @@
     if (optIndex >= argc)
     {
         streamer_printf(sout, "Missing IP address\n");
-        ret = -1;
+        return CHIP_ERROR_INVALID_ARGUMENT;
     }
 
-    if (ret == 0)
-    {
-        streamer_printf(sout, "IP address: %s\n", argv[optIndex]);
-        ProcessCommand(sout, argv[optIndex]);
-    }
+    streamer_printf(sout, "IP address: %s\n", argv[optIndex]);
+    ProcessCommand(sout, argv[optIndex]);
 
-    return ret;
+    return CHIP_NO_ERROR;
 }
 
 } // namespace
diff --git a/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp b/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp
index 004f539..8dd624e 100644
--- a/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp
+++ b/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp
@@ -150,8 +150,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -346,8 +346,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -893,8 +893,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1401,8 +1401,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp
index 669ce7d..85d53f1 100644
--- a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp
+++ b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp
@@ -138,8 +138,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -310,8 +310,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -359,8 +359,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -550,8 +550,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -730,8 +730,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -850,8 +850,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1046,8 +1046,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1576,8 +1576,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1850,8 +1850,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2539,8 +2539,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2820,8 +2820,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2887,8 +2887,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -3395,8 +3395,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/window-app/common/gen/IMClusterCommandHandler.cpp b/examples/window-app/common/gen/IMClusterCommandHandler.cpp
index 776574b..d400e8b 100644
--- a/examples/window-app/common/gen/IMClusterCommandHandler.cpp
+++ b/examples/window-app/common/gen/IMClusterCommandHandler.cpp
@@ -226,8 +226,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -915,8 +915,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1423,8 +1423,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1736,8 +1736,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/examples/window-app/efr32/src/AppTask.cpp b/examples/window-app/efr32/src/AppTask.cpp
index 07628d5..c7a2ebd 100644
--- a/examples/window-app/efr32/src/AppTask.cpp
+++ b/examples/window-app/efr32/src/AppTask.cpp
@@ -78,7 +78,7 @@
 
 int AppTask::Start()
 {
-    int err = CHIP_ERROR_MAX;
+    int err = CHIP_CONFIG_CORE_ERROR_MAX;
 
     mQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct);
     if (mQueue == NULL)
diff --git a/examples/window-app/efr32/src/AppTimer.cpp b/examples/window-app/efr32/src/AppTimer.cpp
index 3a67a29..397c63c 100644
--- a/examples/window-app/efr32/src/AppTimer.cpp
+++ b/examples/window-app/efr32/src/AppTimer.cpp
@@ -59,7 +59,7 @@
     if (xTimerStart(mHandler, 100) != pdPASS)
     {
         EFR32_LOG("AppTimer start() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mIsActive = true;
@@ -79,7 +79,7 @@
     if (xTimerChangePeriod(mHandler, timeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS)
     {
         EFR32_LOG("AppTimer start() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 
     mIsActive = true;
@@ -104,7 +104,7 @@
     if (xTimerStop(mHandler, 0) == pdFAIL)
     {
         EFR32_LOG("AppTimer stop() failed");
-        appError(CHIP_ERROR_MAX);
+        appError(CHIP_CONFIG_CORE_ERROR_MAX);
     }
 }
 
diff --git a/examples/window-app/efr32/src/main.cpp b/examples/window-app/efr32/src/main.cpp
index ed5d581..2831cfc 100644
--- a/examples/window-app/efr32/src/main.cpp
+++ b/examples/window-app/efr32/src/main.cpp
@@ -95,7 +95,7 @@
 // ================================================================================
 int main(void)
 {
-    int ret = CHIP_ERROR_MAX;
+    int ret = CHIP_CONFIG_CORE_ERROR_MAX;
 
     init_efrPlatform();
 
diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp
index 9e30eba..431098d 100644
--- a/src/app/EventManagement.cpp
+++ b/src/app/EventManagement.cpp
@@ -403,7 +403,7 @@
     err = mpEventNumberCounter->Advance();
     if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(EventLogging, "%s Advance() for priority %u failed with %" PRId32, __FUNCTION__,
+        ChipLogError(EventLogging, "%s Advance() for priority %u failed with %" CHIP_ERROR_FORMAT, __FUNCTION__,
                      static_cast<unsigned>(mPriority), err);
     }
 
diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp
index c6b8ccf..a5215eb 100644
--- a/src/app/reporting/Engine.cpp
+++ b/src/app/reporting/Engine.cpp
@@ -76,8 +76,8 @@
 
     if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(DataManagement, "Error retrieving data from clusterId: %" PRIx32 ", err = %" PRId32, aClusterInfo.mClusterId,
-                     err);
+        ChipLogError(DataManagement, "Error retrieving data from clusterId: %" PRIx32 ", err = %" CHIP_ERROR_FORMAT,
+                     aClusterInfo.mClusterId, err);
     }
 
     return err;
@@ -216,7 +216,7 @@
 exit:
     if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(DataManagement, "Error retrieving events, err = %" PRId32, err);
+        ChipLogError(DataManagement, "Error retrieving events, err = %" CHIP_ERROR_FORMAT, err);
     }
 
     return err;
@@ -275,7 +275,8 @@
 
     ChipLogDetail(DataManagement, "<RE> Sending report...");
     err = SendReport(apReadHandler, std::move(bufHandle));
-    VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(DataManagement, "<RE> Error sending out report data with %" PRId32 "!", err));
+    VerifyOrExit(err == CHIP_NO_ERROR,
+                 ChipLogError(DataManagement, "<RE> Error sending out report data with %" CHIP_ERROR_FORMAT "!", err));
 
     ChipLogDetail(DataManagement, "<RE> ReportsInFlight = %" PRIu32 " with readHandler %" PRIu32 ", RE has %s", mNumReportsInFlight,
                   mCurReadHandlerIdx, mMoreChunkedMessages ? "more messages" : "no more messages");
@@ -294,7 +295,7 @@
     return err;
 }
 
-void Engine::Run(System::Layer * aSystemLayer, void * apAppState, System::Error)
+void Engine::Run(System::Layer * aSystemLayer, void * apAppState, CHIP_ERROR)
 {
     Engine * const pEngine = reinterpret_cast<Engine *>(apAppState);
     pEngine->Run();
diff --git a/src/app/reporting/Engine.h b/src/app/reporting/Engine.h
index efa0d5a..5ab45ab 100644
--- a/src/app/reporting/Engine.h
+++ b/src/app/reporting/Engine.h
@@ -100,7 +100,7 @@
      * Generate and send the report data request when there exists subscription or read request
      *
      */
-    static void Run(System::Layer * aSystemLayer, void * apAppState, System::Error);
+    static void Run(System::Layer * aSystemLayer, void * apAppState, CHIP_ERROR);
 
     /**
      * Boolean to show if more chunk message on the way
diff --git a/src/app/server/RendezvousServer.cpp b/src/app/server/RendezvousServer.cpp
index 25aa9b2..a578692 100644
--- a/src/app/server/RendezvousServer.cpp
+++ b/src/app/server/RendezvousServer.cpp
@@ -55,7 +55,8 @@
         }
         else
         {
-            ChipLogError(Discovery, "Commissioning errored out with error %" PRId32, event->CommissioningComplete.status);
+            ChipLogError(Discovery, "Commissioning errored out with error %" CHIP_ERROR_FORMAT,
+                         event->CommissioningComplete.status);
         }
         // TODO: Commissioning complete means we can finalize the admin in our storage
     }
diff --git a/src/app/tests/integration/MockEvents.cpp b/src/app/tests/integration/MockEvents.cpp
index 1836814..2f02cbf 100644
--- a/src/app/tests/integration/MockEvents.cpp
+++ b/src/app/tests/integration/MockEvents.cpp
@@ -151,7 +151,7 @@
     return err;
 }
 
-void MockEventGeneratorImpl::HandleNextEvent(chip::System::Layer * apSystemLayer, void * apAppState, chip::System::Error aErr)
+void MockEventGeneratorImpl::HandleNextEvent(chip::System::Layer * apSystemLayer, void * apAppState, CHIP_ERROR aErr)
 {
     MockEventGeneratorImpl * generator = static_cast<MockEventGeneratorImpl *>(apAppState);
     if (gMockEventStop)
diff --git a/src/app/tests/integration/MockEvents.h b/src/app/tests/integration/MockEvents.h
index e79d05e..ab318e4 100644
--- a/src/app/tests/integration/MockEvents.h
+++ b/src/app/tests/integration/MockEvents.h
@@ -66,7 +66,7 @@
     bool IsEventGeneratorStopped();
 
 private:
-    static void HandleNextEvent(chip::System::Layer * apSystemLayer, void * apAppState, chip::System::Error aErr);
+    static void HandleNextEvent(chip::System::Layer * apSystemLayer, void * apAppState, CHIP_ERROR aErr);
     chip::Messaging::ExchangeManager * mpExchangeMgr;
     uint32_t mTimeBetweenEvents; //< delay, in miliseconds, between events.
     bool mEventWraparound;       //< does the event generator run indefinitely, or does it stop after iterating through its states
diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp
index 6fe8fdf..f96f097 100644
--- a/src/app/tests/integration/chip_im_initiator.cpp
+++ b/src/app/tests/integration/chip_im_initiator.cpp
@@ -309,7 +309,7 @@
     }
     CHIP_ERROR ReportError(const chip::app::ReadClient * apReadClient, CHIP_ERROR aError) override
     {
-        printf("ReportError with err %d", aError);
+        printf("ReportError with err %" CHIP_ERROR_FORMAT, aError);
         return CHIP_NO_ERROR;
     }
     CHIP_ERROR CommandResponseStatus(const chip::app::CommandSender * apCommandSender,
diff --git a/src/app/util/af-event.cpp b/src/app/util/af-event.cpp
index 6ade0c4..a43ddd8 100644
--- a/src/app/util/af-event.cpp
+++ b/src/app/util/af-event.cpp
@@ -96,7 +96,7 @@
     { NULL, NULL }
 };
 
-void EventControlHandler(chip::System::Layer * systemLayer, void * appState, chip::System::Error error)
+void EventControlHandler(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR error)
 {
     EmberEventControl * control = reinterpret_cast<EmberEventControl *>(appState);
     if (control->status != EMBER_EVENT_INACTIVE)
diff --git a/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt b/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt
index c327817..7a0f532 100644
--- a/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt
+++ b/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt
@@ -79,7 +79,7 @@
                                                        (chip::app::CommandPathFlags::kEndpointIdValid) };
       apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id,
         Protocols::InteractionModel::ProtocolCode::InvalidCommand);
-      ChipLogProgress(Zcl, "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32, validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
+      ChipLogProgress(Zcl, "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32, validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
 
diff --git a/src/ble/BLEEndPoint.cpp b/src/ble/BLEEndPoint.cpp
index 4abe18b..a303f11 100644
--- a/src/ble/BLEEndPoint.cpp
+++ b/src/ble/BLEEndPoint.cpp
@@ -101,9 +101,9 @@
 namespace chip {
 namespace Ble {
 
-BLE_ERROR BLEEndPoint::StartConnect()
+CHIP_ERROR BLEEndPoint::StartConnect()
 {
-    BLE_ERROR err = BLE_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     BleTransportCapabilitiesRequestMessage req;
     PacketBufferHandle buf;
     constexpr uint8_t numVersions =
@@ -111,12 +111,12 @@
     static_assert(numVersions <= NUM_SUPPORTED_PROTOCOL_VERSIONS, "Incompatibly protocol versions");
 
     // Ensure we're in the correct state.
-    VerifyOrExit(mState == kState_Ready, err = BLE_ERROR_INCORRECT_STATE);
+    VerifyOrExit(mState == kState_Ready, err = CHIP_ERROR_INCORRECT_STATE);
     mState = kState_Connecting;
 
     // Build BLE transport protocol capabilities request.
     buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize);
-    VerifyOrExit(!buf.IsNull(), err = BLE_ERROR_NO_MEMORY);
+    VerifyOrExit(!buf.IsNull(), err = CHIP_ERROR_NO_MEMORY);
 
     // Zero-initialize BLE transport capabilities request.
     memset(&req, 0, sizeof(req));
@@ -154,7 +154,7 @@
 
 exit:
     // If we failed to initiate the connection, close the end point.
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         StopConnectTimer();
         DoClose(kBleCloseFlag_AbortTransmission, err);
@@ -163,9 +163,9 @@
     return err;
 }
 
-BLE_ERROR BLEEndPoint::HandleConnectComplete()
+CHIP_ERROR BLEEndPoint::HandleConnectComplete()
 {
-    BLE_ERROR err = BLE_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     mState = kState_Connected;
 
@@ -176,7 +176,7 @@
     if (mBleTransport != nullptr)
     {
         // Indicate connect complete to next-higher layer.
-        mBleTransport->OnEndPointConnectComplete(this, BLE_NO_ERROR);
+        mBleTransport->OnEndPointConnectComplete(this, CHIP_NO_ERROR);
     }
     else
     {
@@ -187,9 +187,9 @@
     return err;
 }
 
-BLE_ERROR BLEEndPoint::HandleReceiveConnectionComplete()
+CHIP_ERROR BLEEndPoint::HandleReceiveConnectionComplete()
 {
-    BLE_ERROR err = BLE_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     ChipLogDebugBleEndPoint(Ble, "entered HandleReceiveConnectionComplete");
     mState = kState_Connected;
@@ -213,10 +213,10 @@
 
 void BLEEndPoint::HandleSubscribeReceived()
 {
-    BLE_ERROR err = BLE_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
-    VerifyOrExit(mState == kState_Connecting || mState == kState_Aborting, err = BLE_ERROR_INCORRECT_STATE);
-    VerifyOrExit(!mSendQueue.IsNull(), err = BLE_ERROR_INCORRECT_STATE);
+    VerifyOrExit(mState == kState_Connecting || mState == kState_Aborting, err = CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrExit(!mSendQueue.IsNull(), err = CHIP_ERROR_INCORRECT_STATE);
 
     // Send BTP capabilities response to peripheral via GATT indication.
 #if CHIP_ENABLE_CHIPOBLE_TEST
@@ -263,7 +263,7 @@
     } // Else State == kState_Aborting, so we'll close end point when indication confirmation received.
 
 exit:
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         DoClose(kBleCloseFlag_SuppressCallback | kBleCloseFlag_AbortTransmission, err);
     }
@@ -274,11 +274,11 @@
     ChipLogProgress(Ble, "subscribe complete, ep = %p", this);
     mConnStateFlags.Clear(ConnectionStateFlag::kGattOperationInFlight);
 
-    BLE_ERROR err = DriveSending();
+    CHIP_ERROR err = DriveSending();
 
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
-        DoClose(kBleCloseFlag_AbortTransmission, BLE_NO_ERROR);
+        DoClose(kBleCloseFlag_AbortTransmission, CHIP_NO_ERROR);
     }
 }
 
@@ -308,7 +308,7 @@
     OnCommandReceived = NULL;
 #endif
 
-    DoClose(kBleCloseFlag_SuppressCallback | kBleCloseFlag_AbortTransmission, BLE_NO_ERROR);
+    DoClose(kBleCloseFlag_SuppressCallback | kBleCloseFlag_AbortTransmission, CHIP_NO_ERROR);
 }
 
 void BLEEndPoint::Close()
@@ -321,10 +321,10 @@
     OnCommandReceived = NULL;
 #endif
 
-    DoClose(kBleCloseFlag_SuppressCallback, BLE_NO_ERROR);
+    DoClose(kBleCloseFlag_SuppressCallback, CHIP_NO_ERROR);
 }
 
-void BLEEndPoint::DoClose(uint8_t flags, BLE_ERROR err)
+void BLEEndPoint::DoClose(uint8_t flags, CHIP_ERROR err)
 {
     uint8_t oldState = mState;
 
@@ -374,7 +374,7 @@
     }
 }
 
-void BLEEndPoint::FinalizeClose(uint8_t oldState, uint8_t flags, BLE_ERROR err)
+void BLEEndPoint::FinalizeClose(uint8_t oldState, uint8_t flags, CHIP_ERROR err)
 {
     mState = kState_Closed;
 
@@ -424,7 +424,7 @@
                 // received in the downcall to UnsubscribeCharacteristic, so set timer for the unsubscribe to complete.
                 err = StartUnsubscribeTimer();
 
-                if (err != BLE_NO_ERROR)
+                if (err != CHIP_NO_ERROR)
                 {
                     Free();
                 }
@@ -440,7 +440,7 @@
     }
 }
 
-void BLEEndPoint::DoCloseCallback(uint8_t state, uint8_t flags, BLE_ERROR err)
+void BLEEndPoint::DoCloseCallback(uint8_t state, uint8_t flags, CHIP_ERROR err)
 {
     if (state == kState_Connecting)
     {
@@ -528,36 +528,36 @@
     mBtpEngine.ClearRxPacket();
 }
 
-BLE_ERROR BLEEndPoint::Init(BleLayer * bleLayer, BLE_CONNECTION_OBJECT connObj, BleRole role, bool autoClose)
+CHIP_ERROR BLEEndPoint::Init(BleLayer * bleLayer, BLE_CONNECTION_OBJECT connObj, BleRole role, bool autoClose)
 {
     // Fail if already initialized.
-    VerifyOrReturnError(mBle == nullptr, BLE_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mBle == nullptr, CHIP_ERROR_INCORRECT_STATE);
 
     // Validate args.
-    VerifyOrReturnError(bleLayer != nullptr, BLE_ERROR_BAD_ARGS);
-    VerifyOrReturnError(connObj != BLE_CONNECTION_UNINITIALIZED, BLE_ERROR_BAD_ARGS);
-    VerifyOrReturnError((role == kBleRole_Central || role == kBleRole_Peripheral), BLE_ERROR_BAD_ARGS);
+    VerifyOrReturnError(bleLayer != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
+    VerifyOrReturnError(connObj != BLE_CONNECTION_UNINITIALIZED, CHIP_ERROR_INVALID_ARGUMENT);
+    VerifyOrReturnError((role == kBleRole_Central || role == kBleRole_Peripheral), CHIP_ERROR_INVALID_ARGUMENT);
 
     // If end point plays peripheral role, expect ack for indication sent as last step of BTP handshake.
     // If central, periperal's handshake indication 'ack's write sent by central to kick off the BTP handshake.
     bool expectInitialAck = (role == kBleRole_Peripheral);
 
-    BLE_ERROR err = mBtpEngine.Init(this, expectInitialAck);
-    if (err != BLE_NO_ERROR)
+    CHIP_ERROR err = mBtpEngine.Init(this, expectInitialAck);
+    if (err != CHIP_NO_ERROR)
     {
         ChipLogError(Ble, "BtpEngine init failed");
         return err;
     }
 
 #if CHIP_ENABLE_CHIPOBLE_TEST
-    err = (BLE_ERROR) mTxQueueMutex.Init(mTxQueueMutex);
-    if (err != BLE_NO_ERROR)
+    err = static_cast<CHIP_ERROR>(mTxQueueMutex.Init(mTxQueueMutex));
+    if (err != CHIP_NO_ERROR)
     {
         ChipLogError(Ble, "%s: Mutex init failed", __FUNCTION__);
         return err;
     }
     err = mBtpEngineTest.Init(this);
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         ChipLogError(Ble, "BTP test init failed");
         return err;
@@ -583,7 +583,7 @@
     // End point is ready to connect or receive a connection.
     mState = kState_Ready;
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void BLEEndPoint::Release()
@@ -597,9 +597,9 @@
     }
 }
 
-BLE_ERROR BLEEndPoint::SendCharacteristic(PacketBufferHandle && buf)
+CHIP_ERROR BLEEndPoint::SendCharacteristic(PacketBufferHandle && buf)
 {
-    BLE_ERROR err = BLE_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     if (mRole == kBleRole_Central)
     {
@@ -659,14 +659,14 @@
     QueueTxUnlock();
 }
 
-BLE_ERROR BLEEndPoint::Send(PacketBufferHandle && data)
+CHIP_ERROR BLEEndPoint::Send(PacketBufferHandle && data)
 {
     ChipLogDebugBleEndPoint(Ble, "entered Send");
 
-    BLE_ERROR err = BLE_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
-    VerifyOrExit(!data.IsNull(), err = BLE_ERROR_BAD_ARGS);
-    VerifyOrExit(IsConnected(mState), err = BLE_ERROR_INCORRECT_STATE);
+    VerifyOrExit(!data.IsNull(), err = CHIP_ERROR_INVALID_ARGUMENT);
+    VerifyOrExit(IsConnected(mState), err = CHIP_ERROR_INCORRECT_STATE);
 
     // Ensure outgoing message fits in a single contiguous packet buffer, as currently required by the
     // message fragmentation and reassembly engine.
@@ -676,7 +676,7 @@
 
         if (data->HasChainedBuffer())
         {
-            err = BLE_ERROR_OUTBOUND_MESSAGE_TOO_BIG;
+            err = CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG;
             ExitNow();
         }
     }
@@ -690,7 +690,7 @@
 
 exit:
     ChipLogDebugBleEndPoint(Ble, "exiting Send");
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         DoClose(kBleCloseFlag_AbortTransmission, err);
     }
@@ -719,7 +719,7 @@
     return mBtpEngine.HandleCharacteristicSend(std::move(data), sentAck);
 }
 
-BLE_ERROR BLEEndPoint::SendNextMessage()
+CHIP_ERROR BLEEndPoint::SendNextMessage()
 {
     // Get the first queued packet to send
     QueueTxLock();
@@ -729,7 +729,7 @@
     if (mSendQueue.IsNull())
     {
         QueueTxUnlock();
-        return BLE_NO_ERROR;
+        return CHIP_NO_ERROR;
     }
 #endif
 
@@ -774,7 +774,7 @@
     return StartAckReceivedTimer();
 }
 
-BLE_ERROR BLEEndPoint::ContinueMessageSend()
+CHIP_ERROR BLEEndPoint::ContinueMessageSend()
 {
     bool sentAck;
 
@@ -799,11 +799,11 @@
     return StartAckReceivedTimer();
 }
 
-BLE_ERROR BLEEndPoint::HandleHandshakeConfirmationReceived()
+CHIP_ERROR BLEEndPoint::HandleHandshakeConfirmationReceived()
 {
     ChipLogDebugBleEndPoint(Ble, "entered HandleHandshakeConfirmationReceived");
 
-    BLE_ERROR err      = BLE_NO_ERROR;
+    CHIP_ERROR err     = CHIP_NO_ERROR;
     uint8_t closeFlags = kBleCloseFlag_AbortTransmission;
 
     // Free capabilities request/response payload.
@@ -856,7 +856,7 @@
 exit:
     ChipLogDebugBleEndPoint(Ble, "exiting HandleHandshakeConfirmationReceived");
 
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         DoClose(closeFlags, err);
     }
@@ -864,9 +864,9 @@
     return err;
 }
 
-BLE_ERROR BLEEndPoint::HandleFragmentConfirmationReceived()
+CHIP_ERROR BLEEndPoint::HandleFragmentConfirmationReceived()
 {
-    BLE_ERROR err = BLE_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     ChipLogDebugBleEndPoint(Ble, "entered HandleFragmentConfirmationReceived");
 
@@ -878,7 +878,7 @@
     }
 
     // Ensure we're in correct state to receive confirmation of non-handshake GATT send.
-    VerifyOrExit(IsConnected(mState), err = BLE_ERROR_INCORRECT_STATE);
+    VerifyOrExit(IsConnected(mState), err = CHIP_ERROR_INCORRECT_STATE);
 
     // TODO Packet buffer high water mark optimization: if ack pending, but fragmenter state == complete, free fragmenter's
     // tx buf before sending ack.
@@ -910,7 +910,7 @@
     }
 
 exit:
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         DoClose(kBleCloseFlag_AbortTransmission, err);
     }
@@ -918,7 +918,7 @@
     return err;
 }
 
-BLE_ERROR BLEEndPoint::HandleGattSendConfirmationReceived()
+CHIP_ERROR BLEEndPoint::HandleGattSendConfirmationReceived()
 {
     ChipLogDebugBleEndPoint(Ble, "entered HandleGattSendConfirmationReceived");
 
@@ -936,7 +936,7 @@
     return HandleFragmentConfirmationReceived();
 }
 
-BLE_ERROR BLEEndPoint::DriveStandAloneAck()
+CHIP_ERROR BLEEndPoint::DriveStandAloneAck()
 {
     // Stop send-ack timer if running.
     StopSendAckTimer();
@@ -945,14 +945,14 @@
     if (mAckToSend.IsNull())
     {
         mAckToSend = System::PacketBufferHandle::New(kTransferProtocolStandaloneAckHeaderSize);
-        VerifyOrReturnError(!mAckToSend.IsNull(), BLE_ERROR_NO_MEMORY);
+        VerifyOrReturnError(!mAckToSend.IsNull(), CHIP_ERROR_NO_MEMORY);
     }
 
     // Attempt to send stand-alone ack.
     return DriveSending();
 }
 
-BLE_ERROR BLEEndPoint::DoSendStandAloneAck()
+CHIP_ERROR BLEEndPoint::DoSendStandAloneAck()
 {
     ChipLogDebugBleEndPoint(Ble, "entered DoSendStandAloneAck; sending stand-alone ack");
 
@@ -970,7 +970,7 @@
     return StartAckReceivedTimer();
 }
 
-BLE_ERROR BLEEndPoint::DriveSending()
+CHIP_ERROR BLEEndPoint::DriveSending()
 {
     ChipLogDebugBleEndPoint(Ble, "entered DriveSending");
 
@@ -999,7 +999,7 @@
 #endif
 
         // Can't send anything.
-        return BLE_NO_ERROR;
+        return CHIP_NO_ERROR;
     }
 
     // Otherwise, let's see what we can send.
@@ -1043,7 +1043,7 @@
         else if (mState == kState_Closing && !mBtpEngine.ExpectingAck()) // and mSendQueue is NULL, per above...
         {
             // If end point closing, got last ack, and got out-of-order confirmation for last send, finalize close.
-            FinalizeClose(mState, kBleCloseFlag_SuppressCallback, BLE_NO_ERROR);
+            FinalizeClose(mState, kBleCloseFlag_SuppressCallback, CHIP_NO_ERROR);
         }
         else
         {
@@ -1051,16 +1051,16 @@
         }
     }
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BLEEndPoint::HandleCapabilitiesRequestReceived(PacketBufferHandle && data)
+CHIP_ERROR BLEEndPoint::HandleCapabilitiesRequestReceived(PacketBufferHandle && data)
 {
     BleTransportCapabilitiesRequestMessage req;
     BleTransportCapabilitiesResponseMessage resp;
     uint16_t mtu;
 
-    VerifyOrReturnError(!data.IsNull(), BLE_ERROR_BAD_ARGS);
+    VerifyOrReturnError(!data.IsNull(), CHIP_ERROR_INVALID_ARGUMENT);
 
     mState = kState_Connecting;
 
@@ -1068,7 +1068,7 @@
     ReturnErrorOnFailure(BleTransportCapabilitiesRequestMessage::Decode(data, req));
 
     PacketBufferHandle responseBuf = System::PacketBufferHandle::New(kCapabilitiesResponseLength);
-    VerifyOrReturnError(!responseBuf.IsNull(), BLE_ERROR_NO_MEMORY);
+    VerifyOrReturnError(!responseBuf.IsNull(), CHIP_ERROR_NO_MEMORY);
 
     // Determine BLE connection's negotiated ATT MTU, if possible.
     if (req.mMtu > 0) // If MTU was observed and provided by central...
@@ -1135,11 +1135,11 @@
     return StartReceiveConnectionTimer();
 }
 
-BLE_ERROR BLEEndPoint::HandleCapabilitiesResponseReceived(PacketBufferHandle && data)
+CHIP_ERROR BLEEndPoint::HandleCapabilitiesResponseReceived(PacketBufferHandle && data)
 {
     BleTransportCapabilitiesResponseMessage resp;
 
-    VerifyOrReturnError(!data.IsNull(), BLE_ERROR_BAD_ARGS);
+    VerifyOrReturnError(!data.IsNull(), CHIP_ERROR_INVALID_ARGUMENT);
 
     // Decode BTP capabilities response.
     ReturnErrorOnFailure(BleTransportCapabilitiesResponseMessage::Decode(data, resp));
@@ -1216,10 +1216,10 @@
     return static_cast<uint8_t>(newRemoteWindowBoundary - newestUnackedSentSeqNum);
 }
 
-BLE_ERROR BLEEndPoint::Receive(PacketBufferHandle && data)
+CHIP_ERROR BLEEndPoint::Receive(PacketBufferHandle && data)
 {
     ChipLogDebugBleEndPoint(Ble, "+++++++++++++++++++++ entered receive");
-    BLE_ERROR err                = BLE_NO_ERROR;
+    CHIP_ERROR err               = CHIP_NO_ERROR;
     SequenceNumber_t receivedAck = 0;
     uint8_t closeFlags           = kBleCloseFlag_AbortTransmission;
     bool didReceiveAck           = false;
@@ -1245,7 +1245,7 @@
             if (mRole == kBleRole_Central) // If we're a central receiving a capabilities response indication...
             {
                 // Ensure end point's in the right state before continuing.
-                VerifyOrExit(mState == kState_Connecting, err = BLE_ERROR_INCORRECT_STATE);
+                VerifyOrExit(mState == kState_Connecting, err = CHIP_ERROR_INCORRECT_STATE);
                 mConnStateFlags.Set(ConnectionStateFlag::kCapabilitiesMsgReceived);
 
                 err = HandleCapabilitiesResponseReceived(std::move(data));
@@ -1254,12 +1254,12 @@
             else // Or, a peripheral receiving a capabilities request write...
             {
                 // Ensure end point's in the right state before continuing.
-                VerifyOrExit(mState == kState_Ready, err = BLE_ERROR_INCORRECT_STATE);
+                VerifyOrExit(mState == kState_Ready, err = CHIP_ERROR_INCORRECT_STATE);
                 mConnStateFlags.Set(ConnectionStateFlag::kCapabilitiesMsgReceived);
 
                 err = HandleCapabilitiesRequestReceived(std::move(data));
 
-                if (err != BLE_NO_ERROR)
+                if (err != CHIP_NO_ERROR)
                 {
                     // If an error occurred decoding and handling the capabilities request, release the BLE connection.
                     // Central's connect attempt will time out if peripheral's application decides to keep the BLE
@@ -1281,7 +1281,7 @@
     if (!IsConnected(mState))
     {
         ChipLogError(Ble, "ep rx'd packet in bad state");
-        err = BLE_ERROR_INCORRECT_STATE;
+        err = CHIP_ERROR_INCORRECT_STATE;
 
         ExitNow();
     }
@@ -1315,7 +1315,7 @@
             if (mState == kState_Closing && mSendQueue.IsNull() && mBtpEngine.TxState() == BtpEngine::kState_Idle)
             {
                 // If end point closing, got confirmation for last send, and waiting for last ack, finalize close.
-                FinalizeClose(mState, kBleCloseFlag_SuppressCallback, BLE_NO_ERROR);
+                FinalizeClose(mState, kBleCloseFlag_SuppressCallback, CHIP_NO_ERROR);
                 ExitNow();
             }
         }
@@ -1403,7 +1403,7 @@
     }
 
 exit:
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         DoClose(closeFlags, err);
     }
@@ -1425,71 +1425,69 @@
     return mBle->mPlatformDelegate->SendIndication(mConnObj, &CHIP_BLE_SVC_ID, &mBle->CHIP_BLE_CHAR_2_ID, std::move(buf));
 }
 
-BLE_ERROR BLEEndPoint::StartConnectTimer()
+CHIP_ERROR BLEEndPoint::StartConnectTimer()
 {
-    const chip::System::Error timerErr = mBle->mSystemLayer->StartTimer(BLE_CONNECT_TIMEOUT_MS, HandleConnectTimeout, this);
-    VerifyOrReturnError(timerErr == CHIP_SYSTEM_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
+    const CHIP_ERROR timerErr = mBle->mSystemLayer->StartTimer(BLE_CONNECT_TIMEOUT_MS, HandleConnectTimeout, this);
+    VerifyOrReturnError(timerErr == CHIP_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
     mTimerStateFlags.Set(TimerStateFlag::kConnectTimerRunning);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BLEEndPoint::StartReceiveConnectionTimer()
+CHIP_ERROR BLEEndPoint::StartReceiveConnectionTimer()
 {
-    const chip::System::Error timerErr =
-        mBle->mSystemLayer->StartTimer(BLE_CONNECT_TIMEOUT_MS, HandleReceiveConnectionTimeout, this);
-    VerifyOrReturnError(timerErr == CHIP_SYSTEM_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
+    const CHIP_ERROR timerErr = mBle->mSystemLayer->StartTimer(BLE_CONNECT_TIMEOUT_MS, HandleReceiveConnectionTimeout, this);
+    VerifyOrReturnError(timerErr == CHIP_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
     mTimerStateFlags.Set(TimerStateFlag::kReceiveConnectionTimerRunning);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BLEEndPoint::StartAckReceivedTimer()
+CHIP_ERROR BLEEndPoint::StartAckReceivedTimer()
 {
     if (!mTimerStateFlags.Has(TimerStateFlag::kAckReceivedTimerRunning))
     {
-        const chip::System::Error timerErr =
-            mBle->mSystemLayer->StartTimer(BTP_ACK_RECEIVED_TIMEOUT_MS, HandleAckReceivedTimeout, this);
-        VerifyOrReturnError(timerErr == CHIP_SYSTEM_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
+        const CHIP_ERROR timerErr = mBle->mSystemLayer->StartTimer(BTP_ACK_RECEIVED_TIMEOUT_MS, HandleAckReceivedTimeout, this);
+        VerifyOrReturnError(timerErr == CHIP_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
 
         mTimerStateFlags.Set(TimerStateFlag::kAckReceivedTimerRunning);
     }
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BLEEndPoint::RestartAckReceivedTimer()
+CHIP_ERROR BLEEndPoint::RestartAckReceivedTimer()
 {
-    VerifyOrReturnError(mTimerStateFlags.Has(TimerStateFlag::kAckReceivedTimerRunning), BLE_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mTimerStateFlags.Has(TimerStateFlag::kAckReceivedTimerRunning), CHIP_ERROR_INCORRECT_STATE);
 
     StopAckReceivedTimer();
 
     return StartAckReceivedTimer();
 }
 
-BLE_ERROR BLEEndPoint::StartSendAckTimer()
+CHIP_ERROR BLEEndPoint::StartSendAckTimer()
 {
     ChipLogDebugBleEndPoint(Ble, "entered StartSendAckTimer");
 
     if (!mTimerStateFlags.Has(TimerStateFlag::kSendAckTimerRunning))
     {
         ChipLogDebugBleEndPoint(Ble, "starting new SendAckTimer");
-        const chip::System::Error timerErr = mBle->mSystemLayer->StartTimer(BTP_ACK_SEND_TIMEOUT_MS, HandleSendAckTimeout, this);
-        VerifyOrReturnError(timerErr == CHIP_SYSTEM_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
+        const CHIP_ERROR timerErr = mBle->mSystemLayer->StartTimer(BTP_ACK_SEND_TIMEOUT_MS, HandleSendAckTimeout, this);
+        VerifyOrReturnError(timerErr == CHIP_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
 
         mTimerStateFlags.Set(TimerStateFlag::kSendAckTimerRunning);
     }
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BLEEndPoint::StartUnsubscribeTimer()
+CHIP_ERROR BLEEndPoint::StartUnsubscribeTimer()
 {
-    const chip::System::Error timerErr = mBle->mSystemLayer->StartTimer(BLE_UNSUBSCRIBE_TIMEOUT_MS, HandleUnsubscribeTimeout, this);
-    VerifyOrReturnError(timerErr == CHIP_SYSTEM_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
+    const CHIP_ERROR timerErr = mBle->mSystemLayer->StartTimer(BLE_UNSUBSCRIBE_TIMEOUT_MS, HandleUnsubscribeTimeout, this);
+    VerifyOrReturnError(timerErr == CHIP_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
     mTimerStateFlags.Set(TimerStateFlag::kUnsubscribeTimerRunning);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void BLEEndPoint::StopConnectTimer()
@@ -1527,7 +1525,7 @@
     mTimerStateFlags.Clear(TimerStateFlag::kUnsubscribeTimerRunning);
 }
 
-void BLEEndPoint::HandleConnectTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err)
+void BLEEndPoint::HandleConnectTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err)
 {
     BLEEndPoint * ep = static_cast<BLEEndPoint *>(appState);
 
@@ -1540,7 +1538,7 @@
     }
 }
 
-void BLEEndPoint::HandleReceiveConnectionTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err)
+void BLEEndPoint::HandleReceiveConnectionTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err)
 {
     BLEEndPoint * ep = static_cast<BLEEndPoint *>(appState);
 
@@ -1553,7 +1551,7 @@
     }
 }
 
-void BLEEndPoint::HandleAckReceivedTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err)
+void BLEEndPoint::HandleAckReceivedTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err)
 {
     BLEEndPoint * ep = static_cast<BLEEndPoint *>(appState);
 
@@ -1567,7 +1565,7 @@
     }
 }
 
-void BLEEndPoint::HandleSendAckTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err)
+void BLEEndPoint::HandleSendAckTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err)
 {
     BLEEndPoint * ep = static_cast<BLEEndPoint *>(appState);
 
@@ -1579,9 +1577,9 @@
         // If previous stand-alone ack isn't still in flight...
         if (!ep->mConnStateFlags.Has(ConnectionStateFlag::kStandAloneAckInFlight))
         {
-            BLE_ERROR sendErr = ep->DriveStandAloneAck();
+            CHIP_ERROR sendErr = ep->DriveStandAloneAck();
 
-            if (sendErr != BLE_NO_ERROR)
+            if (sendErr != CHIP_NO_ERROR)
             {
                 ep->DoClose(kBleCloseFlag_AbortTransmission, sendErr);
             }
@@ -1589,7 +1587,7 @@
     }
 }
 
-void BLEEndPoint::HandleUnsubscribeTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err)
+void BLEEndPoint::HandleUnsubscribeTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err)
 {
     BLEEndPoint * ep = static_cast<BLEEndPoint *>(appState);
 
diff --git a/src/ble/BLEEndPoint.h b/src/ble/BLEEndPoint.h
index 4503f52..f36f985 100644
--- a/src/ble/BLEEndPoint.h
+++ b/src/ble/BLEEndPoint.h
@@ -80,13 +80,13 @@
               // BLE transport protocol connection, not of underlying BLE connection.
 
     // Public function pointers:
-    typedef void (*OnConnectCompleteFunct)(BLEEndPoint * endPoint, BLE_ERROR err);
+    typedef void (*OnConnectCompleteFunct)(BLEEndPoint * endPoint, CHIP_ERROR err);
     OnConnectCompleteFunct OnConnectComplete;
 
     typedef void (*OnMessageReceivedFunct)(BLEEndPoint * endPoint, PacketBufferHandle && msg);
     OnMessageReceivedFunct OnMessageReceived;
 
-    typedef void (*OnConnectionClosedFunct)(BLEEndPoint * endPoint, BLE_ERROR err);
+    typedef void (*OnConnectionClosedFunct)(BLEEndPoint * endPoint, CHIP_ERROR err);
     OnConnectionClosedFunct OnConnectionClosed;
 
 #if CHIP_ENABLE_CHIPOBLE_TEST
@@ -99,9 +99,9 @@
 #endif
 
     // Public functions:
-    BLE_ERROR Send(PacketBufferHandle && data);
-    BLE_ERROR Receive(PacketBufferHandle && data);
-    BLE_ERROR StartConnect();
+    CHIP_ERROR Send(PacketBufferHandle && data);
+    CHIP_ERROR Receive(PacketBufferHandle && data);
+    CHIP_ERROR StartConnect();
 
     bool IsUnsubscribePending() const;
     bool ConnectionObjectIs(BLE_CONNECTION_OBJECT connObj) { return connObj == mConnObj; }
@@ -171,42 +171,42 @@
     BLEEndPoint()  = delete;
     ~BLEEndPoint() = delete;
 
-    BLE_ERROR Init(BleLayer * bleLayer, BLE_CONNECTION_OBJECT connObj, BleRole role, bool autoClose);
+    CHIP_ERROR Init(BleLayer * bleLayer, BLE_CONNECTION_OBJECT connObj, BleRole role, bool autoClose);
     bool IsConnected(uint8_t state) const;
-    void DoClose(uint8_t flags, BLE_ERROR err);
+    void DoClose(uint8_t flags, CHIP_ERROR err);
 
     // Transmit path:
-    BLE_ERROR DriveSending();
-    BLE_ERROR DriveStandAloneAck();
+    CHIP_ERROR DriveSending();
+    CHIP_ERROR DriveStandAloneAck();
     bool PrepareNextFragment(PacketBufferHandle && data, bool & sentAck);
-    BLE_ERROR SendNextMessage();
-    BLE_ERROR ContinueMessageSend();
-    BLE_ERROR DoSendStandAloneAck();
-    BLE_ERROR SendCharacteristic(PacketBufferHandle && buf);
+    CHIP_ERROR SendNextMessage();
+    CHIP_ERROR ContinueMessageSend();
+    CHIP_ERROR DoSendStandAloneAck();
+    CHIP_ERROR SendCharacteristic(PacketBufferHandle && buf);
     bool SendIndication(PacketBufferHandle && buf);
     bool SendWrite(PacketBufferHandle && buf);
 
     // Receive path:
-    BLE_ERROR HandleConnectComplete();
-    BLE_ERROR HandleReceiveConnectionComplete();
+    CHIP_ERROR HandleConnectComplete();
+    CHIP_ERROR HandleReceiveConnectionComplete();
     void HandleSubscribeReceived();
     void HandleSubscribeComplete();
     void HandleUnsubscribeComplete();
-    BLE_ERROR HandleGattSendConfirmationReceived();
-    BLE_ERROR HandleHandshakeConfirmationReceived();
-    BLE_ERROR HandleFragmentConfirmationReceived();
-    BLE_ERROR HandleCapabilitiesRequestReceived(PacketBufferHandle && data);
-    BLE_ERROR HandleCapabilitiesResponseReceived(PacketBufferHandle && data);
+    CHIP_ERROR HandleGattSendConfirmationReceived();
+    CHIP_ERROR HandleHandshakeConfirmationReceived();
+    CHIP_ERROR HandleFragmentConfirmationReceived();
+    CHIP_ERROR HandleCapabilitiesRequestReceived(PacketBufferHandle && data);
+    CHIP_ERROR HandleCapabilitiesResponseReceived(PacketBufferHandle && data);
     SequenceNumber_t AdjustRemoteReceiveWindow(SequenceNumber_t lastReceivedAck, SequenceNumber_t maxRemoteWindowSize,
                                                SequenceNumber_t newestUnackedSentSeqNum);
 
     // Timer control functions:
-    BLE_ERROR StartConnectTimer();           // Start connect timer.
-    BLE_ERROR StartReceiveConnectionTimer(); // Start receive connection timer.
-    BLE_ERROR StartAckReceivedTimer();       // Start ack-received timer if it's not already running.
-    BLE_ERROR RestartAckReceivedTimer();     // Restart ack-received timer.
-    BLE_ERROR StartSendAckTimer();           // Start send-ack timer if it's not already running.
-    BLE_ERROR StartUnsubscribeTimer();
+    CHIP_ERROR StartConnectTimer();           // Start connect timer.
+    CHIP_ERROR StartReceiveConnectionTimer(); // Start receive connection timer.
+    CHIP_ERROR StartAckReceivedTimer();       // Start ack-received timer if it's not already running.
+    CHIP_ERROR RestartAckReceivedTimer();     // Restart ack-received timer.
+    CHIP_ERROR StartSendAckTimer();           // Start send-ack timer if it's not already running.
+    CHIP_ERROR StartUnsubscribeTimer();
     void StopConnectTimer();           // Stop connect timer.
     void StopReceiveConnectionTimer(); // Stop receive connection timer.
     void StopAckReceivedTimer();       // Stop ack-received timer.
@@ -214,15 +214,15 @@
     void StopUnsubscribeTimer();       // Stop unsubscribe timer.
 
     // Timer expired callbacks:
-    static void HandleConnectTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err);
-    static void HandleReceiveConnectionTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err);
-    static void HandleAckReceivedTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err);
-    static void HandleSendAckTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err);
-    static void HandleUnsubscribeTimeout(chip::System::Layer * systemLayer, void * appState, chip::System::Error err);
+    static void HandleConnectTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err);
+    static void HandleReceiveConnectionTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err);
+    static void HandleAckReceivedTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err);
+    static void HandleSendAckTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err);
+    static void HandleUnsubscribeTimeout(chip::System::Layer * systemLayer, void * appState, CHIP_ERROR err);
 
     // Close functions:
-    void DoCloseCallback(uint8_t state, uint8_t flags, BLE_ERROR err);
-    void FinalizeClose(uint8_t state, uint8_t flags, BLE_ERROR err);
+    void DoCloseCallback(uint8_t state, uint8_t flags, CHIP_ERROR err);
+    void FinalizeClose(uint8_t state, uint8_t flags, CHIP_ERROR err);
     void ReleaseBleConnection();
     void Free();
     void FreeBtpEngine();
diff --git a/src/ble/BleConfig.h b/src/ble/BleConfig.h
index 0628a8c..5fa0dd9 100644
--- a/src/ble/BleConfig.h
+++ b/src/ble/BleConfig.h
@@ -173,35 +173,6 @@
 #endif
 
 /**
- *  @def BLE_CONFIG_ERROR_TYPE
- *
- *  @brief
- *    This defines the data type used to represent errors for the
- *    BleLayer subsystem.
- *
- */
-#ifndef BLE_CONFIG_ERROR_TYPE
-#include <stdint.h>
-#define BLE_CONFIG_ERROR_TYPE                              int32_t
-#define BLE_CONFIG_ERROR_FORMAT                            PRId32
-#else // BLE_CONFIG_ERROR_TYPE
-#ifndef BLE_CONFIG_ERROR_FORMAT
-#error "Must define BLE_CONFIG_ERROR_FORMAT when defining BLE_CONFIG_ERROR_TYPE"
-#endif // BLE_CONFIG_ERROR_FORMAT
-#endif // BLE_CONFIG_ERROR_TYPE
-
-/**
- *  @def BLE_CONFIG_NO_ERROR
- *
- *  @brief
- *    This defines the BleLayer error code for no error or success.
- *
- */
-#ifndef BLE_CONFIG_NO_ERROR
-#define BLE_CONFIG_NO_ERROR                                0
-#endif // BLE_CONFIG_NO_ERROR
-
-/**
  *  @def BLE_CONFIG_ERROR_MIN
  *
  *  @brief
@@ -224,16 +195,16 @@
 #endif // BLE_CONFIG_ERROR_MAX
 
 /**
- *  @def _BLE_CONFIG_ERROR
+ *  @def BLE_CONFIG_ERROR
  *
  *  @brief
  *    This defines a mapping function for BleLayer errors that allows
  *    mapping such errors into a platform- or system-specific range.
  *
  */
-#ifndef _BLE_CONFIG_ERROR
-#define _BLE_CONFIG_ERROR(e)                               (BLE_ERROR_MIN + (e))
-#endif // _BLE_CONFIG_ERROR
+#ifndef BLE_CONFIG_ERROR
+#define BLE_CONFIG_ERROR(e)                               (BLE_CONFIG_ERROR_MIN + (e))
+#endif // BLE_CONFIG_ERROR
 
 // clang-format on
 
diff --git a/src/ble/BleConnectionDelegate.h b/src/ble/BleConnectionDelegate.h
index 99eb36b..4eb8785 100644
--- a/src/ble/BleConnectionDelegate.h
+++ b/src/ble/BleConnectionDelegate.h
@@ -47,7 +47,7 @@
     typedef void (*OnConnectionCompleteFunct)(void * appState, BLE_CONNECTION_OBJECT connObj);
     OnConnectionCompleteFunct OnConnectionComplete;
 
-    typedef void (*OnConnectionErrorFunct)(void * appState, BLE_ERROR err);
+    typedef void (*OnConnectionErrorFunct)(void * appState, CHIP_ERROR err);
     OnConnectionErrorFunct OnConnectionError;
 
     // Call this function to delegate the connection steps required to get a BLE_CONNECTION_OBJECT
@@ -55,7 +55,7 @@
     virtual void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) = 0;
 
     // Call this function to stop the connection
-    virtual BLE_ERROR CancelConnection() = 0;
+    virtual CHIP_ERROR CancelConnection() = 0;
 };
 
 } /* namespace Ble */
diff --git a/src/ble/BleError.cpp b/src/ble/BleError.cpp
index a401c99..9940dcb 100644
--- a/src/ble/BleError.cpp
+++ b/src/ble/BleError.cpp
@@ -45,11 +45,11 @@
     RegisterErrorFormatter(&sBleLayerErrorFormatter);
 }
 
-bool FormatLayerError(char * buf, uint16_t bufSize, int32_t err)
+bool FormatLayerError(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
     const char * desc = nullptr;
 
-    if (err < BLE_ERROR_MIN || err > BLE_ERROR_MAX)
+    if (err < BLE_CONFIG_ERROR_MIN || err > BLE_CONFIG_ERROR_MAX)
     {
         return false;
     }
@@ -57,15 +57,6 @@
 #if !CHIP_CONFIG_SHORT_ERROR_STR
     switch (err)
     {
-    case BLE_ERROR_BAD_ARGS:
-        desc = "Bad arguments";
-        break;
-    case BLE_ERROR_INCORRECT_STATE:
-        desc = "Incorrect state";
-        break;
-    case BLE_ERROR_NO_ENDPOINTS:
-        desc = "No more BLE endpoints";
-        break;
     case BLE_ERROR_NO_CONNECTION_RECEIVED_CALLBACK:
         desc = "No chip over BLE connection received callback set";
         break;
@@ -84,9 +75,6 @@
     case BLE_ERROR_GATT_INDICATE_FAILED:
         desc = "GATT indicate characteristic operation failed";
         break;
-    case BLE_ERROR_NOT_IMPLEMENTED:
-        desc = "Not implemented";
-        break;
     case BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT:
         desc = "BLE transport protocol fired abort";
         break;
@@ -96,21 +84,12 @@
     case BLE_ERROR_APP_CLOSED_CONNECTION:
         desc = "Application closed BLE connection";
         break;
-    case BLE_ERROR_OUTBOUND_MESSAGE_TOO_BIG:
-        desc = "Outbound message too big";
-        break;
     case BLE_ERROR_NOT_CHIP_DEVICE:
         desc = "BLE device doesn't seem to support chip";
         break;
     case BLE_ERROR_INCOMPATIBLE_PROTOCOL_VERSIONS:
         desc = "Incompatible BLE transport protocol versions";
         break;
-    case BLE_ERROR_NO_MEMORY:
-        desc = "No memory";
-        break;
-    case BLE_ERROR_MESSAGE_INCOMPLETE:
-        desc = "Message incomplete";
-        break;
     case BLE_ERROR_INVALID_FRAGMENT_SIZE:
         desc = "Invalid fragment size";
         break;
@@ -150,9 +129,6 @@
     case BLE_ERROR_REASSEMBLER_INCORRECT_STATE:
         desc = "BLE message reassembler received packet in incorrect state";
         break;
-    case BLE_ERROR_RECEIVED_MESSAGE_TOO_BIG:
-        desc = "Message received by BLE message reassembler was too large";
-        break;
     }
 #endif // !CHIP_CONFIG_SHORT_ERROR_STR
 
diff --git a/src/ble/BleError.h b/src/ble/BleError.h
index 8af6c59..2b0fb18 100644
--- a/src/ble/BleError.h
+++ b/src/ble/BleError.h
@@ -32,69 +32,25 @@
 
 #include "BleConfig.h"
 
+#include <core/CHIPError.h>
+
 // clang-format off
 
 /**
- *  @def BLE_NO_ERROR
- *
- *  @brief
- *    This defines the BleLayer error code for success or no
- *    error. This value may be configured via #BLE_CONFIG_NO_ERROR.
- *
- */
-#define BLE_NO_ERROR                   BLE_CONFIG_NO_ERROR
-
-/**
- *  @def BLE_ERROR_MIN
- *
- *  @brief
- *    This defines the base or minimum value of the BleLayer error number
- *    range. This value may be configured via #BLE_CONFIG_ERROR_MIN.
- *
- */
-#define BLE_ERROR_MIN                  BLE_CONFIG_ERROR_MIN
-
-/**
- *  @def BLE_ERROR_MAX
- *
- *  @brief
- *    This defines the top or maximum value of the BleLayer error number
- *    range. This value may be configured via #BLE_CONFIG_ERROR_MAX.
- *
- */
-#define BLE_ERROR_MAX                  BLE_CONFIG_ERROR_MAX
-
-/**
- *  @def _BLE_ERROR(e)
+ *  @def CHIP_BLE_ERROR(e)
  *
  *  @brief
  *    This defines a mapping function for BleLayer errors that allows
  *    mapping such errors into a platform- or system-specific
  *    range. This function may be configured via
- *    #_BLE_CONFIG_ERROR.
+ *    #BLE_CONFIG_ERROR.
  *
  *  @param[in]  e  The BleLayer error to map.
  *
  *  @return The mapped BleLayer error.
  *
  */
-#define _BLE_ERROR(e)                  _BLE_CONFIG_ERROR(e)
-
-/**
- *  @typedef BLE_ERROR
- *
- *  The basic type for all BleLayer errors.
- *
- *  This is defined to a platform- or system-specific type.
- *
- */
-typedef BLE_CONFIG_ERROR_TYPE BLE_ERROR;
-
-/**
- *  Format specifier for the BLE_ERROR type.
- *
- */
-#define BleErrorFormat BLE_CONFIG_ERROR_FORMAT
+#define CHIP_BLE_ERROR(e)                                  BLE_CONFIG_ERROR(e)
 
 /**
  *  @name Error Definitions
@@ -102,32 +58,9 @@
  *  @{
  */
 
-/**
- *  @def BLE_ERROR_BAD_ARGS
- *
- *  @brief
- *    An invalid argument or arguments were supplied.
- *
- */
-#define BLE_ERROR_BAD_ARGS                                 _BLE_ERROR(0)
-
-/**
- *  @def BLE_ERROR_INCORRECT_STATE
- *
- *  @brief
- *    An unexpected state was encountered.
- *
- */
-#define BLE_ERROR_INCORRECT_STATE                          _BLE_ERROR(1)
-
-/**
- *  @def BLE_ERROR_NO_ENDPOINTS
- *
- *  @brief
- *    No BLE endpoint is available.
- *
- */
-#define BLE_ERROR_NO_ENDPOINTS                             _BLE_ERROR(2)
+// unused                                                  CHIP_BLE_ERROR(0)
+// unused                                                  CHIP_BLE_ERROR(1)
+// unused                                                  CHIP_BLE_ERROR(2)
 
 /**
  *  @def BLE_ERROR_NO_CONNECTION_RECEIVED_CALLBACK
@@ -137,7 +70,7 @@
  *    connection.
  *
  */
-#define BLE_ERROR_NO_CONNECTION_RECEIVED_CALLBACK          _BLE_ERROR(3)
+#define BLE_ERROR_NO_CONNECTION_RECEIVED_CALLBACK          CHIP_BLE_ERROR(3)
 
 /**
  *  @def BLE_ERROR_CENTRAL_UNSUBSCRIBED
@@ -147,7 +80,7 @@
  *    Transport Protocol (BTP) transmit characteristic.
  *
  */
-#define BLE_ERROR_CENTRAL_UNSUBSCRIBED                     _BLE_ERROR(4)
+#define BLE_ERROR_CENTRAL_UNSUBSCRIBED                     CHIP_BLE_ERROR(4)
 
 /**
  *  @def BLE_ERROR_GATT_SUBSCRIBE_FAILED
@@ -157,7 +90,7 @@
  *    Transport Protocol (BTP) transmit characteristic.
  *
  */
-#define BLE_ERROR_GATT_SUBSCRIBE_FAILED                    _BLE_ERROR(5)
+#define BLE_ERROR_GATT_SUBSCRIBE_FAILED                    CHIP_BLE_ERROR(5)
 
 /**
  *  @def BLE_ERROR_GATT_UNSUBSCRIBE_FAILED
@@ -167,7 +100,7 @@
  *    BLE Transport Protocol (BTP) transmit characteristic.
  *
  */
-#define BLE_ERROR_GATT_UNSUBSCRIBE_FAILED                  _BLE_ERROR(6)
+#define BLE_ERROR_GATT_UNSUBSCRIBE_FAILED                  CHIP_BLE_ERROR(6)
 
 /**
  *  @def BLE_ERROR_GATT_WRITE_FAILED
@@ -176,7 +109,7 @@
  *    A General Attribute Profile (GATT) write operation failed.
  *
  */
-#define BLE_ERROR_GATT_WRITE_FAILED                        _BLE_ERROR(7)
+#define BLE_ERROR_GATT_WRITE_FAILED                        CHIP_BLE_ERROR(7)
 
 /**
  *  @def BLE_ERROR_GATT_INDICATE_FAILED
@@ -185,20 +118,10 @@
  *    A General Attribute Profile (GATT) indicate operation failed.
  *
  */
-#define BLE_ERROR_GATT_INDICATE_FAILED                     _BLE_ERROR(8)
+#define BLE_ERROR_GATT_INDICATE_FAILED                     CHIP_BLE_ERROR(8)
 
-/**
- *  @def BLE_ERROR_NOT_IMPLEMENTED
- *
- *  @brief
- *    A requested function or feature is not implemented.
- *
- */
-#define BLE_ERROR_NOT_IMPLEMENTED                          _BLE_ERROR(9)
-
-/*
- * Unused                                                  _BLE_ERROR(10)
- */
+// unused                                                  CHIP_BLE_ERROR(9)
+// unused                                                  CHIP_BLE_ERROR(10)
 
 /**
  *  @def BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT
@@ -207,7 +130,7 @@
  *    A BLE Transport Protocol (BTP) error was encountered.
  *
  */
-#define BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT                     _BLE_ERROR(11)
+#define BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT                  CHIP_BLE_ERROR(11)
 
 /**
  *  @def BLE_ERROR_REMOTE_DEVICE_DISCONNECTED
@@ -217,7 +140,7 @@
  *    expiration of a BLE connection supervision timeout.
  *
  */
-#define BLE_ERROR_REMOTE_DEVICE_DISCONNECTED               _BLE_ERROR(12)
+#define BLE_ERROR_REMOTE_DEVICE_DISCONNECTED               CHIP_BLE_ERROR(12)
 
 /**
  *  @def BLE_ERROR_APP_CLOSED_CONNECTION
@@ -226,17 +149,9 @@
  *    The local application closed a BLE connection, and has informed BleLayer.
  *
  */
-#define BLE_ERROR_APP_CLOSED_CONNECTION                    _BLE_ERROR(13)
+#define BLE_ERROR_APP_CLOSED_CONNECTION                    CHIP_BLE_ERROR(13)
 
-/**
- *  @def BLE_ERROR_OUTBOUND_MESSAGE_TOO_BIG
- *
- *  @brief
- *    More outbound message data is pending than available buffer space
- *    available to copy it.
- *
- */
-#define BLE_ERROR_OUTBOUND_MESSAGE_TOO_BIG                 _BLE_ERROR(14)
+// unused                                                  CHIP_BLE_ERROR(14)
 
 /**
  *  @def BLE_ERROR_NOT_CHIP_DEVICE
@@ -246,7 +161,7 @@
  *    (GATT) service required by the Bluetooth Transport Protocol (BTP).
  *
  */
-#define BLE_ERROR_NOT_CHIP_DEVICE                         _BLE_ERROR(15)
+#define BLE_ERROR_NOT_CHIP_DEVICE                         CHIP_BLE_ERROR(15)
 
 /**
  *  @def BLE_ERROR_INCOMPATIBLE_PROTOCOL_VERSIONS
@@ -256,25 +171,10 @@
  *    Transport Protocol (BTP).
  *
  */
-#define BLE_ERROR_INCOMPATIBLE_PROTOCOL_VERSIONS           _BLE_ERROR(16)
+#define BLE_ERROR_INCOMPATIBLE_PROTOCOL_VERSIONS           CHIP_BLE_ERROR(16)
 
-/**
- *  @def BLE_ERROR_NO_MEMORY
- *
- *  @brief
- *    A request for memory could not be fulfilled.
- *
- */
-#define BLE_ERROR_NO_MEMORY                                _BLE_ERROR(17)
-
-/**
- *  @def BLE_ERROR_MESSAGE_INCOMPLETE
- *
- *  @brief
- *    A received Bluetooth Transport Protocol (BTP) message was incomplete.
- *
- */
-#define BLE_ERROR_MESSAGE_INCOMPLETE                       _BLE_ERROR(18)
+// unused                                                  CHIP_BLE_ERROR(17)
+// unused                                                  CHIP_BLE_ERROR(18)
 
 /**
  *  @def BLE_ERROR_INVALID_FRAGMENT_SIZE
@@ -284,7 +184,7 @@
  *    fragment size.
  *
  */
-#define BLE_ERROR_INVALID_FRAGMENT_SIZE                    _BLE_ERROR(19)
+#define BLE_ERROR_INVALID_FRAGMENT_SIZE                    CHIP_BLE_ERROR(19)
 
 /**
  *  @def BLE_ERROR_START_TIMER_FAILED
@@ -293,7 +193,7 @@
  *    A timer failed to start within BleLayer.
  *
  */
-#define BLE_ERROR_START_TIMER_FAILED                       _BLE_ERROR(20)
+#define BLE_ERROR_START_TIMER_FAILED                       CHIP_BLE_ERROR(20)
 
 /**
  *  @def BLE_ERROR_CONNECT_TIMED_OUT
@@ -303,7 +203,7 @@
  *    connect handshake response timed out.
  *
  */
-#define BLE_ERROR_CONNECT_TIMED_OUT                        _BLE_ERROR(21)
+#define BLE_ERROR_CONNECT_TIMED_OUT                        CHIP_BLE_ERROR(21)
 
 /**
  *  @def BLE_ERROR_RECEIVE_TIMED_OUT
@@ -313,7 +213,7 @@
  *    handshake timed out.
  *
  */
-#define BLE_ERROR_RECEIVE_TIMED_OUT                        _BLE_ERROR(22)
+#define BLE_ERROR_RECEIVE_TIMED_OUT                        CHIP_BLE_ERROR(22)
 
 /**
  *  @def BLE_ERROR_INVALID_MESSAGE
@@ -322,7 +222,7 @@
  *    An invalid Bluetooth Transport Protocol (BTP) message was received.
  *
  */
-#define BLE_ERROR_INVALID_MESSAGE                          _BLE_ERROR(23)
+#define BLE_ERROR_INVALID_MESSAGE                          CHIP_BLE_ERROR(23)
 
 /**
  *  @def BLE_ERROR_FRAGMENT_ACK_TIMED_OUT
@@ -332,7 +232,7 @@
  *    acknowledgement timed out.
  *
  */
-#define BLE_ERROR_FRAGMENT_ACK_TIMED_OUT                   _BLE_ERROR(24)
+#define BLE_ERROR_FRAGMENT_ACK_TIMED_OUT                   CHIP_BLE_ERROR(24)
 
 /**
  *  @def BLE_ERROR_KEEP_ALIVE_TIMED_OUT
@@ -342,7 +242,7 @@
  *    fragment timed out.
  *
  */
-#define BLE_ERROR_KEEP_ALIVE_TIMED_OUT                     _BLE_ERROR(25)
+#define BLE_ERROR_KEEP_ALIVE_TIMED_OUT                     CHIP_BLE_ERROR(25)
 
 /**
  *  @def BLE_ERROR_NO_CONNECT_COMPLETE_CALLBACK
@@ -352,7 +252,7 @@
  *    connect completion.
  *
  */
-#define BLE_ERROR_NO_CONNECT_COMPLETE_CALLBACK            _BLE_ERROR(26)
+#define BLE_ERROR_NO_CONNECT_COMPLETE_CALLBACK            CHIP_BLE_ERROR(26)
 
 /**
  *  @def BLE_ERROR_INVALID_ACK
@@ -361,7 +261,7 @@
  *    A Bluetooth Transport Protcol (BTP) fragment acknowledgement was invalid.
  *
  */
-#define BLE_ERROR_INVALID_ACK                              _BLE_ERROR(27)
+#define BLE_ERROR_INVALID_ACK                              CHIP_BLE_ERROR(27)
 
 /**
  *  @def BLE_ERROR_REASSEMBLER_MISSING_DATA
@@ -372,7 +272,7 @@
  *    the indicated size of the original fragmented message.
  *
  */
-#define BLE_ERROR_REASSEMBLER_MISSING_DATA                 _BLE_ERROR(28)
+#define BLE_ERROR_REASSEMBLER_MISSING_DATA                 CHIP_BLE_ERROR(28)
 
 /**
  *  @def BLE_ERROR_INVALID_BTP_HEADER_FLAGS
@@ -381,7 +281,7 @@
  *    A set of Bluetooth Transport Protocol (BTP) header flags is invalid.
  *
  */
-#define BLE_ERROR_INVALID_BTP_HEADER_FLAGS                 _BLE_ERROR(29)
+#define BLE_ERROR_INVALID_BTP_HEADER_FLAGS                 CHIP_BLE_ERROR(29)
 
 /**
  *  @def BLE_ERROR_INVALID_BTP_SEQUENCE_NUMBER
@@ -390,7 +290,7 @@
  *    A Bluetooth Transport Protocol (BTP) fragment sequence number is invalid.
  *
  */
-#define BLE_ERROR_INVALID_BTP_SEQUENCE_NUMBER              _BLE_ERROR(30)
+#define BLE_ERROR_INVALID_BTP_SEQUENCE_NUMBER              CHIP_BLE_ERROR(30)
 
 /**
  *  @def BLE_ERROR_REASSEMBLER_INCORRECT_STATE
@@ -400,17 +300,7 @@
  *    encountered an unexpected state.
  *
  */
-#define BLE_ERROR_REASSEMBLER_INCORRECT_STATE              _BLE_ERROR(31)
-
-/**
- *  @def BLE_ERROR_RECEIVED_MESSAGE_TOO_BIG
- *
- *  @brief
- *    More inbound message data is pending than available buffer space
- *    available to copy it.
- *
- */
-#define BLE_ERROR_RECEIVED_MESSAGE_TOO_BIG                 _BLE_ERROR(32)
+#define BLE_ERROR_REASSEMBLER_INCORRECT_STATE              CHIP_BLE_ERROR(31)
 
 // !!!!! IMPORTANT !!!!!  If you add new Ble errors, please update the translation
 // of error codes to strings in BleError.cpp, and add them to unittest
@@ -420,13 +310,27 @@
  *  @}
  */
 
+// !!!!! IMPORTANT !!!!!
+// These definitions are present temporarily in order to reduce breakage for PRs in flight.
+// TODO: remove compatibility definitions
+#define BLE_ERROR                               CHIP_ERROR
+#define BLE_NO_ERROR                            CHIP_NO_ERROR
+#define BLE_ERROR_BAD_ARGS                      CHIP_ERROR_INVALID_ARGUMENT
+#define BLE_ERROR_INCORRECT_STATE               CHIP_ERROR_INCORRECT_STATE
+#define BLE_ERROR_MESSAGE_INCOMPLETE            CHIP_ERROR_MESSAGE_INCOMPLETE
+#define BLE_ERROR_NOT_IMPLEMENTED               CHIP_ERROR_NOT_IMPLEMENTED
+#define BLE_ERROR_NO_ENDPOINTS                  CHIP_ERROR_ENDPOINT_POOL_FULL
+#define BLE_ERROR_NO_MEMORY                     CHIP_ERROR_NO_MEMORY
+#define BLE_ERROR_OUTBOUND_MESSAGE_TOO_BIG      CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG
+#define BLE_ERROR_RECEIVED_MESSAGE_TOO_BIG      CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG
+
 // clang-format on
 
 namespace chip {
 namespace Ble {
 
 extern void RegisterLayerErrorFormatter();
-extern bool FormatLayerError(char * buf, uint16_t bufSize, int32_t err);
+extern bool FormatLayerError(char * buf, uint16_t bufSize, CHIP_ERROR err);
 
 } /* namespace Ble */
 } /* namespace chip */
diff --git a/src/ble/BleLayer.cpp b/src/ble/BleLayer.cpp
index 851ad3d..de69288 100644
--- a/src/ble/BleLayer.cpp
+++ b/src/ble/BleLayer.cpp
@@ -169,12 +169,12 @@
     slot |= version;
 }
 
-BLE_ERROR BleTransportCapabilitiesRequestMessage::Encode(const PacketBufferHandle & msgBuf) const
+CHIP_ERROR BleTransportCapabilitiesRequestMessage::Encode(const PacketBufferHandle & msgBuf) const
 {
     uint8_t * p = msgBuf->Start();
 
     // Verify we can write the fixed-length request without running into the end of the buffer.
-    VerifyOrReturnError(msgBuf->MaxDataLength() >= kCapabilitiesRequestLength, BLE_ERROR_NO_MEMORY);
+    VerifyOrReturnError(msgBuf->MaxDataLength() >= kCapabilitiesRequestLength, CHIP_ERROR_NO_MEMORY);
 
     chip::Encoding::Write8(p, CAPABILITIES_MSG_CHECK_BYTE_1);
     chip::Encoding::Write8(p, CAPABILITIES_MSG_CHECK_BYTE_2);
@@ -189,16 +189,16 @@
 
     msgBuf->SetDataLength(kCapabilitiesRequestLength);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BleTransportCapabilitiesRequestMessage::Decode(const PacketBufferHandle & msgBuf,
-                                                         BleTransportCapabilitiesRequestMessage & msg)
+CHIP_ERROR BleTransportCapabilitiesRequestMessage::Decode(const PacketBufferHandle & msgBuf,
+                                                          BleTransportCapabilitiesRequestMessage & msg)
 {
     const uint8_t * p = msgBuf->Start();
 
     // Verify we can read the fixed-length request without running into the end of the buffer.
-    VerifyOrReturnError(msgBuf->DataLength() >= kCapabilitiesRequestLength, BLE_ERROR_MESSAGE_INCOMPLETE);
+    VerifyOrReturnError(msgBuf->DataLength() >= kCapabilitiesRequestLength, CHIP_ERROR_MESSAGE_INCOMPLETE);
 
     VerifyOrReturnError(CAPABILITIES_MSG_CHECK_BYTE_1 == chip::Encoding::Read8(p), BLE_ERROR_INVALID_MESSAGE);
     VerifyOrReturnError(CAPABILITIES_MSG_CHECK_BYTE_2 == chip::Encoding::Read8(p), BLE_ERROR_INVALID_MESSAGE);
@@ -211,17 +211,17 @@
     msg.mMtu        = chip::Encoding::LittleEndian::Read16(p);
     msg.mWindowSize = chip::Encoding::Read8(p);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 // BleTransportCapabilitiesResponseMessage implementation:
 
-BLE_ERROR BleTransportCapabilitiesResponseMessage::Encode(const PacketBufferHandle & msgBuf) const
+CHIP_ERROR BleTransportCapabilitiesResponseMessage::Encode(const PacketBufferHandle & msgBuf) const
 {
     uint8_t * p = msgBuf->Start();
 
     // Verify we can write the fixed-length request without running into the end of the buffer.
-    VerifyOrReturnError(msgBuf->MaxDataLength() >= kCapabilitiesResponseLength, BLE_ERROR_NO_MEMORY);
+    VerifyOrReturnError(msgBuf->MaxDataLength() >= kCapabilitiesResponseLength, CHIP_ERROR_NO_MEMORY);
 
     chip::Encoding::Write8(p, CAPABILITIES_MSG_CHECK_BYTE_1);
     chip::Encoding::Write8(p, CAPABILITIES_MSG_CHECK_BYTE_2);
@@ -232,16 +232,16 @@
 
     msgBuf->SetDataLength(kCapabilitiesResponseLength);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BleTransportCapabilitiesResponseMessage::Decode(const PacketBufferHandle & msgBuf,
-                                                          BleTransportCapabilitiesResponseMessage & msg)
+CHIP_ERROR BleTransportCapabilitiesResponseMessage::Decode(const PacketBufferHandle & msgBuf,
+                                                           BleTransportCapabilitiesResponseMessage & msg)
 {
     const uint8_t * p = msgBuf->Start();
 
     // Verify we can read the fixed-length response without running into the end of the buffer.
-    VerifyOrReturnError(msgBuf->DataLength() >= kCapabilitiesResponseLength, BLE_ERROR_MESSAGE_INCOMPLETE);
+    VerifyOrReturnError(msgBuf->DataLength() >= kCapabilitiesResponseLength, CHIP_ERROR_MESSAGE_INCOMPLETE);
 
     VerifyOrReturnError(CAPABILITIES_MSG_CHECK_BYTE_1 == chip::Encoding::Read8(p), BLE_ERROR_INVALID_MESSAGE);
     VerifyOrReturnError(CAPABILITIES_MSG_CHECK_BYTE_2 == chip::Encoding::Read8(p), BLE_ERROR_INVALID_MESSAGE);
@@ -250,7 +250,7 @@
     msg.mFragmentSize            = chip::Encoding::LittleEndian::Read16(p);
     msg.mWindowSize              = chip::Encoding::Read8(p);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 // BleLayer implementation:
@@ -260,20 +260,20 @@
     mState = kState_NotInitialized;
 }
 
-BLE_ERROR BleLayer::Init(BlePlatformDelegate * platformDelegate, BleConnectionDelegate * connDelegate,
-                         BleApplicationDelegate * appDelegate, chip::System::Layer * systemLayer)
+CHIP_ERROR BleLayer::Init(BlePlatformDelegate * platformDelegate, BleConnectionDelegate * connDelegate,
+                          BleApplicationDelegate * appDelegate, chip::System::Layer * systemLayer)
 {
     Ble::RegisterLayerErrorFormatter();
 
     // It is totally valid to not have a connDelegate. In this case the client application
     // will take care of the connection steps.
-    VerifyOrReturnError(platformDelegate != nullptr, BLE_ERROR_BAD_ARGS);
-    VerifyOrReturnError(appDelegate != nullptr, BLE_ERROR_BAD_ARGS);
-    VerifyOrReturnError(systemLayer != nullptr, BLE_ERROR_BAD_ARGS);
+    VerifyOrReturnError(platformDelegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
+    VerifyOrReturnError(appDelegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
+    VerifyOrReturnError(systemLayer != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
 
     if (mState != kState_NotInitialized)
     {
-        return BLE_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
     mConnectionDelegate  = connDelegate;
@@ -289,22 +289,22 @@
     mTestBleEndPoint = NULL;
 #endif
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BleLayer::Init(BlePlatformDelegate * platformDelegate, BleApplicationDelegate * appDelegate,
-                         chip::System::Layer * systemLayer)
+CHIP_ERROR BleLayer::Init(BlePlatformDelegate * platformDelegate, BleApplicationDelegate * appDelegate,
+                          chip::System::Layer * systemLayer)
 {
     return Init(platformDelegate, nullptr, appDelegate, systemLayer);
 }
 
-BLE_ERROR BleLayer::Shutdown()
+CHIP_ERROR BleLayer::Shutdown()
 {
     mState = kState_NotInitialized;
     return CloseAllBleConnections();
 }
 
-BLE_ERROR BleLayer::CloseAllBleConnections()
+CHIP_ERROR BleLayer::CloseAllBleConnections()
 {
     // Close and free all BLE end points.
     for (size_t i = 0; i < BLE_LAYER_NUM_BLE_ENDPOINTS; i++)
@@ -329,10 +329,10 @@
             }
         }
     }
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BleLayer::CloseBleConnection(BLE_CONNECTION_OBJECT connObj)
+CHIP_ERROR BleLayer::CloseBleConnection(BLE_CONNECTION_OBJECT connObj)
 {
     // Close and free all BLE endpoints.
     for (size_t i = 0; i < BLE_LAYER_NUM_BLE_ENDPOINTS; i++)
@@ -357,66 +357,66 @@
             }
         }
     }
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BleLayer::CancelBleIncompleteConnection()
+CHIP_ERROR BleLayer::CancelBleIncompleteConnection()
 {
-    VerifyOrReturnError(mState == kState_Initialized, BLE_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mConnectionDelegate != nullptr, BLE_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mState == kState_Initialized, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mConnectionDelegate != nullptr, CHIP_ERROR_INCORRECT_STATE);
 
-    BLE_ERROR err = mConnectionDelegate->CancelConnection();
-    if (err == BLE_ERROR_NOT_IMPLEMENTED)
+    CHIP_ERROR err = mConnectionDelegate->CancelConnection();
+    if (err == CHIP_ERROR_NOT_IMPLEMENTED)
     {
         ChipLogError(Ble, "BleConnectionDelegate::CancelConnection is not implemented.");
     }
     return err;
 }
 
-BLE_ERROR BleLayer::NewBleConnectionByDiscriminator(uint16_t connDiscriminator)
+CHIP_ERROR BleLayer::NewBleConnectionByDiscriminator(uint16_t connDiscriminator)
 {
 
-    VerifyOrReturnError(mState == kState_Initialized, BLE_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mConnectionDelegate != nullptr, BLE_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mBleTransport != nullptr, BLE_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mState == kState_Initialized, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mConnectionDelegate != nullptr, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mBleTransport != nullptr, CHIP_ERROR_INCORRECT_STATE);
 
     mConnectionDelegate->OnConnectionComplete = OnConnectionComplete;
     mConnectionDelegate->OnConnectionError    = OnConnectionError;
     // TODO: We are passing the same parameter two times, should take a look at it to see if we can remove one of them.
     mConnectionDelegate->NewConnection(this, this, connDiscriminator);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BleLayer::NewBleConnectionByObject(BLE_CONNECTION_OBJECT connObj)
+CHIP_ERROR BleLayer::NewBleConnectionByObject(BLE_CONNECTION_OBJECT connObj)
 {
-    VerifyOrReturnError(mState == kState_Initialized, BLE_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mBleTransport != nullptr, BLE_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mState == kState_Initialized, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mBleTransport != nullptr, CHIP_ERROR_INCORRECT_STATE);
 
     OnConnectionComplete(this, connObj);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-BLE_ERROR BleLayer::NewBleEndPoint(BLEEndPoint ** retEndPoint, BLE_CONNECTION_OBJECT connObj, BleRole role, bool autoClose)
+CHIP_ERROR BleLayer::NewBleEndPoint(BLEEndPoint ** retEndPoint, BLE_CONNECTION_OBJECT connObj, BleRole role, bool autoClose)
 {
     *retEndPoint = nullptr;
 
     if (mState != kState_Initialized)
     {
-        return BLE_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
     if (connObj == BLE_CONNECTION_UNINITIALIZED)
     {
-        return BLE_ERROR_BAD_ARGS;
+        return CHIP_ERROR_INVALID_ARGUMENT;
     }
 
     *retEndPoint = sBLEEndPointPool.GetFree();
     if (*retEndPoint == nullptr)
     {
         ChipLogError(Ble, "%s endpoint pool FULL", "Ble");
-        return BLE_ERROR_NO_ENDPOINTS;
+        return CHIP_ERROR_ENDPOINT_POOL_FULL;
     }
 
     (*retEndPoint)->Init(this, connObj, role, autoClose);
@@ -426,13 +426,13 @@
     mTestBleEndPoint = *retEndPoint;
 #endif
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 // Handle remote central's initiation of CHIP over BLE protocol handshake.
-BLE_ERROR BleLayer::HandleBleTransportConnectionInitiated(BLE_CONNECTION_OBJECT connObj, PacketBufferHandle && pBuf)
+CHIP_ERROR BleLayer::HandleBleTransportConnectionInitiated(BLE_CONNECTION_OBJECT connObj, PacketBufferHandle && pBuf)
 {
-    BLE_ERROR err             = BLE_NO_ERROR;
+    CHIP_ERROR err            = CHIP_NO_ERROR;
     BLEEndPoint * newEndPoint = nullptr;
 
     // Only BLE peripherals can receive GATT writes, so specify this role in our creation of the BLEEndPoint.
@@ -453,9 +453,9 @@
         mApplicationDelegate->NotifyChipConnectionClosed(connObj);
     }
 
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(Ble, "HandleChipConnectionReceived failed, err = %" BleErrorFormat, err);
+        ChipLogError(Ble, "HandleChipConnectionReceived failed, err = %" CHIP_ERROR_FORMAT, err);
     }
 
     return err;
@@ -483,18 +483,18 @@
 
         if (endPoint != nullptr)
         {
-            BLE_ERROR status = endPoint->Receive(std::move(pBuf));
-            if (status != BLE_NO_ERROR)
+            CHIP_ERROR status = endPoint->Receive(std::move(pBuf));
+            if (status != CHIP_NO_ERROR)
             {
-                ChipLogError(Ble, "BLEEndPoint rcv failed, err = %" BleErrorFormat, status);
+                ChipLogError(Ble, "BLEEndPoint rcv failed, err = %" CHIP_ERROR_FORMAT, status);
             }
         }
         else
         {
-            BLE_ERROR status = HandleBleTransportConnectionInitiated(connObj, std::move(pBuf));
-            if (status != BLE_NO_ERROR)
+            CHIP_ERROR status = HandleBleTransportConnectionInitiated(connObj, std::move(pBuf));
+            if (status != CHIP_NO_ERROR)
             {
-                ChipLogError(Ble, "failed handle new chip BLE connection, status = %" BleErrorFormat, status);
+                ChipLogError(Ble, "failed handle new chip BLE connection, status = %" CHIP_ERROR_FORMAT, status);
             }
         }
     }
@@ -527,10 +527,10 @@
 
         if (endPoint != nullptr)
         {
-            BLE_ERROR status = endPoint->Receive(std::move(pBuf));
-            if (status != BLE_NO_ERROR)
+            CHIP_ERROR status = endPoint->Receive(std::move(pBuf));
+            if (status != CHIP_NO_ERROR)
             {
-                ChipLogError(Ble, "BLEEndPoint rcv failed, err = %" BleErrorFormat, status);
+                ChipLogError(Ble, "BLEEndPoint rcv failed, err = %" CHIP_ERROR_FORMAT, status);
             }
         }
         else
@@ -591,11 +591,11 @@
 
     if (endPoint != nullptr)
     {
-        BLE_ERROR status = endPoint->HandleGattSendConfirmationReceived();
+        CHIP_ERROR status = endPoint->HandleGattSendConfirmationReceived();
 
-        if (status != BLE_NO_ERROR)
+        if (status != CHIP_NO_ERROR)
         {
-            ChipLogError(Ble, "endpoint conf recvd failed, err = %" BleErrorFormat, status);
+            ChipLogError(Ble, "endpoint conf recvd failed, err = %" CHIP_ERROR_FORMAT, status);
         }
     }
     else
@@ -703,7 +703,7 @@
     return true;
 }
 
-void BleLayer::HandleConnectionError(BLE_CONNECTION_OBJECT connObj, BLE_ERROR err)
+void BleLayer::HandleConnectionError(BLE_CONNECTION_OBJECT connObj, CHIP_ERROR err)
 {
     // BLE connection has failed somehow, we must find and abort matching connection end point.
     BLEEndPoint * endPoint = sBLEEndPointPool.Find(connObj);
@@ -754,19 +754,19 @@
 {
     BleLayer * layer       = reinterpret_cast<BleLayer *>(appState);
     BLEEndPoint * endPoint = nullptr;
-    BLE_ERROR err          = BLE_NO_ERROR;
+    CHIP_ERROR err         = CHIP_NO_ERROR;
 
     SuccessOrExit(err = layer->NewBleEndPoint(&endPoint, connObj, kBleRole_Central, true));
     layer->mBleTransport->OnBleConnectionComplete(endPoint);
 
 exit:
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         OnConnectionError(layer, err);
     }
 }
 
-void BleLayer::OnConnectionError(void * appState, BLE_ERROR err)
+void BleLayer::OnConnectionError(void * appState, CHIP_ERROR err)
 {
     BleLayer * layer = reinterpret_cast<BleLayer *>(appState);
     layer->mBleTransport->OnBleConnectionError(err);
diff --git a/src/ble/BleLayer.h b/src/ble/BleLayer.h
index 23e0df5..e506ca0 100644
--- a/src/ble/BleLayer.h
+++ b/src/ble/BleLayer.h
@@ -146,9 +146,9 @@
     void SetSupportedProtocolVersion(uint8_t index, uint8_t version);
 
     /// Must be able to reserve 20 byte data length in msgBuf.
-    BLE_ERROR Encode(const System::PacketBufferHandle & msgBuf) const;
+    CHIP_ERROR Encode(const System::PacketBufferHandle & msgBuf) const;
 
-    static BLE_ERROR Decode(const System::PacketBufferHandle & msgBuf, BleTransportCapabilitiesRequestMessage & msg);
+    static CHIP_ERROR Decode(const System::PacketBufferHandle & msgBuf, BleTransportCapabilitiesRequestMessage & msg);
 };
 
 class BleTransportCapabilitiesResponseMessage
@@ -180,9 +180,9 @@
     uint8_t mWindowSize;
 
     /// Must be able to reserve 20 byte data length in msgBuf.
-    BLE_ERROR Encode(const System::PacketBufferHandle & msgBuf) const;
+    CHIP_ERROR Encode(const System::PacketBufferHandle & msgBuf) const;
 
-    static BLE_ERROR Decode(const System::PacketBufferHandle & msgBuf, BleTransportCapabilitiesResponseMessage & msg);
+    static CHIP_ERROR Decode(const System::PacketBufferHandle & msgBuf, BleTransportCapabilitiesResponseMessage & msg);
 };
 
 /**
@@ -240,20 +240,21 @@
     // Public functions:
     BleLayer();
 
-    BLE_ERROR Init(BlePlatformDelegate * platformDelegate, BleApplicationDelegate * appDelegate, chip::System::Layer * systemLayer);
-    BLE_ERROR Init(BlePlatformDelegate * platformDelegate, BleConnectionDelegate * connDelegate,
-                   BleApplicationDelegate * appDelegate, chip::System::Layer * systemLayer);
-    BLE_ERROR Shutdown();
+    CHIP_ERROR Init(BlePlatformDelegate * platformDelegate, BleApplicationDelegate * appDelegate,
+                    chip::System::Layer * systemLayer);
+    CHIP_ERROR Init(BlePlatformDelegate * platformDelegate, BleConnectionDelegate * connDelegate,
+                    BleApplicationDelegate * appDelegate, chip::System::Layer * systemLayer);
+    CHIP_ERROR Shutdown();
 
-    BLE_ERROR CancelBleIncompleteConnection();
-    BLE_ERROR NewBleConnectionByDiscriminator(uint16_t connDiscriminator);
-    BLE_ERROR NewBleConnectionByObject(BLE_CONNECTION_OBJECT connObj);
-    BLE_ERROR NewBleEndPoint(BLEEndPoint ** retEndPoint, BLE_CONNECTION_OBJECT connObj, BleRole role, bool autoClose);
+    CHIP_ERROR CancelBleIncompleteConnection();
+    CHIP_ERROR NewBleConnectionByDiscriminator(uint16_t connDiscriminator);
+    CHIP_ERROR NewBleConnectionByObject(BLE_CONNECTION_OBJECT connObj);
+    CHIP_ERROR NewBleEndPoint(BLEEndPoint ** retEndPoint, BLE_CONNECTION_OBJECT connObj, BleRole role, bool autoClose);
 
-    BLE_ERROR CloseAllBleConnections();
-    BLE_ERROR CloseBleConnection(BLE_CONNECTION_OBJECT connObj);
+    CHIP_ERROR CloseAllBleConnections();
+    CHIP_ERROR CloseBleConnection(BLE_CONNECTION_OBJECT connObj);
 
-    chip::System::Error ScheduleWork(chip::System::Layer::TimerCompleteFunct aComplete, void * aAppState)
+    CHIP_ERROR ScheduleWork(chip::System::Layer::TimerCompleteFunct aComplete, void * aAppState)
     {
         return mSystemLayer->ScheduleWork(aComplete, aAppState);
     }
@@ -318,7 +319,7 @@
      *   NOTE: if the application explicitly closes a BLE connection with an associated chipConnection such that
      *   the BLE connection close will not generate an upcall to CHIP, HandleConnectionError must be called with
      *   err = BLE_ERROR_APP_CLOSED_CONNECTION to prevent the leak of this chipConnection and its end point object. */
-    void HandleConnectionError(BLE_CONNECTION_OBJECT connObj, BLE_ERROR err);
+    void HandleConnectionError(BLE_CONNECTION_OBJECT connObj, CHIP_ERROR err);
 
 #if CHIP_ENABLE_CHIPOBLE_TEST
     BLEEndPoint * mTestBleEndPoint;
@@ -342,12 +343,12 @@
     // Private functions:
     void HandleAckReceived(BLE_CONNECTION_OBJECT connObj);
     void DriveSending();
-    BLE_ERROR HandleBleTransportConnectionInitiated(BLE_CONNECTION_OBJECT connObj, System::PacketBufferHandle && pBuf);
+    CHIP_ERROR HandleBleTransportConnectionInitiated(BLE_CONNECTION_OBJECT connObj, System::PacketBufferHandle && pBuf);
 
     static BleTransportProtocolVersion GetHighestSupportedProtocolVersion(const BleTransportCapabilitiesRequestMessage & reqMsg);
 
     static void OnConnectionComplete(void * appState, BLE_CONNECTION_OBJECT connObj);
-    static void OnConnectionError(void * appState, BLE_ERROR err);
+    static void OnConnectionError(void * appState, CHIP_ERROR err);
 };
 
 } /* namespace Ble */
diff --git a/src/ble/BleLayerDelegate.h b/src/ble/BleLayerDelegate.h
index 78c78ef..63d4243 100644
--- a/src/ble/BleLayerDelegate.h
+++ b/src/ble/BleLayerDelegate.h
@@ -38,11 +38,11 @@
     virtual ~BleLayerDelegate() = default;
 
     virtual void OnBleConnectionComplete(BLEEndPoint * endpoint) = 0;
-    virtual void OnBleConnectionError(BLE_ERROR err)             = 0;
+    virtual void OnBleConnectionError(CHIP_ERROR err)            = 0;
 
-    virtual void OnEndPointConnectComplete(BLEEndPoint * endPoint, BLE_ERROR err)                     = 0;
+    virtual void OnEndPointConnectComplete(BLEEndPoint * endPoint, CHIP_ERROR err)                    = 0;
     virtual void OnEndPointMessageReceived(BLEEndPoint * endPoint, System::PacketBufferHandle && msg) = 0;
-    virtual void OnEndPointConnectionClosed(BLEEndPoint * endPoint, BLE_ERROR err)                    = 0;
+    virtual void OnEndPointConnectionClosed(BLEEndPoint * endPoint, CHIP_ERROR err)                   = 0;
 
     virtual CHIP_ERROR SetEndPoint(BLEEndPoint * endPoint) = 0;
 };
diff --git a/src/ble/BtpEngine.cpp b/src/ble/BtpEngine.cpp
index 58c9efc..d222d15 100644
--- a/src/ble/BtpEngine.cpp
+++ b/src/ble/BtpEngine.cpp
@@ -76,7 +76,7 @@
 const uint16_t BtpEngine::sDefaultFragmentSize = 20;  // 23-byte minimum ATT_MTU - 3 bytes for ATT operation header
 const uint16_t BtpEngine::sMaxFragmentSize     = 128; // Size of write and indication characteristics
 
-BLE_ERROR BtpEngine::Init(void * an_app_state, bool expect_first_ack)
+CHIP_ERROR BtpEngine::Init(void * an_app_state, bool expect_first_ack)
 {
     mAppState              = an_app_state;
     mRxState               = kState_Idle;
@@ -111,7 +111,7 @@
         mRxNextSeqNum = 1;
     }
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 SequenceNumber_t BtpEngine::GetAndIncrementNextTxSeqNum()
@@ -171,7 +171,7 @@
     return (ack_num <= mTxNewestUnackedSeqNum || ack_num >= mTxOldestUnackedSeqNum);
 }
 
-BLE_ERROR BtpEngine::HandleAckReceived(SequenceNumber_t ack_num)
+CHIP_ERROR BtpEngine::HandleAckReceived(SequenceNumber_t ack_num)
 {
     ChipLogDebugBtpEngine(Ble, "entered HandleAckReceived, ack_num = %u", ack_num);
 
@@ -192,18 +192,18 @@
         IncSeqNum(mTxOldestUnackedSeqNum);
     }
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 // Calling convention:
 //   EncodeStandAloneAck may only be called if data arg is commited for immediate, synchronous subsequent transmission.
-BLE_ERROR BtpEngine::EncodeStandAloneAck(const PacketBufferHandle & data)
+CHIP_ERROR BtpEngine::EncodeStandAloneAck(const PacketBufferHandle & data)
 {
     // Ensure enough headroom exists for the lower BLE layers.
-    VerifyOrReturnError(data->EnsureReservedSize(CHIP_CONFIG_BLE_PKT_RESERVED_SIZE), BLE_ERROR_NO_MEMORY);
+    VerifyOrReturnError(data->EnsureReservedSize(CHIP_CONFIG_BLE_PKT_RESERVED_SIZE), CHIP_ERROR_NO_MEMORY);
 
     // Ensure enough space for standalone ack payload.
-    VerifyOrReturnError(data->MaxDataLength() >= kTransferProtocolStandaloneAckHeaderSize, BLE_ERROR_NO_MEMORY);
+    VerifyOrReturnError(data->MaxDataLength() >= kTransferProtocolStandaloneAckHeaderSize, CHIP_ERROR_NO_MEMORY);
     uint8_t * characteristic = data->Start();
 
     // Since there's no preexisting message payload, we can write BTP header without adjusting data start pointer.
@@ -219,7 +219,7 @@
     // Set ack payload data length.
     data->SetDataLength(kTransferProtocolStandaloneAckHeaderSize);
 
-    return BLE_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 // Calling convention:
@@ -234,21 +234,21 @@
 //   or freed if it holds a stand-alone ack. In all cases, caller must clear its reference to data arg when this
 //   function returns.
 //
-//   Upper layer must immediately clean up and reinitialize protocol engine if returned err != BLE_NO_ERROR.
-BLE_ERROR BtpEngine::HandleCharacteristicReceived(System::PacketBufferHandle && data, SequenceNumber_t & receivedAck,
-                                                  bool & didReceiveAck)
+//   Upper layer must immediately clean up and reinitialize protocol engine if returned err != CHIP_NO_ERROR.
+CHIP_ERROR BtpEngine::HandleCharacteristicReceived(System::PacketBufferHandle && data, SequenceNumber_t & receivedAck,
+                                                   bool & didReceiveAck)
 {
-    BLE_ERROR err = BLE_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     BitFlags<HeaderFlags> rx_flags;
     // BLE data uses little-endian byte order.
     Encoding::LittleEndian::Reader reader(data->Start(), data->DataLength());
 
-    VerifyOrExit(!data.IsNull(), err = BLE_ERROR_BAD_ARGS);
+    VerifyOrExit(!data.IsNull(), err = CHIP_ERROR_INVALID_ARGUMENT);
 
     mRxCharCount++;
 
     // Get header flags, always in first byte.
-    VerifyOrExit(reader.Read8(rx_flags.RawStorage()).StatusCode() == CHIP_NO_ERROR, err = BLE_ERROR_MESSAGE_INCOMPLETE);
+    VerifyOrExit(reader.Read8(rx_flags.RawStorage()).StatusCode() == CHIP_NO_ERROR, err = CHIP_ERROR_MESSAGE_INCOMPLETE);
 #if CHIP_ENABLE_CHIPOBLE_TEST
     if (rx_flags.Has(HeaderFlags::kCommandMessage))
         SetRxPacketType(kType_Control);
@@ -261,14 +261,14 @@
     // Get ack number, if any.
     if (didReceiveAck)
     {
-        VerifyOrExit(reader.Read8(&receivedAck).StatusCode() == CHIP_NO_ERROR, err = BLE_ERROR_MESSAGE_INCOMPLETE);
+        VerifyOrExit(reader.Read8(&receivedAck).StatusCode() == CHIP_NO_ERROR, err = CHIP_ERROR_MESSAGE_INCOMPLETE);
 
         err = HandleAckReceived(receivedAck);
         SuccessOrExit(err);
     }
 
     // Get sequence number.
-    VerifyOrExit(reader.Read8(&mRxNewestUnackedSeqNum).StatusCode() == CHIP_NO_ERROR, err = BLE_ERROR_MESSAGE_INCOMPLETE);
+    VerifyOrExit(reader.Read8(&mRxNewestUnackedSeqNum).StatusCode() == CHIP_NO_ERROR, err = CHIP_ERROR_MESSAGE_INCOMPLETE);
 
     // Verify that received sequence number is the next one we'd expect.
     VerifyOrExit(mRxNewestUnackedSeqNum == mRxNextSeqNum, err = BLE_ERROR_INVALID_BTP_SEQUENCE_NUMBER);
@@ -304,7 +304,7 @@
         // Verify StartMessage header flag set.
         VerifyOrExit(rx_flags.Has(HeaderFlags::kStartMessage), err = BLE_ERROR_INVALID_BTP_HEADER_FLAGS);
 
-        VerifyOrExit(startReader.Read16(&mRxLength).StatusCode() == CHIP_NO_ERROR, err = BLE_ERROR_MESSAGE_INCOMPLETE);
+        VerifyOrExit(startReader.Read16(&mRxLength).StatusCode() == CHIP_NO_ERROR, err = CHIP_ERROR_MESSAGE_INCOMPLETE);
 
         mRxState = kState_InProgress;
 
@@ -313,7 +313,7 @@
         // Create a new buffer for use as the Rx re-assembly area.
         mRxBuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize);
 
-        VerifyOrExit(!mRxBuf.IsNull(), err = BLE_ERROR_NO_MEMORY);
+        VerifyOrExit(!mRxBuf.IsNull(), err = CHIP_ERROR_NO_MEMORY);
 
         mRxBuf->AddToEnd(std::move(data));
         mRxBuf->CompactHead(); // will free 'data' and adjust rx buf's end/length
@@ -333,7 +333,7 @@
 
         // For now, limit BtpEngine message size to max length of 1 pbuf, as we do for chip messages sent via IP.
         // TODO add support for BtpEngine messages longer than 1 pbuf
-        VerifyOrExit(!mRxBuf->HasChainedBuffer(), err = BLE_ERROR_RECEIVED_MESSAGE_TOO_BIG);
+        VerifyOrExit(!mRxBuf->HasChainedBuffer(), err = CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG);
     }
     else
     {
@@ -360,12 +360,12 @@
     }
 
 exit:
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         mRxState = kState_Error;
 
         // Dump protocol engine state, plus header flags and received data length.
-        ChipLogError(Ble, "HandleCharacteristicReceived failed, err = %" BleErrorFormat ", rx_flags = %u", err, rx_flags.Raw());
+        ChipLogError(Ble, "HandleCharacteristicReceived failed, err = %" CHIP_ERROR_FORMAT ", rx_flags = %u", err, rx_flags.Raw());
         if (didReceiveAck)
         {
             ChipLogError(Ble, "With rx'd ack = %u", receivedAck);
diff --git a/src/ble/BtpEngine.h b/src/ble/BtpEngine.h
index 6e4e920..1123ed7 100644
--- a/src/ble/BtpEngine.h
+++ b/src/ble/BtpEngine.h
@@ -103,7 +103,7 @@
     static const uint16_t sMaxFragmentSize;
 
     // Public functions:
-    BLE_ERROR Init(void * an_app_state, bool expect_first_ack);
+    CHIP_ERROR Init(void * an_app_state, bool expect_first_ack);
 
     inline void SetTxFragmentSize(uint16_t size) { mTxFragmentSize = size; }
     inline void SetRxFragmentSize(uint16_t size) { mRxFragmentSize = size; }
@@ -150,10 +150,10 @@
 
     bool HasUnackedData() const;
 
-    BLE_ERROR HandleCharacteristicReceived(System::PacketBufferHandle && data, SequenceNumber_t & receivedAck,
-                                           bool & didReceiveAck);
+    CHIP_ERROR HandleCharacteristicReceived(System::PacketBufferHandle && data, SequenceNumber_t & receivedAck,
+                                            bool & didReceiveAck);
     bool HandleCharacteristicSend(System::PacketBufferHandle data, bool send_ack);
-    BLE_ERROR EncodeStandAloneAck(const PacketBufferHandle & data);
+    CHIP_ERROR EncodeStandAloneAck(const PacketBufferHandle & data);
 
     PacketBufferHandle TakeRxPacket();
     PacketBufferHandle BorrowRxPacket() { return mRxBuf.Retain(); }
@@ -198,7 +198,7 @@
 
     // Private functions:
     bool IsValidAck(SequenceNumber_t ack_num) const;
-    BLE_ERROR HandleAckReceived(SequenceNumber_t ack_num);
+    CHIP_ERROR HandleAckReceived(SequenceNumber_t ack_num);
 };
 
 } /* namespace Ble */
diff --git a/src/ble/tests/TestBleErrorStr.cpp b/src/ble/tests/TestBleErrorStr.cpp
index 0fb1043..e18f527 100644
--- a/src/ble/tests/TestBleErrorStr.cpp
+++ b/src/ble/tests/TestBleErrorStr.cpp
@@ -47,26 +47,19 @@
 // Test input data.
 
 // clang-format off
-static int32_t sContext[] =
+static CHIP_ERROR sContext[] =
 {
-    BLE_ERROR_BAD_ARGS,
-    BLE_ERROR_INCORRECT_STATE,
-    BLE_ERROR_NO_ENDPOINTS,
     BLE_ERROR_NO_CONNECTION_RECEIVED_CALLBACK,
     BLE_ERROR_CENTRAL_UNSUBSCRIBED,
     BLE_ERROR_GATT_SUBSCRIBE_FAILED,
     BLE_ERROR_GATT_UNSUBSCRIBE_FAILED,
     BLE_ERROR_GATT_WRITE_FAILED,
     BLE_ERROR_GATT_INDICATE_FAILED,
-    BLE_ERROR_NOT_IMPLEMENTED,
     BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT,
     BLE_ERROR_REMOTE_DEVICE_DISCONNECTED,
     BLE_ERROR_APP_CLOSED_CONNECTION,
-    BLE_ERROR_OUTBOUND_MESSAGE_TOO_BIG,
     BLE_ERROR_NOT_CHIP_DEVICE,
     BLE_ERROR_INCOMPATIBLE_PROTOCOL_VERSIONS,
-    BLE_ERROR_NO_MEMORY,
-    BLE_ERROR_MESSAGE_INCOMPLETE,
     BLE_ERROR_INVALID_FRAGMENT_SIZE,
     BLE_ERROR_START_TIMER_FAILED,
     BLE_ERROR_CONNECT_TIMED_OUT,
@@ -80,7 +73,6 @@
     BLE_ERROR_INVALID_BTP_HEADER_FLAGS,
     BLE_ERROR_INVALID_BTP_SEQUENCE_NUMBER,
     BLE_ERROR_REASSEMBLER_INCORRECT_STATE,
-    BLE_ERROR_RECEIVED_MESSAGE_TOO_BIG
 };
 // clang-format on
 
@@ -95,7 +87,7 @@
     // For each defined error...
     for (size_t i = 0; i < kTestElements; i++)
     {
-        int32_t err         = sContext[i];
+        CHIP_ERROR err      = sContext[i];
         const char * errStr = ErrorStr(err);
         char expectedText[9];
 
diff --git a/src/channel/ChannelContext.cpp b/src/channel/ChannelContext.cpp
index 97798f6..9363eb2 100644
--- a/src/channel/ChannelContext.cpp
+++ b/src/channel/ChannelContext.cpp
@@ -187,7 +187,7 @@
     }
 }
 
-void ChannelContext::AddressResolveTimeout(System::Layer * aLayer, void * aAppState, System::Error aError)
+void ChannelContext::AddressResolveTimeout(System::Layer * aLayer, void * aAppState, CHIP_ERROR aError)
 {
     ChannelContext * me = static_cast<ChannelContext *>(aAppState);
     me->AddressResolveTimeout();
diff --git a/src/channel/ChannelContext.h b/src/channel/ChannelContext.h
index 393c1cb..6826eac 100644
--- a/src/channel/ChannelContext.h
+++ b/src/channel/ChannelContext.h
@@ -165,7 +165,7 @@
 
     // Preparing sub-states
     void EnterAddressResolve();
-    static void AddressResolveTimeout(System::Layer * aLayer, void * aAppState, System::Error aError);
+    static void AddressResolveTimeout(System::Layer * aLayer, void * aAppState, CHIP_ERROR aError);
     void AddressResolveTimeout();
     void ExitAddressResolve() {}
 
diff --git a/src/controller/CHIPCluster.cpp b/src/controller/CHIPCluster.cpp
index 7156ae9..5b62104 100644
--- a/src/controller/CHIPCluster.cpp
+++ b/src/controller/CHIPCluster.cpp
@@ -67,7 +67,7 @@
 exit:
     if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(Controller, "Failed in sending cluster command. Err %" PRId32, err);
+        ChipLogError(Controller, "Failed in sending cluster command. Err %" CHIP_ERROR_FORMAT, err);
         mDevice->CancelResponseHandler(seqNum);
     }
 
diff --git a/src/controller/CHIPDevice.cpp b/src/controller/CHIPDevice.cpp
index 5daf9ad..f578fcf 100644
--- a/src/controller/CHIPDevice.cpp
+++ b/src/controller/CHIPDevice.cpp
@@ -252,7 +252,7 @@
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
         LOCK_TCPIP_CORE();
 #endif
-        INET_ERROR inetErr = Inet::InterfaceNameToId(Uint8::to_const_char(serializable.mInterfaceName), interfaceId);
+        CHIP_ERROR inetErr = Inet::InterfaceNameToId(Uint8::to_const_char(serializable.mInterfaceName), interfaceId);
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
         UNLOCK_TCPIP_CORE();
 #endif
@@ -291,7 +291,7 @@
                           error = mStorageDelegate->SyncSetKeyValue(key, serialized.inner, sizeof(serialized.inner)));
         if (error != CHIP_NO_ERROR)
         {
-            ChipLogError(Controller, "Failed to persist device %" PRId32, error);
+            ChipLogError(Controller, "Failed to persist device %" CHIP_ERROR_FORMAT, error);
         }
     }
     return error;
@@ -487,7 +487,7 @@
 
     if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(Controller, "LoadSecureSessionParameters returning error %" PRId32, err);
+        ChipLogError(Controller, "LoadSecureSessionParameters returning error %" CHIP_ERROR_FORMAT, err);
     }
     return err;
 }
diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp
index 3556b65..28d8f2a 100644
--- a/src/controller/CHIPDeviceController.cpp
+++ b/src/controller/CHIPDeviceController.cpp
@@ -222,7 +222,7 @@
 
     ChipLogProgress(Controller, "Getting intermediate CA certificate from the issuer");
     CHIP_ERROR err = mOperationalCredentialsDelegate->GetIntermediateCACertificate(0, icaCertSpan);
-    ChipLogProgress(Controller, "GetIntermediateCACertificate returned %" PRId32, err);
+    ChipLogProgress(Controller, "GetIntermediateCACertificate returned %" CHIP_ERROR_FORMAT, err);
     if (err == CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED)
     {
         // This implies that the commissioner application uses root CA to sign the operational
@@ -347,8 +347,8 @@
     //
     ReturnErrorOnFailure(DeviceLayer::PlatformMgr().Shutdown());
 #else
-    VerifyOrReturnError(mInetLayer->Shutdown() == INET_NO_ERROR, CHIP_ERROR_INTERNAL);
-    VerifyOrReturnError(mSystemLayer->Shutdown() == CHIP_SYSTEM_NO_ERROR, CHIP_ERROR_INTERNAL);
+    VerifyOrReturnError(mInetLayer->Shutdown() == CHIP_NO_ERROR, CHIP_ERROR_INTERNAL);
+    VerifyOrReturnError(mSystemLayer->Shutdown() == CHIP_NO_ERROR, CHIP_ERROR_INTERNAL);
     chip::Platform::Delete(mInetLayer);
     chip::Platform::Delete(mSystemLayer);
 #endif // CONFIG_DEVICE_LAYER
@@ -730,7 +730,7 @@
     }
     if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(Controller, "Failed to initialize the device list with error: %" PRId32, err);
+        ChipLogError(Controller, "Failed to initialize the device list with error: %" CHIP_ERROR_FORMAT, err);
     }
 
     return err;
@@ -1488,7 +1488,7 @@
     }
 }
 
-void DeviceCommissioner::OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState, System::Error aError)
+void DeviceCommissioner::OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState, CHIP_ERROR aError)
 {
     reinterpret_cast<DeviceCommissioner *>(aAppState)->OnSessionEstablishmentTimeout();
 }
diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h
index e11dd88..0bb5800 100644
--- a/src/controller/CHIPDeviceController.h
+++ b/src/controller/CHIPDeviceController.h
@@ -556,7 +556,7 @@
 
     void OnSessionEstablishmentTimeout();
 
-    static void OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState, System::Error aError);
+    static void OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState, CHIP_ERROR aError);
 
     /* This function sends an OpCSR request to the device.
        The function does not hold a refernce to the device object.
diff --git a/src/controller/data_model/gen/IMClusterCommandHandler.cpp b/src/controller/data_model/gen/IMClusterCommandHandler.cpp
index 2e990ae..d59ae6a 100644
--- a/src/controller/data_model/gen/IMClusterCommandHandler.cpp
+++ b/src/controller/data_model/gen/IMClusterCommandHandler.cpp
@@ -139,8 +139,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -253,8 +253,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -432,8 +432,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -1959,8 +1959,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2203,8 +2203,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2515,8 +2515,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2623,8 +2623,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -2731,8 +2731,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -3429,8 +3429,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -4008,8 +4008,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -4213,8 +4213,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -4489,8 +4489,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -4961,8 +4961,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -5074,8 +5074,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -5188,8 +5188,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
@@ -5296,8 +5296,8 @@
         apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest,
                                     Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand);
         ChipLogProgress(Zcl,
-                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32
-                        ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32,
+                        "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" CHIP_ERROR_FORMAT
+                        ", UnpackError=%" CHIP_ERROR_FORMAT " (last decoded tag = %" PRIu32,
                         validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId);
     }
 }
diff --git a/src/controller/java/AndroidBleConnectionDelegate.cpp b/src/controller/java/AndroidBleConnectionDelegate.cpp
index 53609cb..1980edf 100644
--- a/src/controller/java/AndroidBleConnectionDelegate.cpp
+++ b/src/controller/java/AndroidBleConnectionDelegate.cpp
@@ -27,7 +27,7 @@
     }
 }
 
-BLE_ERROR AndroidBleConnectionDelegate::CancelConnection()
+CHIP_ERROR AndroidBleConnectionDelegate::CancelConnection()
 {
-    return BLE_ERROR_NOT_IMPLEMENTED;
+    return CHIP_ERROR_NOT_IMPLEMENTED;
 }
diff --git a/src/controller/java/AndroidBleConnectionDelegate.h b/src/controller/java/AndroidBleConnectionDelegate.h
index 9fd0080..bc5c5fd 100644
--- a/src/controller/java/AndroidBleConnectionDelegate.h
+++ b/src/controller/java/AndroidBleConnectionDelegate.h
@@ -26,7 +26,7 @@
 {
 public:
     void NewConnection(chip::Ble::BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator);
-    BLE_ERROR CancelConnection();
+    CHIP_ERROR CancelConnection();
 
     void SetNewConnectionCallback(NotifyNewConnectionAvailable cb) { newConnectionCb = cb; }
 
diff --git a/src/credentials/CHIPCertFromX509.cpp b/src/credentials/CHIPCertFromX509.cpp
index 0654609..93fe709 100644
--- a/src/credentials/CHIPCertFromX509.cpp
+++ b/src/credentials/CHIPCertFromX509.cpp
@@ -49,9 +49,9 @@
 using namespace chip::Protocols;
 using namespace chip::Crypto;
 
-static ASN1_ERROR ParseChipAttribute(ASN1Reader & reader, uint64_t & chipAttrOut)
+static CHIP_ERROR ParseChipAttribute(ASN1Reader & reader, uint64_t & chipAttrOut)
 {
-    ASN1_ERROR err        = ASN1_NO_ERROR;
+    CHIP_ERROR err        = CHIP_NO_ERROR;
     const uint8_t * value = reader.GetValue();
     uint32_t valueLen     = reader.GetValueLen();
 
@@ -96,7 +96,7 @@
     // RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
     ASN1_PARSE_ENTER_SEQUENCE
     {
-        while ((err = reader.Next()) == ASN1_NO_ERROR)
+        while ((err = reader.Next()) == CHIP_NO_ERROR)
         {
             // RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
             ASN1_ENTER_SET
@@ -180,7 +180,7 @@
 
                 // Only one AttributeTypeAndValue allowed per RDN.
                 err = reader.Next();
-                if (err == ASN1_NO_ERROR)
+                if (err == CHIP_NO_ERROR)
                 {
                     ExitNow(err = ASN1_ERROR_UNSUPPORTED_ENCODING);
                 }
@@ -350,7 +350,7 @@
                 ASN1_PARSE_ENTER_SEQUENCE
                 {
                     err = reader.Next();
-                    VerifyOrExit(err == ASN1_NO_ERROR, err = ASN1_ERROR_INVALID_ENCODING);
+                    VerifyOrExit(err == CHIP_NO_ERROR, err = ASN1_ERROR_INVALID_ENCODING);
 
                     // keyIdentifier [0] IMPLICIT KeyIdentifier,
                     // KeyIdentifier ::= OCTET STRING
@@ -419,7 +419,7 @@
 
                     // cA BOOLEAN DEFAULT FALSE
                     err = reader.Next();
-                    if (err == ASN1_NO_ERROR && reader.GetClass() == kASN1TagClass_Universal &&
+                    if (err == CHIP_NO_ERROR && reader.GetClass() == kASN1TagClass_Universal &&
                         reader.GetTag() == kASN1UniversalTag_Boolean)
                     {
                         ASN1_GET_BOOLEAN(isCA);
@@ -430,7 +430,7 @@
                     }
 
                     // pathLenConstraint INTEGER (0..MAX) OPTIONAL
-                    if (err == ASN1_NO_ERROR && reader.GetClass() == kASN1TagClass_Universal &&
+                    if (err == CHIP_NO_ERROR && reader.GetClass() == kASN1TagClass_Universal &&
                         reader.GetTag() == kASN1UniversalTag_Integer)
                     {
                         ASN1_GET_INTEGER(pathLenConstraint);
@@ -472,7 +472,7 @@
                 // ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
                 ASN1_PARSE_ENTER_SEQUENCE
                 {
-                    while ((err = reader.Next()) == ASN1_NO_ERROR)
+                    while ((err = reader.Next()) == CHIP_NO_ERROR)
                     {
                         // KeyPurposeId ::= OBJECT IDENTIFIER
                         OID keyPurposeOID;
@@ -522,7 +522,7 @@
     // Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
     ASN1_PARSE_ENTER_SEQUENCE
     {
-        while ((err = reader.Next()) == ASN1_NO_ERROR)
+        while ((err = reader.Next()) == CHIP_NO_ERROR)
         {
             err = ConvertExtension(reader, writer);
             SuccessOrExit(err);
@@ -643,20 +643,20 @@
 
             // issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
             // Not supported.
-            if (err == ASN1_NO_ERROR && reader.GetClass() == kASN1TagClass_ContextSpecific && reader.GetTag() == 1)
+            if (err == CHIP_NO_ERROR && reader.GetClass() == kASN1TagClass_ContextSpecific && reader.GetTag() == 1)
             {
                 ExitNow(err = ASN1_ERROR_UNSUPPORTED_ENCODING);
             }
 
             // subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
             // Not supported.
-            if (err == ASN1_NO_ERROR && reader.GetClass() == kASN1TagClass_ContextSpecific && reader.GetTag() == 2)
+            if (err == CHIP_NO_ERROR && reader.GetClass() == kASN1TagClass_ContextSpecific && reader.GetTag() == 2)
             {
                 ExitNow(err = ASN1_ERROR_UNSUPPORTED_ENCODING);
             }
 
             // extensions [3] EXPLICIT Extensions OPTIONAL
-            if (err == ASN1_NO_ERROR && reader.GetClass() == kASN1TagClass_ContextSpecific && reader.GetTag() == 3)
+            if (err == CHIP_NO_ERROR && reader.GetClass() == kASN1TagClass_ContextSpecific && reader.GetTag() == 3)
             {
                 ASN1_ENTER_CONSTRUCTED(kASN1TagClass_ContextSpecific, 3)
                 {
diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp
index dd80ee2..c0bb69b 100644
--- a/src/crypto/CHIPCryptoPALOpenSSL.cpp
+++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp
@@ -1655,6 +1655,7 @@
                                     size_t caCertificateLen, const uint8_t * leafCertificate, size_t leafCertificateLen)
 {
     CHIP_ERROR err             = CHIP_NO_ERROR;
+    int status                 = 0;
     X509_STORE_CTX * verifyCtx = nullptr;
     X509_STORE * store         = nullptr;
     X509 * x509RootCertificate = nullptr;
@@ -1670,23 +1671,23 @@
     x509RootCertificate = d2i_X509(NULL, &rootCertificate, static_cast<long>(rootCertificateLen));
     VerifyOrExit(x509RootCertificate != nullptr, err = CHIP_ERROR_NO_MEMORY);
 
-    err = X509_STORE_add_cert(store, x509RootCertificate);
-    VerifyOrExit(err == 1, err = CHIP_ERROR_INTERNAL);
+    status = X509_STORE_add_cert(store, x509RootCertificate);
+    VerifyOrExit(status == 1, err = CHIP_ERROR_INTERNAL);
 
     x509CACertificate = d2i_X509(NULL, &caCertificate, static_cast<long>(caCertificateLen));
     VerifyOrExit(x509CACertificate != nullptr, err = CHIP_ERROR_NO_MEMORY);
 
-    err = X509_STORE_add_cert(store, x509CACertificate);
-    VerifyOrExit(err == 1, err = CHIP_ERROR_INTERNAL);
+    status = X509_STORE_add_cert(store, x509CACertificate);
+    VerifyOrExit(status == 1, err = CHIP_ERROR_INTERNAL);
 
     x509LeafCertificate = d2i_X509(NULL, &leafCertificate, static_cast<long>(leafCertificateLen));
     VerifyOrExit(x509LeafCertificate != nullptr, err = CHIP_ERROR_NO_MEMORY);
 
-    err = X509_STORE_CTX_init(verifyCtx, store, x509LeafCertificate, NULL);
-    VerifyOrExit(err == 1, err = CHIP_ERROR_INTERNAL);
+    status = X509_STORE_CTX_init(verifyCtx, store, x509LeafCertificate, NULL);
+    VerifyOrExit(status == 1, err = CHIP_ERROR_INTERNAL);
 
-    err = X509_verify_cert(verifyCtx);
-    VerifyOrExit(err == 1, err = CHIP_ERROR_CERT_NOT_TRUSTED);
+    status = X509_verify_cert(verifyCtx);
+    VerifyOrExit(status == 1, err = CHIP_ERROR_CERT_NOT_TRUSTED);
 
     err = CHIP_NO_ERROR;
 
diff --git a/src/crypto/tests/AES_CCM_128_test_vectors.h b/src/crypto/tests/AES_CCM_128_test_vectors.h
index 2adac02..77edd74 100644
--- a/src/crypto/tests/AES_CCM_128_test_vectors.h
+++ b/src/crypto/tests/AES_CCM_128_test_vectors.h
@@ -40,7 +40,7 @@
     const uint8_t * tag;
     size_t tag_len;
     unsigned tcId;
-    int result;
+    CHIP_ERROR result;
 };
 
 static const uint8_t chiptest_dac9e1195a0d_pt_1[]                           = { 0xee };
diff --git a/src/crypto/tests/CHIPCryptoPALTest.cpp b/src/crypto/tests/CHIPCryptoPALTest.cpp
index 2a8aec5..5ccfdb9 100644
--- a/src/crypto/tests/CHIPCryptoPALTest.cpp
+++ b/src/crypto/tests/CHIPCryptoPALTest.cpp
@@ -1439,20 +1439,21 @@
 static void TestX509_PKCS7Extraction(nlTestSuite * inSuite, void * inContext)
 {
     CHIP_ERROR err = CHIP_NO_ERROR;
+    int status     = 0;
     X509DerCertificate x509list[3];
     uint32_t max_certs = sizeof(x509list) / sizeof(X509DerCertificate);
 
     err = LoadCertsFromPKCS7(pem_pkcs7_blob, x509list, &max_certs);
     NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
-    err = memcmp(certificate_blob_leaf, x509list[0], x509list[0].Length());
-    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
+    status = memcmp(certificate_blob_leaf, x509list[0], x509list[0].Length());
+    NL_TEST_ASSERT(inSuite, status == 0);
 
-    err = memcmp(certificate_blob_intermediate, x509list[1], x509list[1].Length());
-    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
+    status = memcmp(certificate_blob_intermediate, x509list[1], x509list[1].Length());
+    NL_TEST_ASSERT(inSuite, status == 0);
 
-    err = memcmp(certificate_blob_root, x509list[2], x509list[2].Length());
-    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
+    status = memcmp(certificate_blob_root, x509list[2], x509list[2].Length());
+    NL_TEST_ASSERT(inSuite, status == 0);
 }
 
 static void TestPubkey_x509Extraction(nlTestSuite * inSuite, void * inContext)
diff --git a/src/crypto/tests/PBKDF2_SHA256_test_vectors.h b/src/crypto/tests/PBKDF2_SHA256_test_vectors.h
index ea64442..e1ab185 100644
--- a/src/crypto/tests/PBKDF2_SHA256_test_vectors.h
+++ b/src/crypto/tests/PBKDF2_SHA256_test_vectors.h
@@ -36,7 +36,7 @@
     uint32_t key_len;
     const uint8_t * key;
     unsigned tcId;
-    int result;
+    CHIP_ERROR result;
 };
 
 static const uint8_t chiptest_key1[]                          = { 0x9a, 0x87, 0xd2, 0x5e, 0x37, 0x40, 0x8f, 0xd7, 0x2f, 0x42,
diff --git a/src/include/platform/CHIPDeviceError.h b/src/include/platform/CHIPDeviceError.h
index 47b1f13..0f25adf 100644
--- a/src/include/platform/CHIPDeviceError.h
+++ b/src/include/platform/CHIPDeviceError.h
@@ -20,7 +20,7 @@
 
 #define CHIP_DEVICE_ERROR_MIN 11000000
 #define CHIP_DEVICE_ERROR_MAX 11000999
-#define _CHIP_DEVICE_ERROR(e) (CHIP_DEVICE_ERROR_MIN + (e))
+#define CHIP_DEVICE_ERROR(e) (CHIP_DEVICE_ERROR_MIN + (e))
 
 /**
  *  @def CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND
@@ -29,7 +29,7 @@
  *    The requested configuration value was not found.
  *
  */
-#define CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND _CHIP_DEVICE_ERROR(1)
+#define CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND CHIP_DEVICE_ERROR(1)
 
 /**
  *  @def CHIP_DEVICE_ERROR_NOT_SERVICE_PROVISIONED
@@ -38,7 +38,7 @@
  *    The device has not been service provisioned.
  *
  */
-#define CHIP_DEVICE_ERROR_NOT_SERVICE_PROVISIONED _CHIP_DEVICE_ERROR(2)
+#define CHIP_DEVICE_ERROR_NOT_SERVICE_PROVISIONED CHIP_DEVICE_ERROR(2)
 
 /**
  *  @def CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_ABORTED
@@ -47,7 +47,7 @@
  *    The software update was aborted by application
  *
  */
-#define CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_ABORTED _CHIP_DEVICE_ERROR(3)
+#define CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_ABORTED CHIP_DEVICE_ERROR(3)
 
 /**
  *  @def CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_IGNORED
@@ -56,4 +56,4 @@
  *    The software update was ignored by application.
  *
  */
-#define CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_IGNORED _CHIP_DEVICE_ERROR(4)
+#define CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_IGNORED CHIP_DEVICE_ERROR(4)
diff --git a/src/include/platform/GeneralUtils.h b/src/include/platform/GeneralUtils.h
index 99883f0..e7bfc17 100644
--- a/src/include/platform/GeneralUtils.h
+++ b/src/include/platform/GeneralUtils.h
@@ -31,7 +31,7 @@
 extern const char * CharacterizeIPv6Address(const chip::Inet::IPAddress & ipAddr);
 extern const char * CharacterizeIPv6Prefix(const chip::Inet::IPPrefix & inPrefix);
 extern void RegisterDeviceLayerErrorFormatter();
-extern bool FormatDeviceLayerError(char * buf, uint16_t bufSize, int32_t err);
+extern bool FormatDeviceLayerError(char * buf, uint16_t bufSize, CHIP_ERROR err);
 
 } // namespace DeviceLayer
 } // namespace chip
diff --git a/src/include/platform/PlatformManager.h b/src/include/platform/PlatformManager.h
index 273d9df..ce99010 100644
--- a/src/include/platform/PlatformManager.h
+++ b/src/include/platform/PlatformManager.h
@@ -31,11 +31,11 @@
 namespace Platform {
 namespace Layer {
 
-System::Error PostEvent(System::Layer & aLayer, void * aContext, System::Object & aTarget, System::EventType aType,
-                        uintptr_t aArgument);
-System::Error DispatchEvents(System::Layer & aLayer, void * aContext);
-System::Error DispatchEvent(System::Layer & aLayer, void * aContext, System::Event aEvent);
-System::Error StartTimer(System::Layer & aLayer, void * aContext, uint32_t aMilliseconds);
+CHIP_ERROR PostEvent(System::Layer & aLayer, void * aContext, System::Object & aTarget, System::EventType aType,
+                     uintptr_t aArgument);
+CHIP_ERROR DispatchEvents(System::Layer & aLayer, void * aContext);
+CHIP_ERROR DispatchEvent(System::Layer & aLayer, void * aContext, System::Event aEvent);
+CHIP_ERROR StartTimer(System::Layer & aLayer, void * aContext, uint32_t aMilliseconds);
 
 } // namespace Layer
 } // namespace Platform
@@ -183,14 +183,14 @@
     template <class>
     friend class Internal::GenericConfigurationManagerImpl;
     // Parentheses used to fix clang parsing issue with these declarations
-    friend ::chip::System::Error(::chip::System::Platform::Layer::PostEvent)(::chip::System::Layer & aLayer, void * aContext,
-                                                                             ::chip::System::Object & aTarget,
-                                                                             ::chip::System::EventType aType, uintptr_t aArgument);
-    friend ::chip::System::Error(::chip::System::Platform::Layer::DispatchEvents)(::chip::System::Layer & aLayer, void * aContext);
-    friend ::chip::System::Error(::chip::System::Platform::Layer::DispatchEvent)(::chip::System::Layer & aLayer, void * aContext,
-                                                                                 ::chip::System::Event aEvent);
-    friend ::chip::System::Error(::chip::System::Platform::Layer::StartTimer)(::chip::System::Layer & aLayer, void * aContext,
-                                                                              uint32_t aMilliseconds);
+    friend ::CHIP_ERROR(::chip::System::Platform::Layer::PostEvent)(::chip::System::Layer & aLayer, void * aContext,
+                                                                    ::chip::System::Object & aTarget,
+                                                                    ::chip::System::EventType aType, uintptr_t aArgument);
+    friend ::CHIP_ERROR(::chip::System::Platform::Layer::DispatchEvents)(::chip::System::Layer & aLayer, void * aContext);
+    friend ::CHIP_ERROR(::chip::System::Platform::Layer::DispatchEvent)(::chip::System::Layer & aLayer, void * aContext,
+                                                                        ::chip::System::Event aEvent);
+    friend ::CHIP_ERROR(::chip::System::Platform::Layer::StartTimer)(::chip::System::Layer & aLayer, void * aContext,
+                                                                     uint32_t aMilliseconds);
 
     void PostEvent(const ChipDeviceEvent * event);
     void DispatchEvent(const ChipDeviceEvent * event);
diff --git a/src/include/platform/TimeSyncManager.h b/src/include/platform/TimeSyncManager.h
index 1a0c29c..00e43fe 100644
--- a/src/include/platform/TimeSyncManager.h
+++ b/src/include/platform/TimeSyncManager.h
@@ -104,7 +104,7 @@
     static void TimeServiceSync_HandleSyncComplete(void * context, CHIP_ERROR result, int64_t syncedRealTimeUS);
 #endif
 
-    static void DriveTimeSync(::chip::System::Layer * layer, void * appState, ::chip::System::Error err);
+    static void DriveTimeSync(::chip::System::Layer * layer, void * appState, ::CHIP_ERROR err);
 
 protected:
     // Construction/destruction limited to subclasses.
diff --git a/src/include/platform/internal/DeviceControlServer.h b/src/include/platform/internal/DeviceControlServer.h
index 33de177..4c0bbc7 100644
--- a/src/include/platform/internal/DeviceControlServer.h
+++ b/src/include/platform/internal/DeviceControlServer.h
@@ -45,8 +45,8 @@
 private:
     // ===== Members for internal use by the following friends.
     static DeviceControlServer sInstance;
-    friend void CommissioningTimerFunction(System::Layer * layer, void * aAppState, System::Error aError);
-    void CommissioningFailedTimerComplete(System::Error aErrror);
+    friend void CommissioningTimerFunction(System::Layer * layer, void * aAppState, CHIP_ERROR aError);
+    void CommissioningFailedTimerComplete(CHIP_ERROR aErrror);
 
     // ===== Private members reserved for use by this class only.
 
diff --git a/src/include/platform/internal/GenericPlatformManagerImpl.cpp b/src/include/platform/internal/GenericPlatformManagerImpl.cpp
index 82990cc..f266b6a 100644
--- a/src/include/platform/internal/GenericPlatformManagerImpl.cpp
+++ b/src/include/platform/internal/GenericPlatformManagerImpl.cpp
@@ -67,7 +67,7 @@
     // Initialize the CHIP system layer.
     new (&SystemLayer) System::Layer();
     err = SystemLayer.Init(nullptr);
-    if (err != CHIP_SYSTEM_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         ChipLogError(DeviceLayer, "SystemLayer initialization failed: %s", ErrorStr(err));
     }
@@ -76,7 +76,7 @@
     // Initialize the CHIP Inet layer.
     new (&InetLayer) Inet::InetLayer();
     err = InetLayer.Init(SystemLayer, nullptr);
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         ChipLogError(DeviceLayer, "InetLayer initialization failed: %s", ErrorStr(err));
     }
@@ -87,7 +87,7 @@
     // Initialize the CHIP BLE manager.
 #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
     err = BLEMgr().Init();
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         ChipLogError(DeviceLayer, "BLEManager initialization failed: %s", ErrorStr(err));
     }
@@ -255,7 +255,7 @@
     // Invoke the System Layer's event handler function.
     err = SystemLayer.HandleEvent(*event->ChipSystemLayerEvent.Target, event->ChipSystemLayerEvent.Type,
                                   event->ChipSystemLayerEvent.Argument);
-    if (err != CHIP_SYSTEM_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         ChipLogError(DeviceLayer, "Error handling CHIP System Layer event (type %d): %s", event->Type, ErrorStr(err));
     }
diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp b/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp
index 0bd42ed..a83b6c3 100644
--- a/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp
+++ b/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp
@@ -139,7 +139,7 @@
                 // Call into the system layer to dispatch the callback functions for all timers
                 // that have expired.
                 err = SystemLayer.HandlePlatformTimer();
-                if (err != CHIP_SYSTEM_NO_ERROR)
+                if (err != CHIP_NO_ERROR)
                 {
                     ChipLogError(DeviceLayer, "Error handling CHIP timers: %s", ErrorStr(err));
                 }
diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp b/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp
index c59f020..603d616 100644
--- a/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp
+++ b/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp
@@ -312,7 +312,7 @@
     // Call up to the base class _Shutdown() to perform the actual stack de-initialization
     // and clean-up
     //
-    return System::MapErrorPOSIX(GenericPlatformManagerImpl<ImplClass>::_Shutdown());
+    return GenericPlatformManagerImpl<ImplClass>::_Shutdown();
 }
 
 // Fully instantiate the generic implementation class in whatever compilation unit includes this file.
diff --git a/src/include/platform/internal/GenericSoftwareUpdateManagerImpl.cpp b/src/include/platform/internal/GenericSoftwareUpdateManagerImpl.cpp
index e1ce027..91e3a93 100644
--- a/src/include/platform/internal/GenericSoftwareUpdateManagerImpl.cpp
+++ b/src/include/platform/internal/GenericSoftwareUpdateManagerImpl.cpp
@@ -591,7 +591,7 @@
 
 template <class ImplClass>
 void GenericSoftwareUpdateManagerImpl<ImplClass>::HandleHoldOffTimerExpired(::chip::System::Layer * aLayer, void * aAppState,
-                                                                            ::chip::System::Error aError)
+                                                                            ::CHIP_ERROR aError)
 {
     GenericSoftwareUpdateManagerImpl<ImplClass> * self = &SoftwareUpdateMgrImpl();
 
diff --git a/src/include/platform/internal/GenericSoftwareUpdateManagerImpl.h b/src/include/platform/internal/GenericSoftwareUpdateManagerImpl.h
index 92454fe..08a4a56 100644
--- a/src/include/platform/internal/GenericSoftwareUpdateManagerImpl.h
+++ b/src/include/platform/internal/GenericSoftwareUpdateManagerImpl.h
@@ -96,7 +96,7 @@
 
     static void PrepareBinding(intptr_t arg);
     static void StartDownload(intptr_t arg);
-    static void HandleHoldOffTimerExpired(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError);
+    static void HandleHoldOffTimerExpired(::chip::System::Layer * aLayer, void * aAppState, ::CHIP_ERROR aError);
     static void DefaultRetryPolicyCallback(void * aAppState, SoftwareUpdateManager::RetryParam & aRetryParam,
                                            uint32_t & aOutIntervalMsec);
 
diff --git a/src/inet/AsyncDNSResolverSockets.cpp b/src/inet/AsyncDNSResolverSockets.cpp
index 6dcb157..7a5f257 100644
--- a/src/inet/AsyncDNSResolverSockets.cpp
+++ b/src/inet/AsyncDNSResolverSockets.cpp
@@ -45,13 +45,13 @@
  *
  *  @param[in]  aInet  A pointer to the InetLayer object.
  *
- *  @retval #INET_NO_ERROR                   if initialization is
+ *  @retval #CHIP_NO_ERROR                   if initialization is
  *                                           successful.
  *  @retval other appropriate POSIX network or OS error.
  */
-INET_ERROR AsyncDNSResolverSockets::Init(InetLayer * aInet)
+CHIP_ERROR AsyncDNSResolverSockets::Init(InetLayer * aInet)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     int pthreadErr;
 
     mInet = aInet;
@@ -80,12 +80,12 @@
  *  and it takes care of shutting the threads down and destroying the mutex
  *  and semaphore variables.
  *
- *  @retval #INET_NO_ERROR                   if shutdown is successful.
+ *  @retval #CHIP_NO_ERROR                   if shutdown is successful.
  *  @retval other appropriate POSIX network or OS error.
  */
-INET_ERROR AsyncDNSResolverSockets::Shutdown()
+CHIP_ERROR AsyncDNSResolverSockets::Shutdown()
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     int pthreadErr;
 
     AsyncMutexLock();
@@ -132,15 +132,15 @@
  *  @param[in]  appState    A pointer to the application state to be passed to
  *                          onComplete when a DNS request is complete.
  *
- *  @retval INET_NO_ERROR                   if a DNS request is handled
+ *  @retval CHIP_NO_ERROR                   if a DNS request is handled
  *                                          successfully.
  *
  */
-INET_ERROR AsyncDNSResolverSockets::PrepareDNSResolver(DNSResolver & resolver, const char * hostName, uint16_t hostNameLen,
+CHIP_ERROR AsyncDNSResolverSockets::PrepareDNSResolver(DNSResolver & resolver, const char * hostName, uint16_t hostNameLen,
                                                        uint8_t options, uint8_t maxAddrs, IPAddress * addrArray,
                                                        DNSResolver::OnResolveCompleteFunct onComplete, void * appState)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     memcpy(resolver.asyncHostNameBuf, hostName, hostNameLen);
     resolver.asyncHostNameBuf[hostNameLen] = 0;
@@ -150,7 +150,7 @@
     resolver.AddrArray                     = addrArray;
     resolver.AppState                      = appState;
     resolver.OnComplete                    = onComplete;
-    resolver.asyncDNSResolveResult         = INET_NO_ERROR;
+    resolver.asyncDNSResolveResult         = CHIP_NO_ERROR;
     resolver.mState                        = DNSResolver::kState_Active;
     resolver.pNextAsyncDNSResolver         = nullptr;
 
@@ -162,16 +162,16 @@
  *
  *  @param[in]  resolver    A reference to the DNSResolver object.
  *
- *  @retval #INET_NO_ERROR                   if a DNS request is queued
+ *  @retval #CHIP_NO_ERROR                   if a DNS request is queued
  *                                           successfully.
- *  @retval #INET_ERROR_NO_MEMORY            if the Inet layer resolver pool
+ *  @retval #CHIP_ERROR_NO_MEMORY            if the Inet layer resolver pool
  *                                           is full.
  *  @retval other appropriate POSIX network or OS error.
  *
  */
-INET_ERROR AsyncDNSResolverSockets::EnqueueRequest(DNSResolver & resolver)
+CHIP_ERROR AsyncDNSResolverSockets::EnqueueRequest(DNSResolver & resolver)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     int pthreadErr;
 
     AsyncMutexLock();
@@ -202,9 +202,9 @@
  * Make the worker thread block if there is no item in the queue.
  *
  */
-INET_ERROR AsyncDNSResolverSockets::DequeueRequest(DNSResolver ** outResolver)
+CHIP_ERROR AsyncDNSResolverSockets::DequeueRequest(DNSResolver ** outResolver)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     int pthreadErr;
 
     AsyncMutexLock();
@@ -246,9 +246,9 @@
  *
  *  @param[in]    resolver   A reference to the DNSResolver object.
  */
-INET_ERROR AsyncDNSResolverSockets::Cancel(DNSResolver & resolver)
+CHIP_ERROR AsyncDNSResolverSockets::Cancel(DNSResolver & resolver)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     AsyncMutexLock();
 
@@ -297,7 +297,7 @@
 }
 
 /* Event handler function for asynchronous DNS notification */
-void AsyncDNSResolverSockets::DNSResultEventHandler(chip::System::Layer * aLayer, void * aAppState, chip::System::Error aError)
+void AsyncDNSResolverSockets::DNSResultEventHandler(chip::System::Layer * aLayer, void * aAppState, CHIP_ERROR aError)
 {
     DNSResolver * resolver = static_cast<DNSResolver *>(aAppState);
 
@@ -319,7 +319,7 @@
 void * AsyncDNSResolverSockets::AsyncDNSThreadRun(void * args)
 {
 
-    INET_ERROR err                          = INET_NO_ERROR;
+    CHIP_ERROR err                          = CHIP_NO_ERROR;
     AsyncDNSResolverSockets * asyncResolver = static_cast<AsyncDNSResolverSockets *>(args);
 
     while (true)
@@ -332,7 +332,7 @@
 
         // If shutdown has been called, DeQueue would return with an empty request.
         // In that case, break out of the loop and exit thread.
-        VerifyOrExit(err == INET_NO_ERROR && request != nullptr, );
+        VerifyOrExit(err == CHIP_NO_ERROR && request != nullptr, );
 
         if (request->mState != DNSResolver::kState_Canceled)
         {
diff --git a/src/inet/AsyncDNSResolverSockets.h b/src/inet/AsyncDNSResolverSockets.h
index fb5becf..9cacceb 100644
--- a/src/inet/AsyncDNSResolverSockets.h
+++ b/src/inet/AsyncDNSResolverSockets.h
@@ -55,15 +55,15 @@
     friend class DNSResolver;
 
 public:
-    INET_ERROR EnqueueRequest(DNSResolver & resolver);
+    CHIP_ERROR EnqueueRequest(DNSResolver & resolver);
 
-    INET_ERROR Init(InetLayer * inet);
+    CHIP_ERROR Init(InetLayer * inet);
 
-    INET_ERROR Cancel(DNSResolver & resolver);
+    CHIP_ERROR Cancel(DNSResolver & resolver);
 
-    INET_ERROR Shutdown();
+    CHIP_ERROR Shutdown();
 
-    INET_ERROR PrepareDNSResolver(DNSResolver & resolver, const char * hostName, uint16_t hostNameLen, uint8_t options,
+    CHIP_ERROR PrepareDNSResolver(DNSResolver & resolver, const char * hostName, uint16_t hostNameLen, uint8_t options,
                                   uint8_t maxAddrs, IPAddress * addrArray, DNSResolver::OnResolveCompleteFunct onComplete,
                                   void * appState);
 
@@ -74,11 +74,10 @@
     volatile DNSResolver * mAsyncDNSQueueHead; /* The head of the asynchronous DNSResolver object queue. */
     volatile DNSResolver * mAsyncDNSQueueTail; /* The tail of the asynchronous DNSResolver object queue. */
     InetLayer * mInet;                         /* The pointer to the InetLayer. */
-    static void
-    DNSResultEventHandler(chip::System::Layer * aLayer, void * aAppState,
-                          chip::System::Error aError); /* Timer event handler function for asynchronous DNS notification */
+    static void DNSResultEventHandler(chip::System::Layer * aLayer, void * aAppState,
+                                      CHIP_ERROR aError); /* Timer event handler function for asynchronous DNS notification */
 
-    INET_ERROR DequeueRequest(DNSResolver ** outResolver);
+    CHIP_ERROR DequeueRequest(DNSResolver ** outResolver);
 
     bool ShouldThreadShutdown();
 
diff --git a/src/inet/DNSResolver.cpp b/src/inet/DNSResolver.cpp
index b217532..76bbdb9 100644
--- a/src/inet/DNSResolver.cpp
+++ b/src/inet/DNSResolver.cpp
@@ -76,10 +76,10 @@
  *  @param[in]  appState    A pointer to the application state to be passed to
  *                          onComplete when a DNS request is complete.
  *
- *  @retval INET_NO_ERROR                   if a DNS request is handled
+ *  @retval CHIP_NO_ERROR                   if a DNS request is handled
  *                                          successfully.
  *
- *  @retval INET_ERROR_NOT_IMPLEMENTED      if DNS resolution is not enabled on
+ *  @retval CHIP_ERROR_NOT_IMPLEMENTED      if DNS resolution is not enabled on
  *                                          the underlying platform.
  *
  *  @retval _other_                         if other POSIX network or OS error
@@ -87,14 +87,14 @@
  *                                          resolver implementation.
  *
  */
-INET_ERROR DNSResolver::Resolve(const char * hostName, uint16_t hostNameLen, uint8_t options, uint8_t maxAddrs,
+CHIP_ERROR DNSResolver::Resolve(const char * hostName, uint16_t hostNameLen, uint8_t options, uint8_t maxAddrs,
                                 IPAddress * addrArray, DNSResolver::OnResolveCompleteFunct onComplete, void * appState)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
 #if !CHIP_SYSTEM_CONFIG_USE_SOCKETS && !LWIP_DNS
     Release();
-    return INET_ERROR_NOT_IMPLEMENTED;
+    return CHIP_ERROR_NOT_IMPLEMENTED;
 #endif // !CHIP_SYSTEM_CONFIG_USE_SOCKETS && !LWIP_DNS
 
     uint8_t addrFamilyOption = (options & kDNSOption_AddrFamily_Mask);
@@ -107,7 +107,7 @@
         (optionFlags & ~kDNSOption_ValidFlags) != 0)
     {
         Release();
-        return INET_ERROR_BAD_ARGS;
+        return CHIP_ERROR_INVALID_ARGUMENT;
     }
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS || (CHIP_SYSTEM_CONFIG_USE_LWIP && LWIP_DNS)
@@ -163,7 +163,7 @@
 #endif
     {
         Release();
-        return INET_ERROR_NOT_IMPLEMENTED;
+        return CHIP_ERROR_NOT_IMPLEMENTED;
     }
 
 #endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR < 5
@@ -229,7 +229,7 @@
     // Release DNSResolver object.
     Release();
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS || (CHIP_SYSTEM_CONFIG_USE_LWIP && LWIP_DNS)
@@ -238,10 +238,10 @@
 /**
  *  This method cancels DNS requests that are in progress.
  *
- *  @retval INET_NO_ERROR.
+ *  @retval CHIP_NO_ERROR.
  *
  */
-INET_ERROR DNSResolver::Cancel()
+CHIP_ERROR DNSResolver::Cancel()
 {
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -283,7 +283,7 @@
 #endif // INET_CONFIG_ENABLE_ASYNC_DNS_SOCKETS
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
@@ -297,7 +297,7 @@
 {
     // Call the application's completion handler if the request hasn't been canceled.
     if (OnComplete != NULL)
-        OnComplete(AppState, (NumAddrs > 0) ? INET_NO_ERROR : INET_ERROR_HOST_NOT_FOUND, NumAddrs, AddrArray);
+        OnComplete(AppState, (NumAddrs > 0) ? CHIP_NO_ERROR : INET_ERROR_HOST_NOT_FOUND, NumAddrs, AddrArray);
 
     // Release the resolver object.
     Release();
@@ -369,9 +369,9 @@
     hints.ai_flags = AI_ADDRCONFIG;
 }
 
-INET_ERROR DNSResolver::ProcessGetAddrInfoResult(int returnCode, struct addrinfo * results)
+CHIP_ERROR DNSResolver::ProcessGetAddrInfoResult(int returnCode, struct addrinfo * results)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     // If getaddrinfo() succeeded, copy addresses in the returned addrinfo structures into the
     // application's output array...
diff --git a/src/inet/DNSResolver.h b/src/inet/DNSResolver.h
index 5fbad7f..6975dcc 100644
--- a/src/inet/DNSResolver.h
+++ b/src/inet/DNSResolver.h
@@ -101,7 +101,7 @@
      *  Provide a function of this type to the \c Resolve method to process
      *  completion events.
      */
-    typedef void (*OnResolveCompleteFunct)(void * appState, INET_ERROR err, uint8_t addrCount, IPAddress * addrArray);
+    typedef void (*OnResolveCompleteFunct)(void * appState, CHIP_ERROR err, uint8_t addrCount, IPAddress * addrArray);
 
     static chip::System::ObjectPool<DNSResolver, INET_CONFIG_NUM_DNS_RESOLVERS> sPool;
 
@@ -133,7 +133,7 @@
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
     void InitAddrInfoHints(struct addrinfo & hints);
-    INET_ERROR ProcessGetAddrInfoResult(int returnCode, struct addrinfo * results);
+    CHIP_ERROR ProcessGetAddrInfoResult(int returnCode, struct addrinfo * results);
     void CopyAddresses(int family, uint8_t maxAddrs, const struct addrinfo * addrs);
     uint8_t CountAddresses(int family, const struct addrinfo * addrs);
 
@@ -142,7 +142,7 @@
     /* Hostname that requires resolution */
     char asyncHostNameBuf[NL_DNS_HOSTNAME_MAX_LEN + 1]; // DNS limits hostnames to 253 max characters.
 
-    INET_ERROR asyncDNSResolveResult;
+    CHIP_ERROR asyncDNSResolveResult;
     /* The next DNSResolver object in the asynchronous DNS resolution queue. */
     DNSResolver * pNextAsyncDNSResolver;
 
@@ -154,9 +154,9 @@
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    INET_ERROR Resolve(const char * hostName, uint16_t hostNameLen, uint8_t options, uint8_t maxAddrs, IPAddress * addrArray,
+    CHIP_ERROR Resolve(const char * hostName, uint16_t hostNameLen, uint8_t options, uint8_t maxAddrs, IPAddress * addrArray,
                        OnResolveCompleteFunct onComplete, void * appState);
-    INET_ERROR Cancel();
+    CHIP_ERROR Cancel();
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     void HandleResolveComplete(void);
diff --git a/src/inet/IPEndPointBasis.cpp b/src/inet/IPEndPointBasis.cpp
index 1efefb5..f5685fe 100644
--- a/src/inet/IPEndPointBasis.cpp
+++ b/src/inet/IPEndPointBasis.cpp
@@ -131,20 +131,20 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_SOCKETS
-static INET_ERROR CheckMulticastGroupArgs(InterfaceId aInterfaceId, const IPAddress & aAddress)
+static CHIP_ERROR CheckMulticastGroupArgs(InterfaceId aInterfaceId, const IPAddress & aAddress)
 {
     VerifyOrReturnError(IsInterfaceIdPresent(aInterfaceId), INET_ERROR_UNKNOWN_INTERFACE);
 
     VerifyOrReturnError(aAddress.IsMulticast(), INET_ERROR_WRONG_ADDRESS_TYPE);
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 #if INET_CONFIG_ENABLE_IPV4
 #if LWIP_IPV4 && LWIP_IGMP
-static INET_ERROR LwIPIPv4JoinLeaveMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress,
+static CHIP_ERROR LwIPIPv4JoinLeaveMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress,
                                                   err_t (*aMethod)(struct netif *, const LWIP_IPV4_ADDR_T *))
 {
     struct netif * const lNetif = IPEndPointBasis::FindNetifFromInterfaceId(aInterfaceId);
@@ -155,7 +155,7 @@
 
     if (lStatus == ERR_MEM)
     {
-        return INET_ERROR_NO_MEMORY;
+        return CHIP_ERROR_NO_MEMORY;
     }
     return chip::System::MapErrorLwIP(lStatus);
 }
@@ -173,7 +173,7 @@
 #endif
 
 #ifdef HAVE_IPV6_MULTICAST
-static INET_ERROR LwIPIPv6JoinLeaveMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress,
+static CHIP_ERROR LwIPIPv6JoinLeaveMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress,
                                                   err_t (*aMethod)(struct netif *, const LWIP_IPV6_ADDR_T *))
 {
     struct netif * const lNetif = IPEndPointBasis::FindNetifFromInterfaceId(aInterfaceId);
@@ -184,7 +184,7 @@
 
     if (lStatus == ERR_MEM)
     {
-        return INET_ERROR_NO_MEMORY;
+        return CHIP_ERROR_NO_MEMORY;
     }
     return chip::System::MapErrorLwIP(lStatus);
 }
@@ -193,7 +193,7 @@
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
 #if IP_MULTICAST_LOOP || IPV6_MULTICAST_LOOP
-static INET_ERROR SocketsSetMulticastLoopback(int aSocket, bool aLoopback, int aProtocol, int aOption)
+static CHIP_ERROR SocketsSetMulticastLoopback(int aSocket, bool aLoopback, int aProtocol, int aOption)
 {
     const unsigned int lValue = aLoopback;
     if (setsockopt(aSocket, aProtocol, aOption, &lValue, sizeof(lValue)) != 0)
@@ -201,14 +201,14 @@
         return chip::System::MapErrorPOSIX(errno);
     }
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // IP_MULTICAST_LOOP || IPV6_MULTICAST_LOOP
 
-static INET_ERROR SocketsSetMulticastLoopback(int aSocket, IPVersion aIPVersion, bool aLoopback)
+static CHIP_ERROR SocketsSetMulticastLoopback(int aSocket, IPVersion aIPVersion, bool aLoopback)
 {
 #ifdef IPV6_MULTICAST_LOOP
-    INET_ERROR lRetval;
+    CHIP_ERROR lRetval;
 
     switch (aIPVersion)
     {
@@ -230,12 +230,12 @@
 
     return (lRetval);
 #else  // IPV6_MULTICAST_LOOP
-    return INET_ERROR_NOT_SUPPORTED;
+    return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif // IPV6_MULTICAST_LOOP
 }
 
 #if INET_CONFIG_ENABLE_IPV4
-static INET_ERROR SocketsIPv4JoinLeaveMulticastGroup(int aSocket, InterfaceId aInterfaceId, const IPAddress & aAddress,
+static CHIP_ERROR SocketsIPv4JoinLeaveMulticastGroup(int aSocket, InterfaceId aInterfaceId, const IPAddress & aAddress,
                                                      int aCommand)
 {
     IPAddress lInterfaceAddress;
@@ -267,20 +267,20 @@
     {
         return chip::System::MapErrorPOSIX(errno);
     }
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // INET_CONFIG_ENABLE_IPV4
 
 #if INET_IPV6_ADD_MEMBERSHIP || INET_IPV6_DROP_MEMBERSHIP
-static INET_ERROR SocketsIPv6JoinLeaveMulticastGroup(int aSocket, InterfaceId aInterfaceId, const IPAddress & aAddress,
+static CHIP_ERROR SocketsIPv6JoinLeaveMulticastGroup(int aSocket, InterfaceId aInterfaceId, const IPAddress & aAddress,
                                                      int aCommand)
 {
-    VerifyOrReturnError(CanCastTo<unsigned int>(aInterfaceId), INET_ERROR_UNEXPECTED_EVENT);
+    VerifyOrReturnError(CanCastTo<unsigned int>(aInterfaceId), CHIP_ERROR_UNEXPECTED_EVENT);
     const unsigned int lIfIndex = static_cast<unsigned int>(aInterfaceId);
 
     struct ipv6_mreq lMulticastRequest;
     memset(&lMulticastRequest, 0, sizeof(lMulticastRequest));
-    VerifyOrReturnError(CanCastTo<decltype(lMulticastRequest.ipv6mr_interface)>(lIfIndex), INET_ERROR_UNEXPECTED_EVENT);
+    VerifyOrReturnError(CanCastTo<decltype(lMulticastRequest.ipv6mr_interface)>(lIfIndex), CHIP_ERROR_UNEXPECTED_EVENT);
 
     lMulticastRequest.ipv6mr_interface = static_cast<decltype(lMulticastRequest.ipv6mr_interface)>(lIfIndex);
     lMulticastRequest.ipv6mr_multiaddr = aAddress.ToIPv6();
@@ -289,25 +289,25 @@
     {
         return chip::System::MapErrorPOSIX(errno);
     }
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // INET_IPV6_ADD_MEMBERSHIP || INET_IPV6_DROP_MEMBERSHIP
 
-static INET_ERROR SocketsIPv6JoinMulticastGroup(int aSocket, InterfaceId aInterfaceId, const IPAddress & aAddress)
+static CHIP_ERROR SocketsIPv6JoinMulticastGroup(int aSocket, InterfaceId aInterfaceId, const IPAddress & aAddress)
 {
 #if INET_IPV6_ADD_MEMBERSHIP
     return SocketsIPv6JoinLeaveMulticastGroup(aSocket, aInterfaceId, aAddress, INET_IPV6_ADD_MEMBERSHIP);
 #else
-    return INET_ERROR_NOT_SUPPORTED;
+    return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif
 }
 
-static INET_ERROR SocketsIPv6LeaveMulticastGroup(int aSocket, InterfaceId aInterfaceId, const IPAddress & aAddress)
+static CHIP_ERROR SocketsIPv6LeaveMulticastGroup(int aSocket, InterfaceId aInterfaceId, const IPAddress & aAddress)
 {
 #if INET_IPV6_DROP_MEMBERSHIP
     return SocketsIPv6JoinLeaveMulticastGroup(aSocket, aInterfaceId, aAddress, INET_IPV6_DROP_MEMBERSHIP);
 #else
-    return INET_ERROR_NOT_SUPPORTED;
+    return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif
 }
 
@@ -320,7 +320,7 @@
  *
  *  @param[in]   aLoopback
  *
- *  @retval  INET_NO_ERROR
+ *  @retval  CHIP_NO_ERROR
  *       success: multicast loopback behavior set
  *  @retval  other
  *       another system or platform error
@@ -330,14 +330,14 @@
  *     to this endpoint.
  *
  */
-INET_ERROR IPEndPointBasis::SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback)
+CHIP_ERROR IPEndPointBasis::SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback)
 {
-    INET_ERROR lRetval = INET_ERROR_NOT_IMPLEMENTED;
+    CHIP_ERROR lRetval = CHIP_ERROR_NOT_IMPLEMENTED;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_SOCKETS
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 #if !HAVE_LWIP_MULTICAST_LOOP
-    lRetval = INET_ERROR_NOT_SUPPORTED;
+    lRetval = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #else
     if (aLoopback)
     {
@@ -357,7 +357,7 @@
 #endif // INET_CONFIG_ENABLE_UDP_ENDPOINT
 
         default:
-            lRetval = INET_ERROR_NOT_SUPPORTED;
+            lRetval = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
             break;
         }
     }
@@ -379,12 +379,12 @@
 #endif // INET_CONFIG_ENABLE_UDP_ENDPOINT
 
         default:
-            lRetval = INET_ERROR_NOT_SUPPORTED;
+            lRetval = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
             break;
         }
     }
 
-    lRetval = INET_NO_ERROR;
+    lRetval = CHIP_NO_ERROR;
 #endif // !HAVE_LWIP_MULTICAST_LOOP
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -407,7 +407,7 @@
  *  @param[in]   aAddress      the multicast group to add the
  *                             interface to
  *
- *  @retval  INET_NO_ERROR
+ *  @retval  CHIP_NO_ERROR
  *       success: multicast group removed
  *
  *  @retval  INET_ERROR_UNKNOWN_INTERFACE
@@ -425,9 +425,9 @@
  *     specified interface.
  *
  */
-INET_ERROR IPEndPointBasis::JoinMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress)
+CHIP_ERROR IPEndPointBasis::JoinMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress)
 {
-    INET_ERROR lRetval = INET_ERROR_NOT_IMPLEMENTED;
+    CHIP_ERROR lRetval = CHIP_ERROR_NOT_IMPLEMENTED;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_SOCKETS
     const IPAddressType lAddrType = aAddress.Type();
@@ -443,7 +443,7 @@
 #if LWIP_IPV4 && LWIP_IGMP
         lRetval = LwIPIPv4JoinLeaveMulticastGroup(aInterfaceId, aAddress, igmp_joingroup_netif);
 #else  // LWIP_IPV4 && LWIP_IGMP
-        lRetval = INET_ERROR_NOT_SUPPORTED;
+        lRetval = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif // LWIP_IPV4 && LWIP_IGMP
         SuccessOrExit(lRetval);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
@@ -468,7 +468,7 @@
 #ifdef HAVE_IPV6_MULTICAST
         lRetval = LwIPIPv6JoinLeaveMulticastGroup(aInterfaceId, aAddress, mld6_joingroup_netif);
 #else  // HAVE_IPV6_MULTICAST
-        lRetval = INET_ERROR_NOT_SUPPORTED;
+        lRetval = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif // HAVE_IPV6_MULTICAST
         SuccessOrExit(lRetval);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
@@ -499,7 +499,7 @@
  *  @param[in]   aAddress      the multicast group to remove the
  *                             interface from
  *
- *  @retval  INET_NO_ERROR
+ *  @retval  CHIP_NO_ERROR
  *       success: multicast group removed
  *
  *  @retval  INET_ERROR_UNKNOWN_INTERFACE
@@ -517,9 +517,9 @@
  *     specified interface.
  *
  */
-INET_ERROR IPEndPointBasis::LeaveMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress)
+CHIP_ERROR IPEndPointBasis::LeaveMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress)
 {
-    INET_ERROR lRetval = INET_ERROR_NOT_IMPLEMENTED;
+    CHIP_ERROR lRetval = CHIP_ERROR_NOT_IMPLEMENTED;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_SOCKETS
     const IPAddressType lAddrType = aAddress.Type();
@@ -535,7 +535,7 @@
 #if LWIP_IPV4 && LWIP_IGMP
         lRetval = LwIPIPv4JoinLeaveMulticastGroup(aInterfaceId, aAddress, igmp_leavegroup_netif);
 #else  // LWIP_IPV4 && LWIP_IGMP
-        lRetval = INET_ERROR_NOT_SUPPORTED;
+        lRetval = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif // LWIP_IPV4 && LWIP_IGMP
         SuccessOrExit(lRetval);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
@@ -560,7 +560,7 @@
 #if LWIP_IPV6_MLD && LWIP_IPV6_ND && LWIP_IPV6
         lRetval = LwIPIPv6JoinLeaveMulticastGroup(aInterfaceId, aAddress, mld6_leavegroup_netif);
 #else  // LWIP_IPV6_MLD && LWIP_IPV6_ND && LWIP_IPV6
-        lRetval = INET_ERROR_NOT_SUPPORTED;
+        lRetval = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif // LWIP_IPV6_MLD && LWIP_IPV6_ND && LWIP_IPV6
         SuccessOrExit(lRetval);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
@@ -607,7 +607,7 @@
         else
         {
             if (OnReceiveError != NULL)
-                OnReceiveError(this, INET_ERROR_INBOUND_MESSAGE_TOO_BIG, NULL);
+                OnReceiveError(this, CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG, NULL);
         }
     }
 }
@@ -658,12 +658,12 @@
     return (lPacketInfo);
 }
 
-System::Error IPEndPointBasis::PostPacketBufferEvent(chip::System::Layer & aLayer, System::Object & aTarget,
-                                                     System::EventType aEventType, System::PacketBufferHandle && aBuffer)
+CHIP_ERROR IPEndPointBasis::PostPacketBufferEvent(chip::System::Layer & aLayer, System::Object & aTarget,
+                                                  System::EventType aEventType, System::PacketBufferHandle && aBuffer)
 {
-    System::Error error =
+    const CHIP_ERROR error =
         aLayer.PostEvent(aTarget, aEventType, (uintptr_t) System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(aBuffer));
-    if (error == INET_NO_ERROR)
+    if (error == CHIP_NO_ERROR)
     {
         // If PostEvent() succeeded, it has ownership of the buffer, so we need to release it (without freeing it).
         static_cast<void>(std::move(aBuffer).UnsafeRelease());
@@ -674,9 +674,9 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-INET_ERROR IPEndPointBasis::Bind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort, InterfaceId aInterfaceId)
+CHIP_ERROR IPEndPointBasis::Bind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort, InterfaceId aInterfaceId)
 {
-    INET_ERROR lRetval = INET_NO_ERROR;
+    CHIP_ERROR lRetval = CHIP_NO_ERROR;
 
     if (aAddressType == kIPAddressType_IPv6)
     {
@@ -689,7 +689,7 @@
         sa.sin6_addr   = aAddress.ToIPv6();
         if (!CanCastTo<decltype(sa.sin6_scope_id)>(aInterfaceId))
         {
-            return INET_ERROR_INCORRECT_STATE;
+            return CHIP_ERROR_INCORRECT_STATE;
         }
         sa.sin6_scope_id = static_cast<decltype(sa.sin6_scope_id)>(aInterfaceId);
 
@@ -699,7 +699,7 @@
             // Instruct the kernel that any messages to multicast destinations should be
             // sent down the interface specified by the caller.
 #ifdef IPV6_MULTICAST_IF
-        if (lRetval == INET_NO_ERROR)
+        if (lRetval == CHIP_NO_ERROR)
             setsockopt(mSocket.GetFD(), IPPROTO_IPV6, IPV6_MULTICAST_IF, &aInterfaceId, sizeof(aInterfaceId));
 #endif // defined(IPV6_MULTICAST_IF)
 
@@ -728,7 +728,7 @@
             // Instruct the kernel that any messages to multicast destinations should be
             // sent down the interface to which the specified IPv4 address is bound.
 #ifdef IP_MULTICAST_IF
-        if (lRetval == INET_NO_ERROR)
+        if (lRetval == CHIP_NO_ERROR)
             setsockopt(mSocket.GetFD(), IPPROTO_IP, IP_MULTICAST_IF, &sa, sizeof(sa));
 #endif // defined(IP_MULTICAST_IF)
 
@@ -740,7 +740,7 @@
 #endif // defined(IP_MULTICAST_TTL)
 
         // Allow socket transmitting broadcast packets.
-        if (lRetval == INET_NO_ERROR)
+        if (lRetval == CHIP_NO_ERROR)
             setsockopt(mSocket.GetFD(), SOL_SOCKET, SO_BROADCAST, &enable, sizeof(enable));
     }
 #endif // INET_CONFIG_ENABLE_IPV4
@@ -750,9 +750,9 @@
     return (lRetval);
 }
 
-INET_ERROR IPEndPointBasis::BindInterface(IPAddressType aAddressType, InterfaceId aInterfaceId)
+CHIP_ERROR IPEndPointBasis::BindInterface(IPAddressType aAddressType, InterfaceId aInterfaceId)
 {
-    INET_ERROR lRetval = INET_NO_ERROR;
+    CHIP_ERROR lRetval = CHIP_NO_ERROR;
 
 #if HAVE_SO_BINDTODEVICE
     if (aInterfaceId == INET_NULL_INTERFACEID)
@@ -773,30 +773,30 @@
             lRetval = chip::System::MapErrorPOSIX(errno);
         }
 
-        if (lRetval == INET_NO_ERROR &&
+        if (lRetval == CHIP_NO_ERROR &&
             setsockopt(mSocket.GetFD(), SOL_SOCKET, SO_BINDTODEVICE, lInterfaceName, socklen_t(strlen(lInterfaceName))) == -1)
         {
             lRetval = chip::System::MapErrorPOSIX(errno);
         }
     }
 
-    if (lRetval == INET_NO_ERROR)
+    if (lRetval == CHIP_NO_ERROR)
         mBoundIntfId = aInterfaceId;
 
 #else  // !HAVE_SO_BINDTODEVICE
-    lRetval = INET_ERROR_NOT_IMPLEMENTED;
+    lRetval = CHIP_ERROR_NOT_IMPLEMENTED;
 #endif // HAVE_SO_BINDTODEVICE
 
     return (lRetval);
 }
 
-INET_ERROR IPEndPointBasis::SendMsg(const IPPacketInfo * aPktInfo, chip::System::PacketBufferHandle && aBuffer, uint16_t aSendFlags)
+CHIP_ERROR IPEndPointBasis::SendMsg(const IPPacketInfo * aPktInfo, chip::System::PacketBufferHandle && aBuffer, uint16_t aSendFlags)
 {
     // Ensure the destination address type is compatible with the endpoint address type.
-    VerifyOrReturnError(mAddrType == aPktInfo->DestAddress.Type(), INET_ERROR_BAD_ARGS);
+    VerifyOrReturnError(mAddrType == aPktInfo->DestAddress.Type(), CHIP_ERROR_INVALID_ARGUMENT);
 
     // For now the entire message must fit within a single buffer.
-    VerifyOrReturnError(!aBuffer->HasChainedBuffer(), INET_ERROR_MESSAGE_TOO_LONG);
+    VerifyOrReturnError(!aBuffer->HasChainedBuffer(), CHIP_ERROR_MESSAGE_TOO_LONG);
 
     struct iovec msgIOV;
     msgIOV.iov_base = aBuffer->Start();
@@ -816,7 +816,7 @@
         peerSockAddr.in6.sin6_family = AF_INET6;
         peerSockAddr.in6.sin6_port   = htons(aPktInfo->DestPort);
         peerSockAddr.in6.sin6_addr   = aPktInfo->DestAddress.ToIPv6();
-        VerifyOrReturnError(CanCastTo<decltype(peerSockAddr.in6.sin6_scope_id)>(aPktInfo->Interface), INET_ERROR_INCORRECT_STATE);
+        VerifyOrReturnError(CanCastTo<decltype(peerSockAddr.in6.sin6_scope_id)>(aPktInfo->Interface), CHIP_ERROR_INCORRECT_STATE);
         peerSockAddr.in6.sin6_scope_id = static_cast<decltype(peerSockAddr.in6.sin6_scope_id)>(aPktInfo->Interface);
         msgHeader.msg_namelen          = sizeof(sockaddr_in6);
     }
@@ -866,7 +866,7 @@
             struct in_pktinfo * pktInfo = reinterpret_cast<struct in_pktinfo *> CMSG_DATA(controlHdr);
             if (!CanCastTo<decltype(pktInfo->ipi_ifindex)>(intfId))
             {
-                return INET_ERROR_NOT_SUPPORTED;
+                return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
             }
 
             pktInfo->ipi_ifindex  = static_cast<decltype(pktInfo->ipi_ifindex)>(intfId);
@@ -874,7 +874,7 @@
 
             msgHeader.msg_controllen = CMSG_SPACE(sizeof(in_pktinfo));
 #else  // !defined(IP_PKTINFO)
-            return INET_ERROR_NOT_SUPPORTED;
+            return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif // !defined(IP_PKTINFO)
         }
 
@@ -890,19 +890,19 @@
             struct in6_pktinfo * pktInfo = reinterpret_cast<struct in6_pktinfo *> CMSG_DATA(controlHdr);
             if (!CanCastTo<decltype(pktInfo->ipi6_ifindex)>(intfId))
             {
-                return INET_ERROR_UNEXPECTED_EVENT;
+                return CHIP_ERROR_UNEXPECTED_EVENT;
             }
             pktInfo->ipi6_ifindex = static_cast<decltype(pktInfo->ipi6_ifindex)>(intfId);
             pktInfo->ipi6_addr    = aPktInfo->SrcAddress.ToIPv6();
 
             msgHeader.msg_controllen = CMSG_SPACE(sizeof(in6_pktinfo));
 #else  // !defined(IPV6_PKTINFO)
-            return INET_ERROR_NOT_SUPPORTED;
+            return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif // !defined(IPV6_PKTINFO)
         }
 
 #else  // !(defined(IP_PKTINFO) && defined(IPV6_PKTINFO))
-        return INET_ERROR_NOT_SUPPORTED;
+        return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif // !(defined(IP_PKTINFO) && defined(IPV6_PKTINFO))
     }
 
@@ -911,14 +911,12 @@
     if (lenSent == -1)
         return chip::System::MapErrorPOSIX(errno);
     if (lenSent != aBuffer->DataLength())
-        return INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED;
-    return INET_NO_ERROR;
+        return CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG;
+    return CHIP_NO_ERROR;
 }
 
-INET_ERROR IPEndPointBasis::GetSocket(IPAddressType aAddressType, int aType, int aProtocol)
+CHIP_ERROR IPEndPointBasis::GetSocket(IPAddressType aAddressType, int aType, int aProtocol)
 {
-    INET_ERROR res = INET_NO_ERROR;
-
     if (!mSocket.HasFD())
     {
         const int one = 1;
@@ -956,7 +954,7 @@
         // logic up to check for implementations of these options and
         // to provide appropriate HAVE_xxxxx definitions accordingly.
 
-        res = setsockopt(mSocket.GetFD(), SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
+        int res = setsockopt(mSocket.GetFD(), SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
         static_cast<void>(res);
 
 #ifdef SO_REUSEPORT
@@ -1022,15 +1020,15 @@
     }
     else if (mAddrType != aAddressType)
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void IPEndPointBasis::HandlePendingIO(uint16_t aPort)
 {
-    INET_ERROR lStatus = INET_NO_ERROR;
+    CHIP_ERROR lStatus = CHIP_NO_ERROR;
     IPPacketInfo lPacketInfo;
     System::PacketBufferHandle lBuffer;
 
@@ -1068,7 +1066,7 @@
         }
         else if (rcvLen > lBuffer->AvailableDataLength())
         {
-            lStatus = INET_ERROR_INBOUND_MESSAGE_TOO_BIG;
+            lStatus = CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG;
         }
         else
         {
@@ -1088,11 +1086,11 @@
 #endif // INET_CONFIG_ENABLE_IPV4
             else
             {
-                lStatus = INET_ERROR_INCORRECT_STATE;
+                lStatus = CHIP_ERROR_INCORRECT_STATE;
             }
         }
 
-        if (lStatus == INET_NO_ERROR)
+        if (lStatus == CHIP_NO_ERROR)
         {
             for (struct cmsghdr * controlHdr = CMSG_FIRSTHDR(&msgHeader); controlHdr != nullptr;
                  controlHdr                  = CMSG_NXTHDR(&msgHeader, controlHdr))
@@ -1104,7 +1102,7 @@
                     struct in_pktinfo * inPktInfo = reinterpret_cast<struct in_pktinfo *> CMSG_DATA(controlHdr);
                     if (!CanCastTo<InterfaceId>(inPktInfo->ipi_ifindex))
                     {
-                        lStatus = INET_ERROR_INCORRECT_STATE;
+                        lStatus = CHIP_ERROR_INCORRECT_STATE;
                         break;
                     }
                     lPacketInfo.Interface   = static_cast<InterfaceId>(inPktInfo->ipi_ifindex);
@@ -1120,7 +1118,7 @@
                     struct in6_pktinfo * in6PktInfo = reinterpret_cast<struct in6_pktinfo *> CMSG_DATA(controlHdr);
                     if (!CanCastTo<InterfaceId>(in6PktInfo->ipi6_ifindex))
                     {
-                        lStatus = INET_ERROR_INCORRECT_STATE;
+                        lStatus = CHIP_ERROR_INCORRECT_STATE;
                         break;
                     }
                     lPacketInfo.Interface   = static_cast<InterfaceId>(in6PktInfo->ipi6_ifindex);
@@ -1133,10 +1131,10 @@
     }
     else
     {
-        lStatus = INET_ERROR_NO_MEMORY;
+        lStatus = CHIP_ERROR_NO_MEMORY;
     }
 
-    if (lStatus == INET_NO_ERROR)
+    if (lStatus == CHIP_NO_ERROR)
     {
         lBuffer.RightSize();
         OnMessageReceived(this, std::move(lBuffer), &lPacketInfo);
@@ -1152,9 +1150,9 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
 #if CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
-INET_ERROR IPEndPointBasis::ConfigureProtocol(IPAddressType aAddressType, const nw_parameters_t & aParameters)
+CHIP_ERROR IPEndPointBasis::ConfigureProtocol(IPAddressType aAddressType, const nw_parameters_t & aParameters)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     nw_protocol_stack_t protocolStack = nw_parameters_copy_default_protocol_stack(aParameters);
     nw_protocol_options_t ipOptions   = nw_protocol_stack_copy_internet_protocol(protocolStack);
@@ -1182,47 +1180,47 @@
     return res;
 }
 
-INET_ERROR IPEndPointBasis::Bind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort,
+CHIP_ERROR IPEndPointBasis::Bind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort,
                                  const nw_parameters_t & aParameters)
 {
     nw_endpoint_t endpoint = nullptr;
 
-    VerifyOrReturnError(aParameters != NULL, INET_ERROR_BAD_ARGS);
+    VerifyOrReturnError(aParameters != NULL, CHIP_ERROR_INVALID_ARGUMENT);
 
     ReturnErrorOnFailure(ConfigureProtocol(aAddressType, aParameters));
 
-    INET_ERROR res = GetEndPoint(endpoint, aAddressType, aAddress, aPort);
+    CHIP_ERROR res = GetEndPoint(endpoint, aAddressType, aAddress, aPort);
     nw_parameters_set_local_endpoint(aParameters, endpoint);
     nw_release(endpoint);
     ReturnErrorOnFailure(res);
 
     mDispatchQueue = dispatch_queue_create("inet_dispatch_global", DISPATCH_QUEUE_CONCURRENT);
-    VerifyOrReturnError(mDispatchQueue != NULL, INET_ERROR_NO_MEMORY);
+    VerifyOrReturnError(mDispatchQueue != NULL, CHIP_ERROR_NO_MEMORY);
     dispatch_retain(mDispatchQueue);
 
     mConnectionSemaphore = dispatch_semaphore_create(0);
-    VerifyOrReturnError(mConnectionSemaphore != NULL, INET_ERROR_NO_MEMORY);
+    VerifyOrReturnError(mConnectionSemaphore != NULL, CHIP_ERROR_NO_MEMORY);
     dispatch_retain(mConnectionSemaphore);
 
     mSendSemaphore = dispatch_semaphore_create(0);
-    VerifyOrReturnError(mSendSemaphore != NULL, INET_ERROR_NO_MEMORY);
+    VerifyOrReturnError(mSendSemaphore != NULL, CHIP_ERROR_NO_MEMORY);
     dispatch_retain(mSendSemaphore);
 
     mAddrType   = aAddressType;
     mConnection = NULL;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-INET_ERROR IPEndPointBasis::SendMsg(const IPPacketInfo * aPktInfo, chip::System::PacketBufferHandle && aBuffer, uint16_t aSendFlags)
+CHIP_ERROR IPEndPointBasis::SendMsg(const IPPacketInfo * aPktInfo, chip::System::PacketBufferHandle && aBuffer, uint16_t aSendFlags)
 {
     dispatch_data_t content;
 
     // Ensure the destination address type is compatible with the endpoint address type.
-    VerifyOrReturnError(mAddrType == aPktInfo->DestAddress.Type(), INET_ERROR_BAD_ARGS);
+    VerifyOrReturnError(mAddrType == aPktInfo->DestAddress.Type(), CHIP_ERROR_INVALID_ARGUMENT);
 
     // For now the entire message must fit within a single buffer.
-    VerifyOrReturnError(aBuffer->Next() == NULL, INET_ERROR_MESSAGE_TOO_LONG);
+    VerifyOrReturnError(aBuffer->Next() == NULL, CHIP_ERROR_MESSAGE_TOO_LONG);
 
     ReturnErrorOnFailure(GetConnection(aPktInfo));
 
@@ -1232,10 +1230,10 @@
     // If there is a current message pending and the state of the network connection change (e.g switch to a
     // different network) the connection will enter a nw_connection_state_failed state and the completion handler
     // will never be called. In such cases a signal is sent from the connection state change handler to release
-    // the semaphore. In this case the INET_ERROR will not update with the result of the completion handler.
+    // the semaphore. In this case the CHIP_ERROR will not update with the result of the completion handler.
     // To make sure caller knows that sending a message has failed the following code consider there is an error
     // _unless_ the completion handler says otherwise.
-    __block INET_ERROR res = INET_ERROR_UNEXPECTED_EVENT;
+    __block CHIP_ERROR res = CHIP_ERROR_UNEXPECTED_EVENT;
     nw_connection_send(mConnection, content, NW_CONNECTION_DEFAULT_MESSAGE_CONTEXT, true, ^(nw_error_t error) {
         if (error)
         {
@@ -1243,7 +1241,7 @@
         }
         else
         {
-            res = INET_NO_ERROR;
+            res = CHIP_NO_ERROR;
         }
         dispatch_semaphore_signal(mSendSemaphore);
     });
@@ -1270,7 +1268,7 @@
                     errno                          = nw_error_get_error_code(receive_error);
                     if (!(error_domain == nw_error_domain_posix && errno == ECANCELED))
                     {
-                        INET_ERROR error = chip::System::MapErrorPOSIX(errno);
+                        CHIP_ERROR error = chip::System::MapErrorPOSIX(errno);
                         IPPacketInfo packetInfo;
                         GetPacketInfo(aConnection, packetInfo);
                         dispatch_async(mDispatchQueue, ^{
@@ -1316,7 +1314,7 @@
     aPacketInfo.DestPort    = nw_endpoint_get_port(dest_endpoint);
 }
 
-INET_ERROR IPEndPointBasis::GetEndPoint(nw_endpoint_t & aEndPoint, const IPAddressType aAddressType, const IPAddress & aAddress,
+CHIP_ERROR IPEndPointBasis::GetEndPoint(nw_endpoint_t & aEndPoint, const IPAddressType aAddressType, const IPAddress & aAddress,
                                         uint16_t aPort)
 {
     char addrStr[INET6_ADDRSTRLEN];
@@ -1337,14 +1335,14 @@
     snprintf(portStr, sizeof(portStr), "%u", aPort);
 
     aEndPoint = nw_endpoint_create_host(addrStr, portStr);
-    VerifyOrReturnError(aEndPoint != NULL, INET_ERROR_BAD_ARGS);
+    VerifyOrReturnError(aEndPoint != NULL, CHIP_ERROR_INVALID_ARGUMENT);
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-INET_ERROR IPEndPointBasis::GetConnection(const IPPacketInfo * aPktInfo)
+CHIP_ERROR IPEndPointBasis::GetConnection(const IPPacketInfo * aPktInfo)
 {
-    VerifyOrReturnError(mParameters != NULL, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mParameters != NULL, CHIP_ERROR_INCORRECT_STATE);
 
     nw_endpoint_t endpoint     = NULL;
     nw_connection_t connection = NULL;
@@ -1356,7 +1354,7 @@
         const IPAddress remote_address = IPAddress::FromSockAddr(*nw_endpoint_get_address(remote_endpoint));
         const uint16_t remote_port     = nw_endpoint_get_port(remote_endpoint);
         const bool isDifferentEndPoint = aPktInfo->DestPort != remote_port || aPktInfo->DestAddress != remote_address;
-        VerifyOrReturnError(isDifferentEndPoint, INET_NO_ERROR);
+        VerifyOrReturnError(isDifferentEndPoint, CHIP_NO_ERROR);
 
         ReturnErrorOnFailure(ReleaseConnection());
     }
@@ -1366,29 +1364,29 @@
     connection = nw_connection_create(endpoint, mParameters);
     nw_release(endpoint);
 
-    VerifyOrReturnError(connection != NULL, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(connection != NULL, CHIP_ERROR_INCORRECT_STATE);
 
     return StartConnection(connection);
 }
 
-INET_ERROR IPEndPointBasis::StartListener()
+CHIP_ERROR IPEndPointBasis::StartListener()
 {
-    __block INET_ERROR res = INET_NO_ERROR;
+    __block CHIP_ERROR res = CHIP_NO_ERROR;
     nw_listener_t listener;
 
-    VerifyOrReturnError(mListener == NULL, INET_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mListenerSemaphore == NULL, INET_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mListenerQueue == NULL, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mListener == NULL, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mListenerSemaphore == NULL, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mListenerQueue == NULL, CHIP_ERROR_INCORRECT_STATE);
 
     listener = nw_listener_create(mParameters);
-    VerifyOrReturnError(listener != NULL, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(listener != NULL, CHIP_ERROR_INCORRECT_STATE);
 
     mListenerSemaphore = dispatch_semaphore_create(0);
-    VerifyOrReturnError(mListenerSemaphore != NULL, INET_ERROR_NO_MEMORY);
+    VerifyOrReturnError(mListenerSemaphore != NULL, CHIP_ERROR_NO_MEMORY);
     dispatch_retain(mListenerSemaphore);
 
     mListenerQueue = dispatch_queue_create("inet_dispatch_listener", DISPATCH_QUEUE_CONCURRENT);
-    VerifyOrReturnError(mListenerQueue != NULL, INET_ERROR_NO_MEMORY);
+    VerifyOrReturnError(mListenerQueue != NULL, CHIP_ERROR_NO_MEMORY);
     dispatch_retain(mListenerQueue);
 
     nw_listener_set_queue(listener, mListenerQueue);
@@ -1404,7 +1402,7 @@
 
         case nw_listener_state_invalid:
             ChipLogDetail(Inet, "Listener: Invalid");
-            res = INET_ERROR_INCORRECT_STATE;
+            res = CHIP_ERROR_INCORRECT_STATE;
             nw_listener_cancel(listener);
             break;
 
@@ -1419,13 +1417,13 @@
 
         case nw_listener_state_ready:
             ChipLogDetail(Inet, "Listener: Ready");
-            res = INET_NO_ERROR;
+            res = CHIP_NO_ERROR;
             dispatch_semaphore_signal(mListenerSemaphore);
             break;
 
         case nw_listener_state_cancelled:
             ChipLogDetail(Inet, "Listener: Cancelled");
-            if (res == INET_NO_ERROR)
+            if (res == CHIP_NO_ERROR)
                 res = INET_ERROR_CONNECTION_ABORTED;
 
             dispatch_semaphore_signal(mListenerSemaphore);
@@ -1442,9 +1440,9 @@
     return res;
 }
 
-INET_ERROR IPEndPointBasis::StartConnection(nw_connection_t & aConnection)
+CHIP_ERROR IPEndPointBasis::StartConnection(nw_connection_t & aConnection)
 {
-    __block INET_ERROR res = INET_NO_ERROR;
+    __block CHIP_ERROR res = CHIP_NO_ERROR;
 
     nw_connection_set_queue(aConnection, mDispatchQueue);
 
@@ -1454,13 +1452,13 @@
 
         case nw_connection_state_invalid:
             ChipLogDetail(Inet, "Connection: Invalid");
-            res = INET_ERROR_INCORRECT_STATE;
+            res = CHIP_ERROR_INCORRECT_STATE;
             nw_connection_cancel(aConnection);
             break;
 
         case nw_connection_state_preparing:
             ChipLogDetail(Inet, "Connection: Preparing");
-            res = INET_ERROR_INCORRECT_STATE;
+            res = CHIP_ERROR_INCORRECT_STATE;
             break;
 
         case nw_connection_state_waiting:
@@ -1475,13 +1473,13 @@
 
         case nw_connection_state_ready:
             ChipLogDetail(Inet, "Connection: Ready");
-            res = INET_NO_ERROR;
+            res = CHIP_NO_ERROR;
             dispatch_semaphore_signal(mConnectionSemaphore);
             break;
 
         case nw_connection_state_cancelled:
             ChipLogDetail(Inet, "Connection: Cancelled");
-            if (res == INET_NO_ERROR)
+            if (res == CHIP_NO_ERROR)
                 res = INET_ERROR_CONNECTION_ABORTED;
 
             dispatch_semaphore_signal(mConnectionSemaphore);
@@ -1548,32 +1546,32 @@
     }
 }
 
-INET_ERROR IPEndPointBasis::ReleaseListener()
+CHIP_ERROR IPEndPointBasis::ReleaseListener()
 {
-    VerifyOrReturnError(mListener, INET_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mDispatchQueue, INET_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mConnectionSemaphore, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mListener, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mDispatchQueue, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mConnectionSemaphore, CHIP_ERROR_INCORRECT_STATE);
 
     nw_listener_cancel(mListener);
     dispatch_semaphore_wait(mListenerSemaphore, DISPATCH_TIME_FOREVER);
     nw_release(mListener);
     mListener = NULL;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-INET_ERROR IPEndPointBasis::ReleaseConnection()
+CHIP_ERROR IPEndPointBasis::ReleaseConnection()
 {
-    VerifyOrReturnError(mConnection, INET_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mDispatchQueue, INET_ERROR_INCORRECT_STATE);
-    VerifyOrReturnError(mConnectionSemaphore, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mConnection, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mDispatchQueue, CHIP_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(mConnectionSemaphore, CHIP_ERROR_INCORRECT_STATE);
 
     nw_connection_cancel(mConnection);
     dispatch_semaphore_wait(mConnectionSemaphore, DISPATCH_TIME_FOREVER);
     nw_release(mConnection);
     mConnection = NULL;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 #endif // CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
diff --git a/src/inet/IPEndPointBasis.h b/src/inet/IPEndPointBasis.h
index 21c8a4f..91c54ab 100644
--- a/src/inet/IPEndPointBasis.h
+++ b/src/inet/IPEndPointBasis.h
@@ -104,11 +104,11 @@
      *  member to process reception error events on \c endPoint. The \c err
      *  argument provides specific detail about the type of the error.
      */
-    typedef void (*OnReceiveErrorFunct)(IPEndPointBasis * endPoint, INET_ERROR err, const IPPacketInfo * pktInfo);
+    typedef void (*OnReceiveErrorFunct)(IPEndPointBasis * endPoint, CHIP_ERROR err, const IPPacketInfo * pktInfo);
 
-    INET_ERROR SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback);
-    INET_ERROR JoinMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress);
-    INET_ERROR LeaveMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress);
+    CHIP_ERROR SetMulticastLoopback(IPVersion aIPVersion, bool aLoopback);
+    CHIP_ERROR JoinMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress);
+    CHIP_ERROR LeaveMulticastGroup(InterfaceId aInterfaceId, const IPAddress & aAddress);
 
 protected:
     void Init(InetLayer * aInetLayer);
@@ -122,8 +122,8 @@
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 public:
     static struct netif * FindNetifFromInterfaceId(InterfaceId aInterfaceId);
-    static System::Error PostPacketBufferEvent(chip::System::Layer & aLayer, System::Object & aTarget, System::EventType aEventType,
-                                               System::PacketBufferHandle && aBuffer);
+    static CHIP_ERROR PostPacketBufferEvent(chip::System::Layer & aLayer, System::Object & aTarget, System::EventType aEventType,
+                                            System::PacketBufferHandle && aBuffer);
 
 protected:
     void HandleDataReceived(chip::System::PacketBufferHandle && aBuffer);
@@ -134,10 +134,10 @@
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
     InterfaceId mBoundIntfId;
 
-    INET_ERROR Bind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort, InterfaceId aInterfaceId);
-    INET_ERROR BindInterface(IPAddressType aAddressType, InterfaceId aInterfaceId);
-    INET_ERROR SendMsg(const IPPacketInfo * aPktInfo, chip::System::PacketBufferHandle && aBuffer, uint16_t aSendFlags);
-    INET_ERROR GetSocket(IPAddressType aAddressType, int aType, int aProtocol);
+    CHIP_ERROR Bind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort, InterfaceId aInterfaceId);
+    CHIP_ERROR BindInterface(IPAddressType aAddressType, InterfaceId aInterfaceId);
+    CHIP_ERROR SendMsg(const IPPacketInfo * aPktInfo, chip::System::PacketBufferHandle && aBuffer, uint16_t aSendFlags);
+    CHIP_ERROR GetSocket(IPAddressType aAddressType, int aType, int aProtocol);
     void HandlePendingIO(uint16_t aPort);
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
@@ -151,17 +151,17 @@
     dispatch_queue_t mDispatchQueue;
     dispatch_semaphore_t mSendSemaphore;
 
-    INET_ERROR Bind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort, const nw_parameters_t & aParameters);
-    INET_ERROR ConfigureProtocol(IPAddressType aAddressType, const nw_parameters_t & aParameters);
-    INET_ERROR SendMsg(const IPPacketInfo * aPktInfo, chip::System::PacketBufferHandle && aBuffer, uint16_t aSendFlags);
-    INET_ERROR StartListener();
-    INET_ERROR GetConnection(const IPPacketInfo * aPktInfo);
-    INET_ERROR GetEndPoint(nw_endpoint_t & aEndpoint, const IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort);
-    INET_ERROR StartConnection(nw_connection_t & aConnection);
+    CHIP_ERROR Bind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort, const nw_parameters_t & aParameters);
+    CHIP_ERROR ConfigureProtocol(IPAddressType aAddressType, const nw_parameters_t & aParameters);
+    CHIP_ERROR SendMsg(const IPPacketInfo * aPktInfo, chip::System::PacketBufferHandle && aBuffer, uint16_t aSendFlags);
+    CHIP_ERROR StartListener();
+    CHIP_ERROR GetConnection(const IPPacketInfo * aPktInfo);
+    CHIP_ERROR GetEndPoint(nw_endpoint_t & aEndpoint, const IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort);
+    CHIP_ERROR StartConnection(nw_connection_t & aConnection);
     void GetPacketInfo(const nw_connection_t & aConnection, IPPacketInfo & aPacketInfo);
     void HandleDataReceived(const nw_connection_t & aConnection);
-    INET_ERROR ReleaseListener();
-    INET_ERROR ReleaseConnection();
+    CHIP_ERROR ReleaseListener();
+    CHIP_ERROR ReleaseConnection();
     void ReleaseAll();
 #endif // CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
 
diff --git a/src/inet/InetConfig.h b/src/inet/InetConfig.h
index 1e0997f..8c96a81 100644
--- a/src/inet/InetConfig.h
+++ b/src/inet/InetConfig.h
@@ -88,35 +88,6 @@
 #endif // INET_CONFIG_MAX_IP_AND_UDP_HEADER_SIZE
 
 /**
- *  @def INET_CONFIG_ERROR_TYPE
- *
- *  @brief
- *    This defines the data type used to represent errors for the
- *    InetLayer subsystem.
- *
- *  @note
- *    By default, this parameter is a copy of CHIP_SYSTEM_CONFIG_ERROR_TYPE.
- *
- */
-#ifndef INET_CONFIG_ERROR_TYPE
-#define INET_CONFIG_ERROR_TYPE                              CHIP_SYSTEM_CONFIG_ERROR_TYPE
-#endif // !defined(INET_CONFIG_ERROR_TYPE)
-
-/**
- *  @def INET_CONFIG_NO_ERROR
- *
- *  @brief
- *    This defines the InetLayer error code for no error or success.
- *
- *  @note
- *    By default, this parameter is a copy of CHIP_SYSTEM_CONFIG_NO_ERROR.
- *
- */
-#ifndef INET_CONFIG_NO_ERROR
-#define INET_CONFIG_NO_ERROR                                CHIP_SYSTEM_CONFIG_NO_ERROR
-#endif // !defined(INET_CONFIG_NO_ERROR)
-
-/**
  *  @def INET_CONFIG_ERROR_MIN
  *
  *  @brief
@@ -139,15 +110,15 @@
 #endif // INET_CONFIG_ERROR_MAX
 
 /**
- *  @def _INET_CONFIG_ERROR
+ *  @def INET_CONFIG_ERROR
  *
  *  @brief
  *    This defines a mapping function for InetLayer errors that allows
  *    mapping such errors into a platform- or system-specific range.
  *
  */
-#ifndef _INET_CONFIG_ERROR
-#define _INET_CONFIG_ERROR(e)                               (INET_ERROR_MIN + (e))
+#ifndef INET_CONFIG_ERROR
+#define INET_CONFIG_ERROR(e)                                (INET_CONFIG_ERROR_MIN + (e))
 #endif // _INET_CONFIG_ERROR
 
 /**
diff --git a/src/inet/InetError.cpp b/src/inet/InetError.cpp
index 128f982..d94221e 100644
--- a/src/inet/InetError.cpp
+++ b/src/inet/InetError.cpp
@@ -55,11 +55,11 @@
  * @return false                    If the supplied error was not an Inet Layer error.
  *
  */
-bool FormatLayerError(char * buf, uint16_t bufSize, int32_t err)
+bool FormatLayerError(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
     const char * desc = nullptr;
 
-    if (err < INET_ERROR_MIN || err > INET_ERROR_MAX)
+    if (err < INET_CONFIG_ERROR_MIN || err > INET_CONFIG_ERROR_MAX)
     {
         return false;
     }
@@ -70,28 +70,28 @@
     case INET_ERROR_WRONG_ADDRESS_TYPE:
         desc = "Wrong address type";
         break;
-    case INET_ERROR_CONNECTION_ABORTED:
+    case CHIP_ERROR_CONNECTION_ABORTED:
         desc = "TCP connection aborted";
         break;
     case INET_ERROR_PEER_DISCONNECTED:
         desc = "Peer disconnected";
         break;
-    case INET_ERROR_INCORRECT_STATE:
+    case CHIP_ERROR_INCORRECT_STATE:
         desc = "Incorrect state";
         break;
-    case INET_ERROR_MESSAGE_TOO_LONG:
+    case CHIP_ERROR_MESSAGE_TOO_LONG:
         desc = "Message too long";
         break;
-    case INET_ERROR_NO_CONNECTION_HANDLER:
+    case CHIP_ERROR_NO_CONNECTION_HANDLER:
         desc = "No TCP connection handler";
         break;
-    case INET_ERROR_NO_MEMORY:
+    case CHIP_ERROR_NO_MEMORY:
         desc = "No memory";
         break;
-    case INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED:
+    case CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG:
         desc = "Outbound message truncated";
         break;
-    case INET_ERROR_INBOUND_MESSAGE_TOO_BIG:
+    case CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG:
         desc = "Inbound message too big";
         break;
     case INET_ERROR_HOST_NOT_FOUND:
@@ -103,7 +103,7 @@
     case INET_ERROR_DNS_NO_RECOVERY:
         desc = "DNS no recovery";
         break;
-    case INET_ERROR_BAD_ARGS:
+    case CHIP_ERROR_INVALID_ARGUMENT:
         desc = "Bad arguments";
         break;
     case INET_ERROR_WRONG_PROTOCOL_TYPE:
@@ -112,7 +112,7 @@
     case INET_ERROR_UNKNOWN_INTERFACE:
         desc = "Unknown interface";
         break;
-    case INET_ERROR_NOT_IMPLEMENTED:
+    case CHIP_ERROR_NOT_IMPLEMENTED:
         desc = "Not implemented";
         break;
     case INET_ERROR_ADDRESS_NOT_FOUND:
@@ -124,16 +124,16 @@
     case INET_ERROR_INVALID_HOST_NAME:
         desc = "Invalid host name";
         break;
-    case INET_ERROR_NOT_SUPPORTED:
+    case CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE:
         desc = "Not supported";
         break;
-    case INET_ERROR_NO_ENDPOINTS:
+    case CHIP_ERROR_ENDPOINT_POOL_FULL:
         desc = "No more TCP endpoints";
         break;
     case INET_ERROR_IDLE_TIMEOUT:
         desc = "Idle timeout";
         break;
-    case INET_ERROR_UNEXPECTED_EVENT:
+    case CHIP_ERROR_UNEXPECTED_EVENT:
         desc = "Unexpected event";
         break;
     case INET_ERROR_INVALID_IPV6_PKT:
diff --git a/src/inet/InetError.h b/src/inet/InetError.h
index 9e6f1f7..13e67f2 100644
--- a/src/inet/InetError.h
+++ b/src/inet/InetError.h
@@ -37,58 +37,20 @@
 // clang-format off
 
 /**
- *  The basic type for all InetLayer errors.
- *
- *  This is defined to a platform- or system-specific type.
- *
- */
-typedef INET_CONFIG_ERROR_TYPE          INET_ERROR;
-
-/**
- *  @def INET_ERROR_MIN
- *
- *  @brief
- *    This defines the base or minimum InetLayer error number
- *    range. This value may be configured via #INET_CONFIG_ERROR_MIN.
- *
- */
-#define INET_ERROR_MIN                  INET_CONFIG_ERROR_MIN
-
-/**
- *  @def INET_ERROR_MAX
- *
- *  @brief
- *    This defines the top or maximum InetLayer error number
- *    range. This value may be configured via #INET_CONFIG_ERROR_MAX.
- *
- */
-#define INET_ERROR_MAX                  INET_CONFIG_ERROR_MAX
-
-/**
- *  @def _INET_ERROR(e)
+ *  @def CHIP_INET_ERROR(e)
  *
  *  @brief
  *    This defines a mapping function for InetLayer errors that allows
  *    mapping such errors into a platform- or system-specific
  *    range. This function may be configured via
- *    #_INET_CONFIG_ERROR(e).
+ *    #INET_CONFIG_ERROR(e).
  *
  *  @param[in]  e  The InetLayer error to map.
  *
  *  @return The mapped InetLayer error.
  *
  */
-#define _INET_ERROR(e)                  _INET_CONFIG_ERROR(e)
-
-/**
- *  @def INET_NO_ERROR
- *
- *  @brief
- *    This defines the InetLayer error code for success or no
- *    error. This value may be configured via #INET_CONFIG_NO_ERROR.
- *
- */
-#define INET_NO_ERROR                   INET_CONFIG_NO_ERROR
+#define CHIP_INET_ERROR(e)                                  INET_CONFIG_ERROR(e)
 
 /**
  *  @name Error Definitions
@@ -104,16 +66,9 @@
  *    the expected type or scope.
  *
  */
-#define INET_ERROR_WRONG_ADDRESS_TYPE                       _INET_ERROR(0)
+#define INET_ERROR_WRONG_ADDRESS_TYPE                       CHIP_INET_ERROR(0)
 
-/**
- *  @def INET_ERROR_CONNECTION_ABORTED
- *
- *  @brief
- *    A connection has been aborted.
- *
- */
-#define INET_ERROR_CONNECTION_ABORTED                       _INET_ERROR(1)
+// unused                                                   CHIP_INET_ERROR(1)
 
 /**
  *  @def INET_ERROR_PEER_DISCONNECTED
@@ -122,63 +77,14 @@
  *    A remote connection peer disconnected.
  *
  */
-#define INET_ERROR_PEER_DISCONNECTED                        _INET_ERROR(2)
+#define INET_ERROR_PEER_DISCONNECTED                        CHIP_INET_ERROR(2)
 
-/**
- *  @def INET_ERROR_INCORRECT_STATE
- *
- *  @brief
- *    An unexpected state was encountered.
- *
- */
-#define INET_ERROR_INCORRECT_STATE                          _INET_ERROR(3)
-
-/**
- *  @def INET_ERROR_MESSAGE_TOO_LONG
- *
- *  @brief
- *    A message is too long.
- *
- */
-#define INET_ERROR_MESSAGE_TOO_LONG                         _INET_ERROR(4)
-
-/**
- *  @def INET_ERROR_NO_CONNECTION_HANDLER
- *
- *  @brief
- *    No callback has been registered for handling an incoming TCP
- *    connection.
- *
- */
-#define INET_ERROR_NO_CONNECTION_HANDLER                    _INET_ERROR(5)
-
-/**
- *  @def INET_ERROR_NO_MEMORY
- *
- *  @brief
- *    A request for memory could not be fulfilled.
- *
- */
-#define INET_ERROR_NO_MEMORY                                _INET_ERROR(6)
-
-/**
- *  @def INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED
- *
- *  @brief
- *    Fewer message bytes were sent than requested.
- *
- */
-#define INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED               _INET_ERROR(7)
-
-/**
- *  @def INET_ERROR_INBOUND_MESSAGE_TOO_BIG
- *
- *  @brief
- *    More message data is pending than available buffer space
- *    available to copy it.
- *
- */
-#define INET_ERROR_INBOUND_MESSAGE_TOO_BIG                  _INET_ERROR(8)
+// unused                                                   CHIP_INET_ERROR(3)
+// unused                                                   CHIP_INET_ERROR(4)
+// unused                                                   CHIP_INET_ERROR(5)
+// unused                                                   CHIP_INET_ERROR(6)
+// unused                                                   CHIP_INET_ERROR(7)
+// unused                                                   CHIP_INET_ERROR(8)
 
 /**
  *  @def INET_ERROR_HOST_NOT_FOUND
@@ -187,7 +93,7 @@
  *    A requested host name could not be resolved to an address.
  *
  */
-#define INET_ERROR_HOST_NOT_FOUND                           _INET_ERROR(9)
+#define INET_ERROR_HOST_NOT_FOUND                           CHIP_INET_ERROR(9)
 
 /**
  *  @def INET_ERROR_DNS_TRY_AGAIN
@@ -197,7 +103,7 @@
  *    again later.
  *
  */
-#define INET_ERROR_DNS_TRY_AGAIN                            _INET_ERROR(10)
+#define INET_ERROR_DNS_TRY_AGAIN                            CHIP_INET_ERROR(10)
 
 /**
  *  @def INET_ERROR_DNS_NO_RECOVERY
@@ -206,16 +112,9 @@
  *    A name server returned an unrecoverable error.
  *
  */
-#define INET_ERROR_DNS_NO_RECOVERY                          _INET_ERROR(11)
+#define INET_ERROR_DNS_NO_RECOVERY                          CHIP_INET_ERROR(11)
 
-/**
- *  @def INET_ERROR_BAD_ARGS
- *
- *  @brief
- *    An invalid argument or arguments were supplied.
- *
- */
-#define INET_ERROR_BAD_ARGS                                 _INET_ERROR(12)
+// unused                                                   CHIP_INET_ERROR(12)
 
 /**
  *  @def INET_ERROR_WRONG_PROTOCOL_TYPE
@@ -224,7 +123,7 @@
  *    An incorrect or unexpected protocol type was encountered.
  *
  */
-#define INET_ERROR_WRONG_PROTOCOL_TYPE                      _INET_ERROR(13)
+#define INET_ERROR_WRONG_PROTOCOL_TYPE                      CHIP_INET_ERROR(13)
 
 /**
  *  @def INET_ERROR_UNKNOWN_INTERFACE
@@ -233,16 +132,9 @@
  *    An unknown interface identifier was encountered.
  *
  */
-#define INET_ERROR_UNKNOWN_INTERFACE                        _INET_ERROR(14)
+#define INET_ERROR_UNKNOWN_INTERFACE                        CHIP_INET_ERROR(14)
 
-/**
- *  @def INET_ERROR_NOT_IMPLEMENTED
- *
- *  @brief
- *    A requested function or feature is not implemented.
- *
- */
-#define INET_ERROR_NOT_IMPLEMENTED                          _INET_ERROR(15)
+// unused                                                   CHIP_INET_ERROR(15)
 
 /**
  *  @def INET_ERROR_ADDRESS_NOT_FOUND
@@ -251,7 +143,7 @@
  *    A requested address type, class, or scope cannot be found.
  *
  */
-#define INET_ERROR_ADDRESS_NOT_FOUND                        _INET_ERROR(16)
+#define INET_ERROR_ADDRESS_NOT_FOUND                        CHIP_INET_ERROR(16)
 
 /**
  *  @def INET_ERROR_HOST_NAME_TOO_LONG
@@ -260,7 +152,7 @@
  *    A requested host name is too long.
  *
  */
-#define INET_ERROR_HOST_NAME_TOO_LONG                       _INET_ERROR(17)
+#define INET_ERROR_HOST_NAME_TOO_LONG                       CHIP_INET_ERROR(17)
 
 /**
  *  @def INET_ERROR_INVALID_HOST_NAME
@@ -269,25 +161,10 @@
  *    A requested host name and port is invalid.
  *
  */
-#define INET_ERROR_INVALID_HOST_NAME                        _INET_ERROR(18)
+#define INET_ERROR_INVALID_HOST_NAME                        CHIP_INET_ERROR(18)
 
-/**
- *  @def INET_ERROR_NOT_SUPPORTED
- *
- *  @brief
- *    A requested function or feature is not supported.
- *
- */
-#define INET_ERROR_NOT_SUPPORTED                            _INET_ERROR(19)
-
-/**
- *  @def INET_ERROR_NO_ENDPOINTS
- *
- *  @brief
- *    No endpoint of the specified type is available.
- *
- */
-#define INET_ERROR_NO_ENDPOINTS                             _INET_ERROR(20)
+// unused                                                   CHIP_INET_ERROR(19)
+// unused                                                   CHIP_INET_ERROR(20)
 
 /**
  *  @def INET_ERROR_IDLE_TIMEOUT
@@ -296,16 +173,9 @@
  *    A TCP connection timed out due to inactivity.
  *
  */
-#define INET_ERROR_IDLE_TIMEOUT                             _INET_ERROR(21)
+#define INET_ERROR_IDLE_TIMEOUT                             CHIP_INET_ERROR(21)
 
-/**
- *  @def INET_ERROR_UNEXPECTED_EVENT
- *
- *  @brief
- *    An unexpected event occurred or was handled.
- *
- */
-#define INET_ERROR_UNEXPECTED_EVENT                         _INET_ERROR(22)
+// unused                                                   CHIP_INET_ERROR(22)
 
 /**
  *  @def INET_ERROR_INVALID_IPV6_PKT
@@ -314,7 +184,7 @@
  *    An IPv6 packet is invalid.
  *
  */
-#define INET_ERROR_INVALID_IPV6_PKT                         _INET_ERROR(23)
+#define INET_ERROR_INVALID_IPV6_PKT                         CHIP_INET_ERROR(23)
 
 /**
  *  @def INET_ERROR_INTERFACE_INIT_FAILURE
@@ -323,7 +193,7 @@
  *    Failure to initialize an interface.
  *
  */
-#define INET_ERROR_INTERFACE_INIT_FAILURE                   _INET_ERROR(24)
+#define INET_ERROR_INTERFACE_INIT_FAILURE                   CHIP_INET_ERROR(24)
 
 /**
  *  @def INET_ERROR_TCP_USER_TIMEOUT
@@ -333,7 +203,7 @@
  *    acknowledgment for transmitted packet.
  *
  */
-#define INET_ERROR_TCP_USER_TIMEOUT                         _INET_ERROR(25)
+#define INET_ERROR_TCP_USER_TIMEOUT                         CHIP_INET_ERROR(25)
 
 /**
  *  @def INET_ERROR_TCP_CONNECT_TIMEOUT
@@ -344,7 +214,7 @@
  *    of an error.
  *
  */
-#define INET_ERROR_TCP_CONNECT_TIMEOUT                      _INET_ERROR(26)
+#define INET_ERROR_TCP_CONNECT_TIMEOUT                      CHIP_INET_ERROR(26)
 
 /**
  *  @def INET_ERROR_INCOMPATIBLE_IP_ADDRESS_TYPE
@@ -354,7 +224,7 @@
  *    IP address type.
  *
  */
-#define INET_ERROR_INCOMPATIBLE_IP_ADDRESS_TYPE             _INET_ERROR(27)
+#define INET_ERROR_INCOMPATIBLE_IP_ADDRESS_TYPE             CHIP_INET_ERROR(27)
 
 //                        !!!!! IMPORTANT !!!!!
 //
@@ -366,13 +236,29 @@
  *  @}
  */
 
+// !!!!! IMPORTANT !!!!!
+// These definitions are present temporarily in order to reduce breakage for PRs in flight.
+// TODO: remove compatibility definitions
+#define INET_ERROR                              CHIP_ERROR
+#define INET_NO_ERROR                           CHIP_NO_ERROR
+#define INET_ERROR_BAD_ARGS                     CHIP_ERROR_INVALID_ARGUMENT
+#define INET_ERROR_INBOUND_MESSAGE_TOO_BIG      CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG
+#define INET_ERROR_INCORRECT_STATE              CHIP_ERROR_INCORRECT_STATE
+#define INET_ERROR_MESSAGE_TOO_LONG             CHIP_ERROR_MESSAGE_TOO_LONG
+#define INET_ERROR_NO_CONNECTION_HANDLER        CHIP_ERROR_NO_CONNECTION_HANDLER
+#define INET_ERROR_NO_ENDPOINTS                 CHIP_ERROR_ENDPOINT_POOL_FULL
+#define INET_ERROR_NOT_IMPLEMENTED              CHIP_ERROR_NOT_IMPLEMENTED
+#define INET_ERROR_NOT_SUPPORTED                CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
+#define INET_ERROR_NO_MEMORY                    CHIP_ERROR_NO_MEMORY
+#define INET_ERROR_CONNECTION_ABORTED           CHIP_ERROR_CONNECTION_ABORTED
+
 // clang-format on
 
 namespace chip {
 namespace Inet {
 
 extern void RegisterLayerErrorFormatter();
-extern bool FormatLayerError(char * buf, uint16_t bufSize, int32_t err);
+extern bool FormatLayerError(char * buf, uint16_t bufSize, CHIP_ERROR err);
 
 } // namespace Inet
 } // namespace chip
diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp
index ffa1d11..acf962c 100644
--- a/src/inet/InetInterface.cpp
+++ b/src/inet/InetInterface.cpp
@@ -76,8 +76,8 @@
  * @param[in]   nameBuf     region of memory to write the interface name
  * @param[in]   nameBufSize size of the region denoted by \c nameBuf
  *
- * @retval  INET_NO_ERROR           successful result, interface name written
- * @retval  INET_ERROR_NO_MEMORY    name is too large to be written in buffer
+ * @retval  CHIP_NO_ERROR           successful result, interface name written
+ * @retval  CHIP_ERROR_NO_MEMORY    name is too large to be written in buffer
  * @retval  other                   another system or platform error
  *
  * @details
@@ -85,15 +85,15 @@
  *     at \c nameBuf. The name of the unspecified network interface is the empty
  *     string.
  */
-DLL_EXPORT INET_ERROR GetInterfaceName(InterfaceId intfId, char * nameBuf, size_t nameBufSize)
+DLL_EXPORT CHIP_ERROR GetInterfaceName(InterfaceId intfId, char * nameBuf, size_t nameBufSize)
 {
     if (intfId != INET_NULL_INTERFACEID)
     {
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
         int status = snprintf(nameBuf, nameBufSize, "%c%c%d", intfId->name[0], intfId->name[1], intfId->num);
         if (status >= static_cast<int>(nameBufSize))
-            return INET_ERROR_NO_MEMORY;
-        return INET_NO_ERROR;
+            return CHIP_ERROR_NO_MEMORY;
+        return CHIP_NO_ERROR;
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
@@ -101,29 +101,29 @@
         if (if_indextoname(intfId, intfName) == nullptr)
             return chip::System::MapErrorPOSIX(errno);
         if (strlen(intfName) >= nameBufSize)
-            return INET_ERROR_NO_MEMORY;
+            return CHIP_ERROR_NO_MEMORY;
         strcpy(nameBuf, intfName);
-        return INET_NO_ERROR;
+        return CHIP_NO_ERROR;
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
 
 #if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
         net_if * currentInterface = net_if_get_by_index(intfId);
         if (!currentInterface)
-            return INET_ERROR_INCORRECT_STATE;
+            return CHIP_ERROR_INCORRECT_STATE;
         const char * name = net_if_get_device(currentInterface)->name;
         if (strlen(name) >= nameBufSize)
-            return INET_ERROR_NO_MEMORY;
+            return CHIP_ERROR_NO_MEMORY;
         strcpy(nameBuf, name);
-        return INET_NO_ERROR;
+        return CHIP_NO_ERROR;
 
 #endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
     }
 
     if (nameBufSize < 1)
-        return INET_ERROR_NO_MEMORY;
+        return CHIP_ERROR_NO_MEMORY;
 
     nameBuf[0] = 0;
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -132,7 +132,7 @@
  * @param[in]   intfName    name of the network interface to find
  * @param[out]  intfId      indicator of the network interface to assign
  *
- * @retval  INET_NO_ERROR                 success, network interface indicated
+ * @retval  CHIP_NO_ERROR                 success, network interface indicated
  * @retval  INET_ERROR_UNKNOWN_INTERFACE  no network interface found
  * @retval  other                   another system or platform error
  *
@@ -140,10 +140,10 @@
  *     On LwIP, this function must be called with the LwIP stack lock acquired.
  *
  *     The \c intfId parameter is not updated unless the value returned is
- *     \c INET_NO_ERROR. It should be initialized with \c INET_NULL_INTERFACEID
+ *     \c CHIP_NO_ERROR. It should be initialized with \c INET_NULL_INTERFACEID
  *     before calling this function.
  */
-DLL_EXPORT INET_ERROR InterfaceNameToId(const char * intfName, InterfaceId & intfId)
+DLL_EXPORT CHIP_ERROR InterfaceNameToId(const char * intfName, InterfaceId & intfId)
 {
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     if (strlen(intfName) < 3)
@@ -162,7 +162,7 @@
         if (intf->name[0] == intfName[0] && intf->name[1] == intfName[1] && intf->num == (uint8_t) intfNum)
         {
             intfId = intf;
-            return INET_NO_ERROR;
+            return CHIP_NO_ERROR;
         }
     }
     intfId = INET_NULL_INTERFACEID;
@@ -173,7 +173,7 @@
     intfId = if_nametoindex(intfName);
     if (intfId == 0)
         return (errno == ENXIO) ? INET_ERROR_UNKNOWN_INTERFACE : chip::System::MapErrorPOSIX(errno);
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
 
 #if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
@@ -185,7 +185,7 @@
         if (strcmp(net_if_get_device(currentInterface)->name, intfName) == 0)
         {
             intfId = currentId;
-            return INET_NO_ERROR;
+            return CHIP_NO_ERROR;
         }
     }
     return INET_ERROR_UNKNOWN_INTERFACE;
@@ -560,25 +560,25 @@
  * @param[in]   nameBuf     region of memory to write the interface name
  * @param[in]   nameBufSize size of the region denoted by \c nameBuf
  *
- * @retval  INET_NO_ERROR           successful result, interface name written
- * @retval  INET_ERROR_INCORRECT_STATE
+ * @retval  CHIP_NO_ERROR           successful result, interface name written
+ * @retval  CHIP_ERROR_INCORRECT_STATE
  *                                  iterator is positioned beyond the end of
  *                                  the list
- * @retval  INET_ERROR_NO_MEMORY    name is too large to be written in buffer
+ * @retval  CHIP_ERROR_NO_MEMORY    name is too large to be written in buffer
  * @retval  other                   another system or platform error
  *
  * @details
  *     Writes the name of the network interface as \c NUL terminated text string
  *     at \c nameBuf.
  */
-INET_ERROR InterfaceIterator::GetInterfaceName(char * nameBuf, size_t nameBufSize)
+CHIP_ERROR InterfaceIterator::GetInterfaceName(char * nameBuf, size_t nameBufSize)
 {
-    VerifyOrReturnError(HasCurrent(), INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(HasCurrent(), CHIP_ERROR_INCORRECT_STATE);
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
-    VerifyOrReturnError(strlen(mIntfArray[mCurIntf].if_name) < nameBufSize, INET_ERROR_NO_MEMORY);
+    VerifyOrReturnError(strlen(mIntfArray[mCurIntf].if_name) < nameBufSize, CHIP_ERROR_NO_MEMORY);
     strncpy(nameBuf, mIntfArray[mCurIntf].if_name, nameBufSize);
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
 
 #if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
@@ -589,7 +589,7 @@
     return ::chip::Inet::GetInterfaceName(mCurNetif, nameBuf, nameBufSize);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
-    return INET_ERROR_NOT_IMPLEMENTED;
+    return CHIP_ERROR_NOT_IMPLEMENTED;
 }
 
 /**
@@ -987,7 +987,7 @@
 }
 
 /**
- * @fn      INET_ERROR InterfaceAddressIterator::GetInterfaceName(char * nameBuf, size_t nameBufSize)
+ * @fn      CHIP_ERROR InterfaceAddressIterator::GetInterfaceName(char * nameBuf, size_t nameBufSize)
  *
  * @brief   Get the name of the network interface associated with the
  *          current interface address.
@@ -995,9 +995,9 @@
  * @param[in]   nameBuf     region of memory to write the interface name
  * @param[in]   nameBufSize size of the region denoted by \c nameBuf
  *
- * @retval  INET_NO_ERROR           successful result, interface name written
- * @retval  INET_ERROR_NO_MEMORY    name is too large to be written in buffer
- * @retval  INET_ERROR_INCORRECT_STATE
+ * @retval  CHIP_NO_ERROR           successful result, interface name written
+ * @retval  CHIP_ERROR_NO_MEMORY    name is too large to be written in buffer
+ * @retval  CHIP_ERROR_INCORRECT_STATE
  *                                  the iterator is not currently positioned on an
  *                                  interface address
  * @retval  other                   another system or platform error
@@ -1006,21 +1006,21 @@
  *     Writes the name of the network interface as \c NUL terminated text string
  *     at \c nameBuf.
  */
-INET_ERROR InterfaceAddressIterator::GetInterfaceName(char * nameBuf, size_t nameBufSize)
+CHIP_ERROR InterfaceAddressIterator::GetInterfaceName(char * nameBuf, size_t nameBufSize)
 {
-    VerifyOrReturnError(HasCurrent(), INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(HasCurrent(), CHIP_ERROR_INCORRECT_STATE);
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
-    VerifyOrReturnError(strlen(mCurAddr->ifa_name) < nameBufSize, INET_ERROR_NO_MEMORY);
+    VerifyOrReturnError(strlen(mCurAddr->ifa_name) < nameBufSize, CHIP_ERROR_NO_MEMORY);
     strncpy(nameBuf, mCurAddr->ifa_name, nameBufSize);
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
     return mIntfIter.GetInterfaceName(nameBuf, nameBufSize);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
 
-    return INET_ERROR_NOT_IMPLEMENTED;
+    return CHIP_ERROR_NOT_IMPLEMENTED;
 }
 
 /**
diff --git a/src/inet/InetInterface.h b/src/inet/InetInterface.h
index 6939049..acae87d 100644
--- a/src/inet/InetInterface.h
+++ b/src/inet/InetInterface.h
@@ -114,8 +114,8 @@
  */
 #define IsInterfaceIdPresent(intfId) ((intfId) != INET_NULL_INTERFACEID)
 
-extern INET_ERROR GetInterfaceName(InterfaceId intfId, char * nameBuf, size_t nameBufSize);
-extern INET_ERROR InterfaceNameToId(const char * intfName, InterfaceId & intfId);
+extern CHIP_ERROR GetInterfaceName(InterfaceId intfId, char * nameBuf, size_t nameBufSize);
+extern CHIP_ERROR InterfaceNameToId(const char * intfName, InterfaceId & intfId);
 extern uint8_t NetmaskToPrefixLength(const uint8_t * netmask, uint16_t netmaskLen);
 
 /**
@@ -149,7 +149,7 @@
     bool Next();
     InterfaceId GetInterface();
     InterfaceId GetInterfaceId();
-    INET_ERROR GetInterfaceName(char * nameBuf, size_t nameBufSize);
+    CHIP_ERROR GetInterfaceName(char * nameBuf, size_t nameBufSize);
     bool IsUp();
     bool SupportsMulticast();
     bool HasBroadcastAddress();
@@ -223,7 +223,7 @@
     void GetAddressWithPrefix(IPPrefix & addrWithPrefix);
     InterfaceId GetInterface();
     InterfaceId GetInterfaceId();
-    INET_ERROR GetInterfaceName(char * nameBuf, size_t nameBufSize);
+    CHIP_ERROR GetInterfaceName(char * nameBuf, size_t nameBufSize);
     bool IsUp();
     bool SupportsMulticast();
     bool HasBroadcastAddress();
diff --git a/src/inet/InetLayer.cpp b/src/inet/InetLayer.cpp
index 143a73d..43854f5 100644
--- a/src/inet/InetLayer.cpp
+++ b/src/inet/InetLayer.cpp
@@ -127,10 +127,10 @@
 
 #if CHIP_SYSTEM_CONFIG_NO_LOCKING
 
-INET_ERROR InetLayer::InitQueueLimiter(void)
+CHIP_ERROR InetLayer::InitQueueLimiter(void)
 {
     mDroppableEvents = 0;
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 bool InetLayer::CanEnqueueDroppableEvent(void)
@@ -153,7 +153,7 @@
 
 #elif CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING
 
-INET_ERROR InetLayer::InitQueueLimiter(void)
+CHIP_ERROR InetLayer::InitQueueLimiter(void)
 {
     const unsigned portBASE_TYPE maximum = INET_CONFIG_MAX_DROPPABLE_EVENTS;
     const unsigned portBASE_TYPE initial = INET_CONFIG_MAX_DROPPABLE_EVENTS;
@@ -165,9 +165,9 @@
 #endif
 
     if (mDroppableEvents != NULL)
-        return INET_NO_ERROR;
+        return CHIP_NO_ERROR;
     else
-        return INET_ERROR_NO_MEMORY;
+        return CHIP_ERROR_NO_MEMORY;
 }
 
 bool InetLayer::CanEnqueueDroppableEvent(void)
@@ -186,13 +186,13 @@
 
 #else // !CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING
 
-INET_ERROR InetLayer::InitQueueLimiter(void)
+CHIP_ERROR InetLayer::InitQueueLimiter(void)
 {
     if (sem_init(&mDroppableEvents, 0, INET_CONFIG_MAX_DROPPABLE_EVENTS) != 0)
     {
         return chip::System::MapErrorPOSIX(errno);
     }
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 bool InetLayer::CanEnqueueDroppableEvent(void)
@@ -241,24 +241,24 @@
  *                        back to the caller via any platform-specific hook
  *                        functions.
  *
- *  @retval   #INET_ERROR_INCORRECT_STATE        If the InetLayer is in an
+ *  @retval   #CHIP_ERROR_INCORRECT_STATE        If the InetLayer is in an
  *                                               incorrect state.
- *  @retval   #INET_ERROR_NO_MEMORY              If the InetLayer runs out
+ *  @retval   #CHIP_ERROR_NO_MEMORY              If the InetLayer runs out
  *                                               of resource for this
  *                                               request for a new timer.
  *  @retval   other Platform-specific errors indicating the reason for
  *            initialization failure.
- *  @retval   #INET_NO_ERROR                     On success.
+ *  @retval   #CHIP_NO_ERROR                     On success.
  *
  */
-INET_ERROR InetLayer::Init(chip::System::Layer & aSystemLayer, void * aContext)
+CHIP_ERROR InetLayer::Init(chip::System::Layer & aSystemLayer, void * aContext)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     Inet::RegisterLayerErrorFormatter();
 
     if (State != kState_NotInitialized)
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
     // Platform-specific initialization may elect to set this data
     // member. Ensure it is set to a sane default value before
@@ -304,13 +304,13 @@
  *  Platform::InetLayer::DidShutdown hooks to effect clean-up of
  *  platform-specific customizations or data extensions to InetLayer.
  *
- *  @return #INET_NO_ERROR on success; otherwise, a specific error indicating
+ *  @return #CHIP_NO_ERROR on success; otherwise, a specific error indicating
  *          the reason for shutdown failure.
  *
  */
-INET_ERROR InetLayer::Shutdown()
+CHIP_ERROR InetLayer::Shutdown()
 {
-    INET_ERROR err;
+    CHIP_ERROR err;
 
     err = Platform::InetLayer::WillShutdown(this, mContext);
     SuccessOrExit(err);
@@ -434,21 +434,21 @@
  *
  *  @param[out]   llAddr  The link local IPv6 address for the link.
  *
- *  @retval    #INET_ERROR_NOT_IMPLEMENTED      If IPv6 is not supported.
- *  @retval    #INET_ERROR_BAD_ARGS             If the link local address
+ *  @retval    #CHIP_ERROR_NOT_IMPLEMENTED      If IPv6 is not supported.
+ *  @retval    #CHIP_ERROR_INVALID_ARGUMENT     If the link local address
  *                                              is NULL.
  *  @retval    #INET_ERROR_ADDRESS_NOT_FOUND    If the link does not have
  *                                              any address configured.
- *  @retval    #INET_NO_ERROR                   On success.
+ *  @retval    #CHIP_NO_ERROR                   On success.
  *
  */
-INET_ERROR InetLayer::GetLinkLocalAddr(InterfaceId link, IPAddress * llAddr)
+CHIP_ERROR InetLayer::GetLinkLocalAddr(InterfaceId link, IPAddress * llAddr)
 {
-    VerifyOrReturnError(llAddr != nullptr, INET_ERROR_BAD_ARGS);
+    VerifyOrReturnError(llAddr != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 #if !LWIP_IPV6
-    return INET_ERROR_NOT_IMPLEMENTED;
+    return CHIP_ERROR_NOT_IMPLEMENTED;
 #endif //! LWIP_IPV6
 
     for (struct netif * intf = netif_list; intf != NULL; intf = intf->next)
@@ -460,7 +460,7 @@
             if (ip6_addr_isvalid(netif_ip6_addr_state(intf, j)) && ip6_addr_islinklocal(netif_ip6_addr(intf, j)))
             {
                 (*llAddr) = IPAddress::FromIPv6(*netif_ip6_addr(intf, j));
-                return INET_NO_ERROR;
+                return CHIP_NO_ERROR;
             }
         }
         if (link != NULL)
@@ -507,7 +507,7 @@
     *llAddr = IPAddress::FromIPv6(*ip6_addr);
 #endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 #if INET_CONFIG_ENABLE_RAW_ENDPOINT
@@ -526,31 +526,31 @@
  *                                 a return parameter upon completion of the object creation.
  *                                 *retEndPoint is NULL if creation fails.
  *
- *  @retval  #INET_ERROR_INCORRECT_STATE  If the InetLayer object is not initialized.
- *  @retval  #INET_ERROR_NO_ENDPOINTS     If the InetLayer RawEndPoint pool is full and no new
- *                                        endpoints can be created.
- *  @retval  #INET_NO_ERROR               On success.
+ *  @retval  #CHIP_ERROR_INCORRECT_STATE    If the InetLayer object is not initialized.
+ *  @retval  #CHIP_ERROR_ENDPOINT_POOL_FULL If the InetLayer RawEndPoint pool is full and no new
+ *                                          endpoints can be created.
+ *  @retval  #CHIP_NO_ERROR                 On success.
  *
  */
-INET_ERROR InetLayer::NewRawEndPoint(IPVersion ipVer, IPProtocol ipProto, RawEndPoint ** retEndPoint)
+CHIP_ERROR InetLayer::NewRawEndPoint(IPVersion ipVer, IPProtocol ipProto, RawEndPoint ** retEndPoint)
 {
     assertChipStackLockedByCurrentThread();
 
     *retEndPoint = nullptr;
 
-    VerifyOrReturnError(State == kState_Initialized, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(State == kState_Initialized, CHIP_ERROR_INCORRECT_STATE);
 
     *retEndPoint = RawEndPoint::sPool.TryCreate(*mSystemLayer);
     if (*retEndPoint == nullptr)
     {
         ChipLogError(Inet, "%s endpoint pool FULL", "Raw");
-        return INET_ERROR_NO_ENDPOINTS;
+        return CHIP_ERROR_ENDPOINT_POOL_FULL;
     }
 
     (*retEndPoint)->Inet::RawEndPoint::Init(this, ipVer, ipProto);
     SYSTEM_STATS_INCREMENT(chip::System::Stats::kInetLayer_NumRawEps);
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // INET_CONFIG_ENABLE_RAW_ENDPOINT
 
@@ -566,31 +566,31 @@
  *                                 a return parameter upon completion of the object creation.
  *                                 *retEndPoint is NULL if creation fails.
  *
- *  @retval  #INET_ERROR_INCORRECT_STATE  If the InetLayer object is not initialized.
- *  @retval  #INET_ERROR_NO_ENDPOINTS     If the InetLayer TCPEndPoint pool is full and no new
- *                                        endpoints can be created.
- *  @retval  #INET_NO_ERROR               On success.
+ *  @retval  #CHIP_ERROR_INCORRECT_STATE    If the InetLayer object is not initialized.
+ *  @retval  #CHIP_ERROR_ENDPOINT_POOL_FULL If the InetLayer TCPEndPoint pool is full and no new
+ *                                          endpoints can be created.
+ *  @retval  #CHIP_NO_ERROR                 On success.
  *
  */
-INET_ERROR InetLayer::NewTCPEndPoint(TCPEndPoint ** retEndPoint)
+CHIP_ERROR InetLayer::NewTCPEndPoint(TCPEndPoint ** retEndPoint)
 {
     assertChipStackLockedByCurrentThread();
 
     *retEndPoint = nullptr;
 
-    VerifyOrReturnError(State == kState_Initialized, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(State == kState_Initialized, CHIP_ERROR_INCORRECT_STATE);
 
     *retEndPoint = TCPEndPoint::sPool.TryCreate(*mSystemLayer);
     if (*retEndPoint == nullptr)
     {
         ChipLogError(Inet, "%s endpoint pool FULL", "TCP");
-        return INET_ERROR_NO_ENDPOINTS;
+        return CHIP_ERROR_ENDPOINT_POOL_FULL;
     }
 
     (*retEndPoint)->Init(this);
     SYSTEM_STATS_INCREMENT(chip::System::Stats::kInetLayer_NumTCPEps);
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // INET_CONFIG_ENABLE_TCP_ENDPOINT
 
@@ -606,31 +606,31 @@
  *                                 a return parameter upon completion of the object creation.
  *                                 *retEndPoint is NULL if creation fails.
  *
- *  @retval  #INET_ERROR_INCORRECT_STATE  If the InetLayer object is not initialized.
- *  @retval  #INET_ERROR_NO_ENDPOINTS     If the InetLayer UDPEndPoint pool is full and no new
- *                                        endpoints can be created.
- *  @retval  #INET_NO_ERROR               On success.
+ *  @retval  #CHIP_ERROR_INCORRECT_STATE    If the InetLayer object is not initialized.
+ *  @retval  #CHIP_ERROR_ENDPOINT_POOL_FULL If the InetLayer UDPEndPoint pool is full and no new
+ *                                          endpoints can be created.
+ *  @retval  #CHIP_NO_ERROR                 On success.
  *
  */
-INET_ERROR InetLayer::NewUDPEndPoint(UDPEndPoint ** retEndPoint)
+CHIP_ERROR InetLayer::NewUDPEndPoint(UDPEndPoint ** retEndPoint)
 {
     assertChipStackLockedByCurrentThread();
 
     *retEndPoint = nullptr;
 
-    VerifyOrReturnError(State == kState_Initialized, INET_ERROR_INCORRECT_STATE);
+    VerifyOrReturnError(State == kState_Initialized, CHIP_ERROR_INCORRECT_STATE);
 
     *retEndPoint = UDPEndPoint::sPool.TryCreate(*mSystemLayer);
     if (*retEndPoint == nullptr)
     {
         ChipLogError(Inet, "%s endpoint pool FULL", "UDP");
-        return INET_ERROR_NO_ENDPOINTS;
+        return CHIP_ERROR_ENDPOINT_POOL_FULL;
     }
 
     (*retEndPoint)->Init(this);
     SYSTEM_STATS_INCREMENT(chip::System::Stats::kInetLayer_NumUDPEps);
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // INET_CONFIG_ENABLE_UDP_ENDPOINT
 
@@ -656,9 +656,9 @@
  *  @param[in]  appState    A pointer to the application state to be passed to
  *                          onComplete when a DNS request is complete.
  *
- *  @retval #INET_NO_ERROR                   if a DNS request is handled
+ *  @retval #CHIP_NO_ERROR                   if a DNS request is handled
  *                                           successfully.
- *  @retval #INET_ERROR_NO_MEMORY            if the Inet layer resolver pool
+ *  @retval #CHIP_ERROR_NO_MEMORY            if the Inet layer resolver pool
  *                                           is full.
  *  @retval #INET_ERROR_HOST_NAME_TOO_LONG   if a requested host name is too
  *                                           long.
@@ -669,13 +669,13 @@
  *                                           try again later.
  *  @retval #INET_ERROR_DNS_NO_RECOVERY      if a name server returned an
  *                                           unrecoverable error.
- *  @retval #INET_ERROR_NOT_IMPLEMENTED      if DNS resolution is not enabled on
+ *  @retval #CHIP_ERROR_NOT_IMPLEMENTED      if DNS resolution is not enabled on
  *                                           the underlying platform.
  *  @retval other POSIX network or OS error returned by the underlying DNS
  *          resolver implementation.
  *
  */
-INET_ERROR InetLayer::ResolveHostAddress(const char * hostName, uint8_t maxAddrs, IPAddress * addrArray,
+CHIP_ERROR InetLayer::ResolveHostAddress(const char * hostName, uint8_t maxAddrs, IPAddress * addrArray,
                                          DNSResolveCompleteFunct onComplete, void * appState)
 {
     size_t hostNameLength = strlen(hostName);
@@ -705,9 +705,9 @@
  *  @param[in]  appState    A pointer to the application state to be passed to
  *                          onComplete when a DNS request is complete.
  *
- *  @retval #INET_NO_ERROR                   if a DNS request is handled
+ *  @retval #CHIP_NO_ERROR                   if a DNS request is handled
  *                                           successfully.
- *  @retval #INET_ERROR_NO_MEMORY            if the Inet layer resolver pool
+ *  @retval #CHIP_ERROR_NO_MEMORY            if the Inet layer resolver pool
  *                                           is full.
  *  @retval #INET_ERROR_HOST_NAME_TOO_LONG   if a requested host name is too
  *                                           long.
@@ -718,13 +718,13 @@
  *                                           try again later.
  *  @retval #INET_ERROR_DNS_NO_RECOVERY      if a name server returned an
  *                                           unrecoverable error.
- *  @retval #INET_ERROR_NOT_IMPLEMENTED      if DNS resolution is not enabled on
+ *  @retval #CHIP_ERROR_NOT_IMPLEMENTED      if DNS resolution is not enabled on
  *                                           the underlying platform.
  *  @retval other POSIX network or OS error returned by the underlying DNS
  *          resolver implementation.
  *
  */
-INET_ERROR InetLayer::ResolveHostAddress(const char * hostName, uint16_t hostNameLen, uint8_t maxAddrs, IPAddress * addrArray,
+CHIP_ERROR InetLayer::ResolveHostAddress(const char * hostName, uint16_t hostNameLen, uint8_t maxAddrs, IPAddress * addrArray,
                                          DNSResolveCompleteFunct onComplete, void * appState)
 {
     return ResolveHostAddress(hostName, hostNameLen, kDNSOption_Default, maxAddrs, addrArray, onComplete, appState);
@@ -760,9 +760,9 @@
  *  @param[in]  appState    A pointer to the application state to be passed to
  *                          onComplete when a DNS request is complete.
  *
- *  @retval #INET_NO_ERROR                   if a DNS request is handled
+ *  @retval #CHIP_NO_ERROR                   if a DNS request is handled
  *                                           successfully.
- *  @retval #INET_ERROR_NO_MEMORY            if the Inet layer resolver pool
+ *  @retval #CHIP_ERROR_NO_MEMORY            if the Inet layer resolver pool
  *                                           is full.
  *  @retval #INET_ERROR_HOST_NAME_TOO_LONG   if a requested host name is too
  *                                           long.
@@ -773,27 +773,27 @@
  *                                           try again later.
  *  @retval #INET_ERROR_DNS_NO_RECOVERY      if a name server returned an
  *                                           unrecoverable error.
- *  @retval #INET_ERROR_NOT_IMPLEMENTED      if DNS resolution is not enabled on
+ *  @retval #CHIP_ERROR_NOT_IMPLEMENTED      if DNS resolution is not enabled on
  *                                           the underlying platform.
  *  @retval other POSIX network or OS error returned by the underlying DNS
  *          resolver implementation.
  *
  */
-INET_ERROR InetLayer::ResolveHostAddress(const char * hostName, uint16_t hostNameLen, uint8_t options, uint8_t maxAddrs,
+CHIP_ERROR InetLayer::ResolveHostAddress(const char * hostName, uint16_t hostNameLen, uint8_t options, uint8_t maxAddrs,
                                          IPAddress * addrArray, DNSResolveCompleteFunct onComplete, void * appState)
 {
     assertChipStackLockedByCurrentThread();
 
-    INET_ERROR err         = INET_NO_ERROR;
+    CHIP_ERROR err         = CHIP_NO_ERROR;
     DNSResolver * resolver = nullptr;
 
-    VerifyOrExit(State == kState_Initialized, err = INET_ERROR_INCORRECT_STATE);
+    VerifyOrExit(State == kState_Initialized, err = CHIP_ERROR_INCORRECT_STATE);
 
-    INET_FAULT_INJECT(FaultInjection::kFault_DNSResolverNew, return INET_ERROR_NO_MEMORY);
+    INET_FAULT_INJECT(FaultInjection::kFault_DNSResolverNew, return CHIP_ERROR_NO_MEMORY);
 
     // Store context information and set the resolver state.
     VerifyOrExit(hostNameLen <= NL_DNS_HOSTNAME_MAX_LEN, err = INET_ERROR_HOST_NAME_TOO_LONG);
-    VerifyOrExit(maxAddrs > 0, err = INET_ERROR_NO_MEMORY);
+    VerifyOrExit(maxAddrs > 0, err = CHIP_ERROR_NO_MEMORY);
 
     resolver = DNSResolver::sPool.TryCreate(*mSystemLayer);
     if (resolver != nullptr)
@@ -803,7 +803,7 @@
     else
     {
         ChipLogError(Inet, "%s resolver pool FULL", "DNS");
-        ExitNow(err = INET_ERROR_NO_MEMORY);
+        ExitNow(err = CHIP_ERROR_NO_MEMORY);
     }
 
     // Short-circuit full address resolution if the supplied host name is a text-form
@@ -824,13 +824,13 @@
 
         if (onComplete)
         {
-            onComplete(appState, err, (err == INET_NO_ERROR) ? 1 : 0, addrArray);
+            onComplete(appState, err, (err == CHIP_NO_ERROR) ? 1 : 0, addrArray);
         }
 
         resolver->Release();
         resolver = nullptr;
 
-        ExitNow(err = INET_NO_ERROR);
+        ExitNow(err = CHIP_NO_ERROR);
     }
 
     // After this point, the resolver will be released by:
@@ -930,10 +930,10 @@
  *
  *  @param[out]   intfId    A reference to the InterfaceId object.
  *
- *  @return  #INET_NO_ERROR unconditionally.
+ *  @return  #CHIP_NO_ERROR unconditionally.
  *
  */
-INET_ERROR InetLayer::GetInterfaceFromAddr(const IPAddress & addr, InterfaceId & intfId)
+CHIP_ERROR InetLayer::GetInterfaceFromAddr(const IPAddress & addr, InterfaceId & intfId)
 {
     InterfaceAddressIterator addrIter;
 
@@ -943,13 +943,13 @@
         if (addr == curAddr)
         {
             intfId = addrIter.GetInterface();
-            return INET_NO_ERROR;
+            return CHIP_NO_ERROR;
         }
     }
 
     intfId = INET_NULL_INTERFACEID;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -986,7 +986,7 @@
 }
 
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT && INET_TCP_IDLE_CHECK_INTERVAL > 0
-void InetLayer::HandleTCPInactivityTimer(chip::System::Layer * aSystemLayer, void * aAppState, chip::System::Error aError)
+void InetLayer::HandleTCPInactivityTimer(chip::System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError)
 {
     InetLayer & lInetLayer = *reinterpret_cast<InetLayer *>(aAppState);
     bool lTimerRequired    = lInetLayer.IsIdleTimerRunning();
@@ -1022,19 +1022,18 @@
 #endif // INET_CONFIG_ENABLE_TCP_ENDPOINT && INET_TCP_IDLE_CHECK_INTERVAL > 0
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
-chip::System::Error InetLayer::HandleInetLayerEvent(chip::System::Object & aTarget, chip::System::EventType aEventType,
-                                                    uintptr_t aArgument)
+CHIP_ERROR InetLayer::HandleInetLayerEvent(chip::System::Object & aTarget, chip::System::EventType aEventType, uintptr_t aArgument)
 {
     assertChipStackLockedByCurrentThread();
 
-    VerifyOrReturnError(INET_IsInetEvent(aEventType), CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT);
+    VerifyOrReturnError(INET_IsInetEvent(aEventType), CHIP_ERROR_UNEXPECTED_EVENT);
 
     // Dispatch the event according to its type.
     switch (aEventType)
     {
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT
     case kInetEvent_TCPConnectComplete:
-        static_cast<TCPEndPoint &>(aTarget).HandleConnectComplete(static_cast<INET_ERROR>(aArgument));
+        static_cast<TCPEndPoint &>(aTarget).HandleConnectComplete(static_cast<CHIP_ERROR>(aArgument));
         break;
 
     case kInetEvent_TCPConnectionReceived:
@@ -1051,7 +1050,7 @@
         break;
 
     case kInetEvent_TCPError:
-        static_cast<TCPEndPoint &>(aTarget).HandleError(static_cast<INET_ERROR>(aArgument));
+        static_cast<TCPEndPoint &>(aTarget).HandleError(static_cast<CHIP_ERROR>(aArgument));
         break;
 #endif // INET_CONFIG_ENABLE_TCP_ENDPOINT
 
@@ -1076,7 +1075,7 @@
 #endif // INET_CONFIG_ENABLE_DNS_RESOLVER
 
     default:
-        return CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT;
+        return CHIP_ERROR_UNEXPECTED_EVENT;
     }
 
     // If the event was droppable, record the fact that it has been dequeued.
@@ -1088,7 +1087,7 @@
         lInetLayer.DroppableEventDequeued();
     }
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
@@ -1125,17 +1124,17 @@
  * @param[in,out] aContext  Platform-specific context data passed to
  *                          the layer initialization method, \::Init.
  *
- * @return #INET_NO_ERROR on success; otherwise, a specific error indicating
+ * @return #CHIP_NO_ERROR on success; otherwise, a specific error indicating
  *         the reason for initialization failure. Returning non-successful
  *         status will abort initialization.
  *
  */
-DLL_EXPORT INET_ERROR WillInit(Inet::InetLayer * aLayer, void * aContext)
+DLL_EXPORT CHIP_ERROR WillInit(Inet::InetLayer * aLayer, void * aContext)
 {
     (void) aLayer;
     (void) aContext;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -1153,7 +1152,7 @@
  *                          InetLayer \::Init method.
  *
  */
-DLL_EXPORT void DidInit(Inet::InetLayer * aLayer, void * aContext, INET_ERROR anError)
+DLL_EXPORT void DidInit(Inet::InetLayer * aLayer, void * aContext, CHIP_ERROR anError)
 {
     (void) aLayer;
     (void) aContext;
@@ -1171,17 +1170,17 @@
  * @param[in,out] aContext  Platform-specific context data passed to
  *                          the layer initialization method, \::Init.
  *
- * @return #INET_NO_ERROR on success; otherwise, a specific error indicating
+ * @return #CHIP_NO_ERROR on success; otherwise, a specific error indicating
  *         the reason for shutdown failure. Returning non-successful
  *         status will abort shutdown.
  *
  */
-DLL_EXPORT INET_ERROR WillShutdown(Inet::InetLayer * aLayer, void * aContext)
+DLL_EXPORT CHIP_ERROR WillShutdown(Inet::InetLayer * aLayer, void * aContext)
 {
     (void) aLayer;
     (void) aContext;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -1199,7 +1198,7 @@
  *                          InetLayer \::Shutdown method.
  *
  */
-DLL_EXPORT void DidShutdown(Inet::InetLayer * aLayer, void * aContext, INET_ERROR anError)
+DLL_EXPORT void DidShutdown(Inet::InetLayer * aLayer, void * aContext, CHIP_ERROR anError)
 {
     (void) aLayer;
     (void) aContext;
diff --git a/src/inet/InetLayer.h b/src/inet/InetLayer.h
index 5762f44..18f61ef 100644
--- a/src/inet/InetLayer.h
+++ b/src/inet/InetLayer.h
@@ -116,11 +116,11 @@
 namespace Platform {
 namespace InetLayer {
 
-extern INET_ERROR WillInit(Inet::InetLayer * aLayer, void * aContext);
-extern void DidInit(Inet::InetLayer * aLayer, void * aContext, INET_ERROR anError);
+extern CHIP_ERROR WillInit(Inet::InetLayer * aLayer, void * aContext);
+extern void DidInit(Inet::InetLayer * aLayer, void * aContext, CHIP_ERROR anError);
 
-extern INET_ERROR WillShutdown(Inet::InetLayer * aLayer, void * aContext);
-extern void DidShutdown(Inet::InetLayer * aLayer, void * aContext, INET_ERROR anError);
+extern CHIP_ERROR WillShutdown(Inet::InetLayer * aLayer, void * aContext);
+extern void DidShutdown(Inet::InetLayer * aLayer, void * aContext, CHIP_ERROR anError);
 
 } // namespace InetLayer
 } // namespace Platform
@@ -180,25 +180,25 @@
 
     InetLayer();
 
-    INET_ERROR Init(chip::System::Layer & aSystemLayer, void * aContext);
+    CHIP_ERROR Init(chip::System::Layer & aSystemLayer, void * aContext);
 
     // Must be called before System::Layer::Shutdown(), since this holds a pointer to that.
-    INET_ERROR Shutdown();
+    CHIP_ERROR Shutdown();
 
     chip::System::Layer * SystemLayer() const;
 
     // End Points
 
 #if INET_CONFIG_ENABLE_RAW_ENDPOINT
-    INET_ERROR NewRawEndPoint(IPVersion ipVer, IPProtocol ipProto, RawEndPoint ** retEndPoint);
+    CHIP_ERROR NewRawEndPoint(IPVersion ipVer, IPProtocol ipProto, RawEndPoint ** retEndPoint);
 #endif // INET_CONFIG_ENABLE_RAW_ENDPOINT
 
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT
-    INET_ERROR NewTCPEndPoint(TCPEndPoint ** retEndPoint);
+    CHIP_ERROR NewTCPEndPoint(TCPEndPoint ** retEndPoint);
 #endif // INET_CONFIG_ENABLE_TCP_ENDPOINT
 
 #if INET_CONFIG_ENABLE_UDP_ENDPOINT
-    INET_ERROR NewUDPEndPoint(UDPEndPoint ** retEndPoint);
+    CHIP_ERROR NewUDPEndPoint(UDPEndPoint ** retEndPoint);
 #endif // INET_CONFIG_ENABLE_UDP_ENDPOINT
 
     // DNS Resolution
@@ -207,19 +207,19 @@
 
     typedef DNSResolver::OnResolveCompleteFunct DNSResolveCompleteFunct;
 
-    INET_ERROR ResolveHostAddress(const char * hostName, uint16_t hostNameLen, uint8_t options, uint8_t maxAddrs,
+    CHIP_ERROR ResolveHostAddress(const char * hostName, uint16_t hostNameLen, uint8_t options, uint8_t maxAddrs,
                                   IPAddress * addrArray, DNSResolveCompleteFunct onComplete, void * appState);
-    INET_ERROR ResolveHostAddress(const char * hostName, uint16_t hostNameLen, uint8_t maxAddrs, IPAddress * addrArray,
+    CHIP_ERROR ResolveHostAddress(const char * hostName, uint16_t hostNameLen, uint8_t maxAddrs, IPAddress * addrArray,
                                   DNSResolveCompleteFunct onComplete, void * appState);
-    INET_ERROR ResolveHostAddress(const char * hostName, uint8_t maxAddrs, IPAddress * addrArray,
+    CHIP_ERROR ResolveHostAddress(const char * hostName, uint8_t maxAddrs, IPAddress * addrArray,
                                   DNSResolveCompleteFunct onComplete, void * appState);
     void CancelResolveHostAddress(DNSResolveCompleteFunct onComplete, void * appState);
 
 #endif // INET_CONFIG_ENABLE_DNS_RESOLVER
 
-    INET_ERROR GetInterfaceFromAddr(const IPAddress & addr, InterfaceId & intfId);
+    CHIP_ERROR GetInterfaceFromAddr(const IPAddress & addr, InterfaceId & intfId);
 
-    INET_ERROR GetLinkLocalAddr(InterfaceId link, IPAddress * llAddr);
+    CHIP_ERROR GetLinkLocalAddr(InterfaceId link, IPAddress * llAddr);
     bool MatchLocalIPv6Subnet(const IPAddress & addr);
 
     static void UpdateSnapshot(chip::System::Stats::Snapshot & aSnapshot);
@@ -228,8 +228,7 @@
     void SetPlatformData(void * aPlatformData);
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
-    static chip::System::Error HandleInetLayerEvent(chip::System::Object & aTarget, chip::System::EventType aEventType,
-                                                    uintptr_t aArgument);
+    static CHIP_ERROR HandleInetLayerEvent(chip::System::Object & aTarget, chip::System::EventType aEventType, uintptr_t aArgument);
 
     static chip::System::LwIPEventHandlerDelegate sInetEventHandlerDelegate;
 
@@ -260,7 +259,7 @@
             false;
     }
 
-    INET_ERROR InitQueueLimiter(void);
+    CHIP_ERROR InitQueueLimiter(void);
     bool CanEnqueueDroppableEvent(void);
     void DroppableEventDequeued(void);
 
@@ -279,14 +278,14 @@
 
     inline static bool IsDroppableEvent(chip::System::EventType aType) { return false; }
 
-    inline INET_ERROR InitQueueLimiter(void) { return INET_NO_ERROR; }
+    inline CHIP_ERROR InitQueueLimiter(void) { return CHIP_NO_ERROR; }
     inline bool CanEnqueueDroppableEvent(void) { return true; }
     inline void DroppableEventDequeued(void) { return; }
 #endif // !INET_CONFIG_MAX_DROPPABLE_EVENTS
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT && INET_TCP_IDLE_CHECK_INTERVAL > 0
-    static void HandleTCPInactivityTimer(chip::System::Layer * aSystemLayer, void * aAppState, chip::System::Error aError);
+    static void HandleTCPInactivityTimer(chip::System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError);
 #endif // INET_CONFIG_ENABLE_TCP_ENDPOINT && INET_TCP_IDLE_CHECK_INTERVAL > 0
 
 private:
@@ -301,11 +300,11 @@
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    friend INET_ERROR Platform::InetLayer::WillInit(Inet::InetLayer * aLayer, void * aContext);
-    friend void Platform::InetLayer::DidInit(Inet::InetLayer * aLayer, void * aContext, INET_ERROR anError);
+    friend CHIP_ERROR Platform::InetLayer::WillInit(Inet::InetLayer * aLayer, void * aContext);
+    friend void Platform::InetLayer::DidInit(Inet::InetLayer * aLayer, void * aContext, CHIP_ERROR anError);
 
-    friend INET_ERROR Platform::InetLayer::WillShutdown(Inet::InetLayer * aLayer, void * aContext);
-    friend void Platform::InetLayer::DidShutdown(Inet::InetLayer * aLayer, void * aContext, INET_ERROR anError);
+    friend CHIP_ERROR Platform::InetLayer::WillShutdown(Inet::InetLayer * aLayer, void * aContext);
+    friend void Platform::InetLayer::DidShutdown(Inet::InetLayer * aLayer, void * aContext, CHIP_ERROR anError);
 
     bool IsIdleTimerRunning();
 };
@@ -337,10 +336,10 @@
     void Clear();
 };
 
-extern INET_ERROR ParseHostAndPort(const char * aString, uint16_t aStringLen, const char *& aHost, uint16_t & aHostLen,
+extern CHIP_ERROR ParseHostAndPort(const char * aString, uint16_t aStringLen, const char *& aHost, uint16_t & aHostLen,
                                    uint16_t & aPort);
 
-extern INET_ERROR ParseHostPortAndInterface(const char * aString, uint16_t aStringLen, const char *& aHost, uint16_t & aHostLen,
+extern CHIP_ERROR ParseHostPortAndInterface(const char * aString, uint16_t aStringLen, const char *& aHost, uint16_t & aHostLen,
                                             uint16_t & aPort, const char *& aInterface, uint16_t & aInterfaceLen);
 
 } // namespace Inet
diff --git a/src/inet/InetUtils.cpp b/src/inet/InetUtils.cpp
index 02d7468..2de7c53 100644
--- a/src/inet/InetUtils.cpp
+++ b/src/inet/InetUtils.cpp
@@ -63,10 +63,10 @@
  *                                           malformed.
  *  @return  #INET_ERROR_HOST_NAME_TOO_LONG  If the host name exceeds 253
  *                                           characters.
- *  @return  #INET_NO_ERROR                  On success.
+ *  @return  #CHIP_NO_ERROR                  On success.
  *
  */
-DLL_EXPORT INET_ERROR ParseHostAndPort(const char * aString, uint16_t aStringLen, const char *& aHost, uint16_t & aHostLen,
+DLL_EXPORT CHIP_ERROR ParseHostAndPort(const char * aString, uint16_t aStringLen, const char *& aHost, uint16_t & aHostLen,
                                        uint16_t & aPort)
 {
     const char * end = aString + aStringLen;
@@ -149,7 +149,7 @@
     else
         aPort = 0;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -193,10 +193,10 @@
  *                                           malformed.
  *  @return  #INET_ERROR_HOST_NAME_TOO_LONG  If the host name exceeds 253
  *                                           characters.
- *  @return  #INET_NO_ERROR                  On success.
+ *  @return  #CHIP_NO_ERROR                  On success.
  *
  */
-DLL_EXPORT INET_ERROR ParseHostPortAndInterface(const char * aString, uint16_t aStringLen, const char *& aHost, uint16_t & aHostLen,
+DLL_EXPORT CHIP_ERROR ParseHostPortAndInterface(const char * aString, uint16_t aStringLen, const char *& aHost, uint16_t & aHostLen,
                                                 uint16_t & aPort, const char *& aInterface, uint16_t & aInterfaceLen)
 {
     const char * end = aString + aStringLen;
diff --git a/src/inet/RawEndPoint.cpp b/src/inet/RawEndPoint.cpp
index bb62415..16d461d 100644
--- a/src/inet/RawEndPoint.cpp
+++ b/src/inet/RawEndPoint.cpp
@@ -86,9 +86,9 @@
  *   udp_bind_netif(aUDP, intfId);
  *
  */
-static INET_ERROR LwIPBindInterface(struct raw_pcb * aRaw, InterfaceId intfId)
+static CHIP_ERROR LwIPBindInterface(struct raw_pcb * aRaw, InterfaceId intfId)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
 #if HAVE_LWIP_RAW_BIND_NETIF
     if (!IsInterfaceIdPresent(intfId))
@@ -127,9 +127,9 @@
  * @param[in]   addr        the IP address (must be an interface address)
  * @param[in]   intfId      an optional network interface indicator
  *
- * @retval  INET_NO_ERROR               success: endpoint bound to address
- * @retval  INET_ERROR_INCORRECT_STATE  endpoint has been bound previously
- * @retval  INET_NO_MEMORY              insufficient memory for endpoint
+ * @retval  CHIP_NO_ERROR               success: endpoint bound to address
+ * @retval  CHIP_ERROR_INCORRECT_STATE  endpoint has been bound previously
+ * @retval  CHIP_ERROR_NO_MEMORY        insufficient memory for endpoint
  *
  * @retval  INET_ERROR_UNKNOWN_INTERFACE
  *      On some platforms, the optionally specified interface is not
@@ -150,11 +150,11 @@
  *  On LwIP, this method must not be called with the LwIP stack lock
  *  already acquired.
  */
-INET_ERROR RawEndPoint::Bind(IPAddressType addrType, const IPAddress & addr, InterfaceId intfId)
+CHIP_ERROR RawEndPoint::Bind(IPAddressType addrType, const IPAddress & addr, InterfaceId intfId)
 {
     if (mState != kState_Ready && mState != kState_Bound)
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
     if ((addr != IPAddress::Any) && (addr.Type() != kIPAddressType_Any) && (addr.Type() != addrType))
@@ -168,10 +168,10 @@
     LOCK_TCPIP_CORE();
 
     // Make sure we have the appropriate type of PCB.
-    INET_ERROR res = GetPCB(addrType);
+    CHIP_ERROR res = GetPCB(addrType);
 
     // Bind the PCB to the specified address.
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
 #if LWIP_VERSION_MAJOR > 1 || LWIP_VERSION_MINOR >= 5
         ip_addr_t ipAddr = addr.ToLwIPAddr();
@@ -198,7 +198,7 @@
 #endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR >= 5
     }
 
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
         res = LwIPBindInterface(mRaw, intfId);
     }
@@ -222,7 +222,7 @@
         unsigned long fd = static_cast<unsigned long>(mSocket.GetFD());
 
         mReadableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, dispatchQueue);
-        ReturnErrorCodeIf(mReadableSource == nullptr, INET_ERROR_NO_MEMORY);
+        ReturnErrorCodeIf(mReadableSource == nullptr, CHIP_ERROR_NO_MEMORY);
 
         dispatch_source_set_event_handler(mReadableSource, ^{
             this->mSocket.SetPendingIO(System::SocketEventFlags::kRead);
@@ -238,7 +238,7 @@
 
     mState = kState_Bound;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -249,9 +249,9 @@
  * @param[in]   intfId  An InterfaceId to identify the scope of the address.
  * @param[in]   addr    An IPv6 link-local scope IPAddress object.
  *
- * @retval  INET_NO_ERROR               success: endpoint bound to address
- * @retval  INET_ERROR_INCORRECT_STATE  endpoint has been bound previously
- * @retval  INET_NO_MEMORY              insufficient memory for endpoint
+ * @retval  CHIP_NO_ERROR               success: endpoint bound to address
+ * @retval  CHIP_ERROR_INCORRECT_STATE  endpoint has been bound previously
+ * @retval  CHIP_ERROR_NO_MEMORY        insufficient memory for endpoint
  *
  * @retval  INET_ERROR_WRONG_PROTOCOL_TYPE
  *      \c addrType does not match \c IPVer.
@@ -269,9 +269,9 @@
  *  On LwIP, this method must not be called with the LwIP stack lock
  *  already acquired.
  */
-INET_ERROR RawEndPoint::BindIPv6LinkLocal(InterfaceId intfId, const IPAddress & addr)
+CHIP_ERROR RawEndPoint::BindIPv6LinkLocal(InterfaceId intfId, const IPAddress & addr)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
     const int lIfIndex = static_cast<int>(intfId);
@@ -279,7 +279,7 @@
 
     if (mState != kState_Ready && mState != kState_Bound)
     {
-        res = INET_ERROR_INCORRECT_STATE;
+        res = CHIP_ERROR_INCORRECT_STATE;
         goto ret;
     }
 
@@ -298,7 +298,7 @@
     res = GetPCB(addr.Type());
 
     // Bind the PCB to the specified address.
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
 #if LWIP_VERSION_MAJOR > 1
         ip_addr_t ipAddr = addr.ToLwIPAddr();
@@ -308,7 +308,7 @@
         res                 = chip::System::MapErrorLwIP(raw_bind_ip6(mRaw, &ipv6Addr));
 #endif // LWIP_VERSION_MAJOR <= 1
 
-        if (res != INET_NO_ERROR)
+        if (res != CHIP_NO_ERROR)
         {
             raw_remove(mRaw);
             mRaw              = NULL;
@@ -327,7 +327,7 @@
 
     // Make sure we have the appropriate type of socket.
     res = GetSocket(kIPAddressType_IPv6);
-    if (res != INET_NO_ERROR)
+    if (res != CHIP_NO_ERROR)
     {
         goto ret;
     }
@@ -358,7 +358,7 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
 ret:
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
         mState = kState_Bound;
     }
@@ -373,7 +373,7 @@
  * @param[in]  onReceiveError      The endpoint's receive error event handling function delegate.
  * @param[in]  appState            Application state pointer.
  *
- * @retval  INET_NO_ERROR   always returned.
+ * @retval  CHIP_NO_ERROR   always returned.
  *
  * @details
  *  If \c mState is already \c kState_Listening, then no operation is
@@ -384,17 +384,17 @@
  *  On LwIP, this method must not be called with the LwIP stack lock
  *  already acquired
  */
-INET_ERROR RawEndPoint::Listen(IPEndPointBasis::OnMessageReceivedFunct onMessageReceived,
+CHIP_ERROR RawEndPoint::Listen(IPEndPointBasis::OnMessageReceivedFunct onMessageReceived,
                                IPEndPointBasis::OnReceiveErrorFunct onReceiveError, void * appState)
 {
     if (mState == kState_Listening)
     {
-        return INET_NO_ERROR;
+        return CHIP_NO_ERROR;
     }
 
     if (mState != kState_Bound)
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
     OnMessageReceived = onMessageReceived;
@@ -428,7 +428,7 @@
     mSocket.RequestCallbackOnPendingRead();
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -513,7 +513,7 @@
  *  A synonym for <tt>SendTo(addr, INET_NULL_INTERFACEID, msg,
  *  sendFlags)</tt>.
  */
-INET_ERROR RawEndPoint::SendTo(const IPAddress & addr, chip::System::PacketBufferHandle && msg, uint16_t sendFlags)
+CHIP_ERROR RawEndPoint::SendTo(const IPAddress & addr, chip::System::PacketBufferHandle && msg, uint16_t sendFlags)
 {
     return SendTo(addr, INET_NULL_INTERFACEID, std::move(msg), sendFlags);
 }
@@ -526,20 +526,20 @@
  * @param[in]   msg         the packet buffer containing the UDP message
  * @param[in]   sendFlags   optional transmit option flags
  *
- * @retval  INET_NO_ERROR
+ * @retval  CHIP_NO_ERROR
  *      success: \c msg is queued for transmit.
  *
- * @retval  INET_ERROR_NOT_SUPPORTED
+ * @retval  CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *      the system does not support the requested operation.
  *
  * @retval  INET_ERROR_WRONG_ADDRESS_TYPE
  *      the destination address and the bound interface address do not
  *      have matching protocol versions or address type.
  *
- * @retval  INET_ERROR_MESSAGE_TOO_LONG
+ * @retval  CHIP_ERROR_MESSAGE_TOO_LONG
  *      \c msg does not contain the whole ICMP message.
  *
- * @retval  INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED
+ * @retval  CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG
  *      On some platforms, only a truncated portion of \c msg was queued
  *      for transmit.
  *
@@ -548,7 +548,7 @@
  * @details
  *      Send the ICMP message in \c msg to the destination given in \c addr.
  */
-INET_ERROR RawEndPoint::SendTo(const IPAddress & addr, InterfaceId intfId, chip::System::PacketBufferHandle && msg,
+CHIP_ERROR RawEndPoint::SendTo(const IPAddress & addr, InterfaceId intfId, chip::System::PacketBufferHandle && msg,
                                uint16_t sendFlags)
 {
     IPPacketInfo pktInfo;
@@ -565,20 +565,20 @@
  * @param[in]   msg         the packet buffer containing the UDP message
  * @param[in]   sendFlags   optional transmit option flags
  *
- * @retval  INET_NO_ERROR
+ * @retval  CHIP_NO_ERROR
  *      success: \c msg is queued for transmit.
  *
- * @retval  INET_ERROR_NOT_SUPPORTED
+ * @retval  CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *      the system does not support the requested operation.
  *
  * @retval  INET_ERROR_WRONG_ADDRESS_TYPE
  *      the destination address and the bound interface address do not
  *      have matching protocol versions or address type.
  *
- * @retval  INET_ERROR_MESSAGE_TOO_LONG
+ * @retval  CHIP_ERROR_MESSAGE_TOO_LONG
  *      \c msg does not contain the whole ICMP message.
  *
- * @retval  INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED
+ * @retval  CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG
  *      On some platforms, only a truncated portion of \c msg was queued
  *      for transmit.
  *
@@ -587,13 +587,13 @@
  * @details
  *      Send the ICMP message \c msg using the destination information given in \c addr.
  */
-INET_ERROR RawEndPoint::SendMsg(const IPPacketInfo * pktInfo, chip::System::PacketBufferHandle && msg, uint16_t sendFlags)
+CHIP_ERROR RawEndPoint::SendMsg(const IPPacketInfo * pktInfo, chip::System::PacketBufferHandle && msg, uint16_t sendFlags)
 {
-    INET_ERROR res         = INET_NO_ERROR;
+    CHIP_ERROR res         = CHIP_NO_ERROR;
     const IPAddress & addr = pktInfo->DestAddress;
 
     INET_FAULT_INJECT(FaultInjection::kFault_Send, return INET_ERROR_UNKNOWN_INTERFACE;);
-    INET_FAULT_INJECT(FaultInjection::kFault_SendNonCritical, return INET_ERROR_NO_MEMORY;);
+    INET_FAULT_INJECT(FaultInjection::kFault_SendNonCritical, return CHIP_ERROR_NO_MEMORY;);
 
     // Do not allow sending an IPv4 address on an IPv6 end point and
     // vice versa.
@@ -673,8 +673,8 @@
  * @param[in]   numICMPTypes    length of array at \c aICMPTypes
  * @param[in]   aICMPTypes      the set of ICMPv6 type codes to filter.
  *
- * @retval  INET_NO_ERROR                   success: filter parameters set
- * @retval  INET_ERROR_NOT_IMPLEMENTED      system does not implement
+ * @retval  CHIP_NO_ERROR                   success: filter parameters set
+ * @retval  CHIP_ERROR_NOT_IMPLEMENTED      system does not implement
  * @retval  INET_ERROR_WRONG_ADDRESS_TYPE   endpoint not IPv6 type
  * @retval  INET_ERROR_WRONG_PROTOCOL_TYPE  endpoint not ICMP6 type
  *
@@ -684,18 +684,18 @@
  *  Apply the ICMPv6 filtering parameters for the codes in \c aICMPTypes to
  *  the underlying endpoint in the system networking stack.
  */
-INET_ERROR RawEndPoint::SetICMPFilter(uint8_t numICMPTypes, const uint8_t * aICMPTypes)
+CHIP_ERROR RawEndPoint::SetICMPFilter(uint8_t numICMPTypes, const uint8_t * aICMPTypes)
 {
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
 #if !(HAVE_NETINET_ICMP6_H && HAVE_ICMP6_FILTER)
-    return INET_ERROR_NOT_IMPLEMENTED;
+    return CHIP_ERROR_NOT_IMPLEMENTED;
 #endif //!(HAVE_NETINET_ICMP6_H && HAVE_ICMP6_FILTER)
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
     VerifyOrReturnError(IPVer == kIPVersion_6, INET_ERROR_WRONG_ADDRESS_TYPE);
     VerifyOrReturnError(IPProto == kIPProtocol_ICMPv6, INET_ERROR_WRONG_PROTOCOL_TYPE);
     VerifyOrReturnError((numICMPTypes == 0 && aICMPTypes == nullptr) || (numICMPTypes != 0 && aICMPTypes != nullptr),
-                        INET_ERROR_BAD_ARGS);
+                        CHIP_ERROR_INVALID_ARGUMENT);
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     LOCK_TCPIP_CORE();
@@ -726,7 +726,7 @@
 #endif // HAVE_NETINET_ICMP6_H && HAVE_ICMP6_FILTER
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -736,9 +736,9 @@
  *
  * @param[in]   intfId      indicator of the network interface.
  *
- * @retval  INET_NO_ERROR               success: endpoint bound to address
- * @retval  INET_NO_MEMORY              insufficient memory for endpoint
- * @retval  INET_ERROR_NOT_IMPLEMENTED  system implementation not complete.
+ * @retval  CHIP_NO_ERROR               success: endpoint bound to address
+ * @retval  CHIP_ERROR_NO_MEMORY        insufficient memory for endpoint
+ * @retval  CHIP_ERROR_NOT_IMPLEMENTED  system implementation not complete.
  *
  * @retval  INET_ERROR_UNKNOWN_INTERFACE
  *      On some platforms, the interface is not present.
@@ -751,7 +751,7 @@
  *  On LwIP, this method must not be called with the LwIP stack lock
  *  already acquired.
  */
-INET_ERROR RawEndPoint::BindInterface(IPAddressType addrType, InterfaceId intfId)
+CHIP_ERROR RawEndPoint::BindInterface(IPAddressType addrType, InterfaceId intfId)
 {
     // A lock is required because the LwIP thread may be referring to intf_filter,
     // while this code running in the Inet application is potentially modifying it.
@@ -759,16 +759,16 @@
 
     if (mState != kState_Ready && mState != kState_Bound)
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     LOCK_TCPIP_CORE();
 
     // Make sure we have the appropriate type of PCB.
-    INET_ERROR err = GetPCB(addrType);
+    CHIP_ERROR err = GetPCB(addrType);
 
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         err = LwIPBindInterface(mRaw, intfId);
     }
@@ -787,7 +787,7 @@
 
     mState = kState_Bound;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void RawEndPoint::Init(InetLayer * inetLayer, IPVersion ipVer, IPProtocol ipProto)
@@ -825,7 +825,7 @@
     IPEndPointBasis::HandleDataReceived(std::move(msg));
 }
 
-INET_ERROR RawEndPoint::GetPCB(IPAddressType addrType)
+CHIP_ERROR RawEndPoint::GetPCB(IPAddressType addrType)
 {
     // IMPORTANT: This method MUST be called with the LwIP stack LOCKED!
 
@@ -848,7 +848,7 @@
         if (mRaw == NULL)
         {
             ChipLogError(Inet, "raw_new_ip_type failed");
-            return INET_ERROR_NO_MEMORY;
+            return CHIP_ERROR_NO_MEMORY;
         }
 
         mLwIPEndPointType = kLwIPEndPointType_Raw;
@@ -896,7 +896,7 @@
         if (mRaw == NULL)
         {
             ChipLogError(Inet, "raw_new failed");
-            return INET_ERROR_NO_MEMORY;
+            return CHIP_ERROR_NO_MEMORY;
         }
 
         mLwIPEndPointType = kLwIPEndPointType_Raw;
@@ -916,7 +916,7 @@
     }
 #endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR >= 5
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /* This function is executed when a raw_pcb is listening and an IP datagram (v4 or v6) is received.
@@ -999,7 +999,7 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-INET_ERROR RawEndPoint::GetSocket(IPAddressType aAddressType)
+CHIP_ERROR RawEndPoint::GetSocket(IPAddressType aAddressType)
 {
     constexpr int lType = (SOCK_RAW | SOCK_FLAGS);
     int lProtocol;
diff --git a/src/inet/RawEndPoint.h b/src/inet/RawEndPoint.h
index 5897928..67992f3 100644
--- a/src/inet/RawEndPoint.h
+++ b/src/inet/RawEndPoint.h
@@ -74,16 +74,16 @@
      */
     IPProtocol IPProto; // This data member is read-only
 
-    INET_ERROR Bind(IPAddressType addrType, const IPAddress & addr, InterfaceId intfId = INET_NULL_INTERFACEID);
-    INET_ERROR BindIPv6LinkLocal(InterfaceId intfId, const IPAddress & addr);
-    INET_ERROR BindInterface(IPAddressType addrType, InterfaceId intfId);
+    CHIP_ERROR Bind(IPAddressType addrType, const IPAddress & addr, InterfaceId intfId = INET_NULL_INTERFACEID);
+    CHIP_ERROR BindIPv6LinkLocal(InterfaceId intfId, const IPAddress & addr);
+    CHIP_ERROR BindInterface(IPAddressType addrType, InterfaceId intfId);
     InterfaceId GetBoundInterface();
-    INET_ERROR Listen(IPEndPointBasis::OnMessageReceivedFunct onMessageReceived,
+    CHIP_ERROR Listen(IPEndPointBasis::OnMessageReceivedFunct onMessageReceived,
                       IPEndPointBasis::OnReceiveErrorFunct onReceiveError, void * appState = nullptr);
-    INET_ERROR SendTo(const IPAddress & addr, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
-    INET_ERROR SendTo(const IPAddress & addr, InterfaceId intfId, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
-    INET_ERROR SendMsg(const IPPacketInfo * pktInfo, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
-    INET_ERROR SetICMPFilter(uint8_t numICMPTypes, const uint8_t * aICMPTypes);
+    CHIP_ERROR SendTo(const IPAddress & addr, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
+    CHIP_ERROR SendTo(const IPAddress & addr, InterfaceId intfId, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
+    CHIP_ERROR SendMsg(const IPPacketInfo * pktInfo, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
+    CHIP_ERROR SetICMPFilter(uint8_t numICMPTypes, const uint8_t * aICMPTypes);
     void Close();
     void Free();
 
@@ -101,7 +101,7 @@
     const uint8_t * ICMPTypes;
 
     void HandleDataReceived(chip::System::PacketBufferHandle && msg);
-    INET_ERROR GetPCB(IPAddressType addrType);
+    CHIP_ERROR GetPCB(IPAddressType addrType);
 
 #if LWIP_VERSION_MAJOR > 1 || LWIP_VERSION_MINOR >= 5
     static u8_t LwIPReceiveRawMessage(void * arg, struct raw_pcb * pcb, struct pbuf * p, const ip_addr_t * addr);
@@ -111,7 +111,7 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-    INET_ERROR GetSocket(IPAddressType addrType);
+    CHIP_ERROR GetSocket(IPAddressType addrType);
     void HandlePendingIO();
     static void HandlePendingIO(System::WatchableSocket & socket);
 
diff --git a/src/inet/TCPEndPoint.cpp b/src/inet/TCPEndPoint.cpp
index 3004dfe..bad1675 100644
--- a/src/inet/TCPEndPoint.cpp
+++ b/src/inet/TCPEndPoint.cpp
@@ -111,12 +111,12 @@
 
 chip::System::ObjectPool<TCPEndPoint, INET_CONFIG_NUM_TCP_ENDPOINTS> TCPEndPoint::sPool;
 
-INET_ERROR TCPEndPoint::Bind(IPAddressType addrType, const IPAddress & addr, uint16_t port, bool reuseAddr)
+CHIP_ERROR TCPEndPoint::Bind(IPAddressType addrType, const IPAddress & addr, uint16_t port, bool reuseAddr)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (State != kState_Ready)
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
     if (addr != IPAddress::Any && addr.Type() != kIPAddressType_Any && addr.Type() != addrType)
         return INET_ERROR_WRONG_ADDRESS_TYPE;
@@ -130,7 +130,7 @@
     res = GetPCB(addrType);
 
     // Bind the PCB to the specified address/port.
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
         if (reuseAddr)
         {
@@ -187,7 +187,7 @@
 
     res = GetSocket(addrType);
 
-    if (res == INET_NO_ERROR && reuseAddr)
+    if (res == CHIP_NO_ERROR && reuseAddr)
     {
         int n = 1;
         setsockopt(mSocket.GetFD(), SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n));
@@ -210,7 +210,7 @@
 #endif // defined(SO_REUSEPORT)
     }
 
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
         if (addrType == kIPAddressType_IPv6)
         {
@@ -249,10 +249,10 @@
         unsigned long fd = static_cast<unsigned long>(mSocket.GetFD());
 
         mReadableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, dispatchQueue);
-        ReturnErrorCodeIf(mReadableSource == nullptr, INET_ERROR_NO_MEMORY);
+        ReturnErrorCodeIf(mReadableSource == nullptr, CHIP_ERROR_NO_MEMORY);
 
         mWriteableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_WRITE, fd, 0, dispatchQueue);
-        ReturnErrorCodeIf(mWriteableSource == nullptr, INET_ERROR_NO_MEMORY);
+        ReturnErrorCodeIf(mWriteableSource == nullptr, CHIP_ERROR_NO_MEMORY);
 
         dispatch_source_set_event_handler(mReadableSource, ^{
             this->mSocket.SetPendingIO(System::SocketEventFlags::kRead);
@@ -270,7 +270,7 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
         State = kState_Bound;
     }
@@ -278,12 +278,12 @@
     return res;
 }
 
-INET_ERROR TCPEndPoint::Listen(uint16_t backlog)
+CHIP_ERROR TCPEndPoint::Listen(uint16_t backlog)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (State != kState_Bound)
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -308,7 +308,7 @@
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
         // Once Listening, bump the reference count.  The corresponding call to Release()
         // [or on LwIP, DeferredRelease()] will happen in DoClose().
@@ -319,12 +319,12 @@
     return res;
 }
 
-INET_ERROR TCPEndPoint::Connect(const IPAddress & addr, uint16_t port, InterfaceId intfId)
+CHIP_ERROR TCPEndPoint::Connect(const IPAddress & addr, uint16_t port, InterfaceId intfId)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (State != kState_Ready && State != kState_Bound)
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
     IPAddressType addrType = addr.Type();
 
@@ -340,14 +340,14 @@
         InetLayer & lInetLayer = Layer();
 
         if (!addr.IsIPv6LinkLocal() || State == kState_Bound)
-            return INET_ERROR_NOT_IMPLEMENTED;
+            return CHIP_ERROR_NOT_IMPLEMENTED;
 
         res = lInetLayer.GetLinkLocalAddr(intfId, &intfLLAddr);
-        if (res != INET_NO_ERROR)
+        if (res != CHIP_NO_ERROR)
             return res;
 
         res = Bind(kIPAddressType_IPv6, intfLLAddr, 0, true);
-        if (res != INET_NO_ERROR)
+        if (res != CHIP_NO_ERROR)
             return res;
     }
 
@@ -356,7 +356,7 @@
 
     res = GetPCB(addrType);
 
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
         tcp_arg(mTCP, this);
         tcp_err(mTCP, LwIPHandleError);
@@ -382,12 +382,12 @@
 #endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR >= 5
 
         // Ensure that TCP timers are started
-        if (res == INET_NO_ERROR)
+        if (res == CHIP_NO_ERROR)
         {
             res = start_tcp_timers();
         }
 
-        if (res == INET_NO_ERROR)
+        if (res == CHIP_NO_ERROR)
         {
             State = kState_Connecting;
             Retain();
@@ -402,7 +402,7 @@
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
     res = GetSocket(addrType);
-    if (res != INET_NO_ERROR)
+    if (res != CHIP_NO_ERROR)
         return res;
 
     if (intfId == INET_NULL_INTERFACEID)
@@ -426,7 +426,7 @@
             memset(&ifr, 0, sizeof(ifr));
 
             res = GetInterfaceName(intfId, ifr.ifr_name, sizeof(ifr.ifr_name));
-            if (res != INET_NO_ERROR)
+            if (res != CHIP_NO_ERROR)
                 return res;
 
             // Attempt to bind to the interface using SO_BINDTODEVICE which requires privileged access.
@@ -446,7 +446,7 @@
                 // The only way to do this is to bind the local to an address on the desired
                 // interface.
                 res = BindSrcAddrFromIntf(addrType, intfId);
-                if (res != INET_NO_ERROR)
+                if (res != CHIP_NO_ERROR)
                     return res;
             }
         }
@@ -519,7 +519,7 @@
         // Wait for ability to read on this endpoint.
         mSocket.RequestCallbackOnPendingRead();
         if (OnConnectComplete != nullptr)
-            OnConnectComplete(this, INET_NO_ERROR);
+            OnConnectComplete(this, CHIP_NO_ERROR);
     }
     else
     {
@@ -565,7 +565,7 @@
     lSystemLayer.CancelTimer(TCPConnectTimeoutHandler, this);
 }
 
-void TCPEndPoint::TCPConnectTimeoutHandler(chip::System::Layer * aSystemLayer, void * aAppState, chip::System::Error aError)
+void TCPEndPoint::TCPConnectTimeoutHandler(chip::System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError)
 {
     TCPEndPoint * tcpEndPoint = reinterpret_cast<TCPEndPoint *>(aAppState);
 
@@ -576,12 +576,12 @@
     tcpEndPoint->DoClose(INET_ERROR_TCP_CONNECT_TIMEOUT, false);
 }
 
-INET_ERROR TCPEndPoint::GetPeerInfo(IPAddress * retAddr, uint16_t * retPort) const
+CHIP_ERROR TCPEndPoint::GetPeerInfo(IPAddress * retAddr, uint16_t * retPort) const
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -603,7 +603,7 @@
 #endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR >= 5
     }
     else
-        res = INET_ERROR_CONNECTION_ABORTED;
+        res = CHIP_ERROR_CONNECTION_ABORTED;
 
     // Unlock LwIP stack
     UNLOCK_TCPIP_CORE();
@@ -637,19 +637,19 @@
     }
 #endif // INET_CONFIG_ENABLE_IPV4
     else
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
     return res;
 }
 
-INET_ERROR TCPEndPoint::GetLocalInfo(IPAddress * retAddr, uint16_t * retPort)
+CHIP_ERROR TCPEndPoint::GetLocalInfo(IPAddress * retAddr, uint16_t * retPort)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -671,7 +671,7 @@
 #endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR >= 5
     }
     else
-        res = INET_ERROR_CONNECTION_ABORTED;
+        res = CHIP_ERROR_CONNECTION_ABORTED;
 
     // Unlock LwIP stack
     UNLOCK_TCPIP_CORE();
@@ -708,24 +708,24 @@
     }
 #endif // INET_CONFIG_ENABLE_IPV4
     else
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
     return res;
 }
 
-INET_ERROR TCPEndPoint::GetInterfaceId(InterfaceId * retInterface)
+CHIP_ERROR TCPEndPoint::GetInterfaceId(InterfaceId * retInterface)
 {
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     // TODO: Does netif_get_by_index(mTCP->netif_idx) do the right thing?  I
     // can't quite tell whether LwIP supports a specific interface id for TCP at
     // all.  For now just claim no particular interface id.
     *retInterface = INET_NULL_INTERFACEID;
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
@@ -757,7 +757,7 @@
             // TODO: Is there still a meaningful interface id in this case?
             *retInterface = INET_NULL_INTERFACEID;
         }
-        return INET_NO_ERROR;
+        return CHIP_NO_ERROR;
     }
 
 #if INET_CONFIG_ENABLE_IPV4
@@ -768,21 +768,21 @@
     }
 #endif // INET_CONFIG_ENABLE_IPV4
 
-    return INET_ERROR_INCORRECT_STATE;
+    return CHIP_ERROR_INCORRECT_STATE;
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
     *retInterface = INET_NULL_INTERFACEID;
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-INET_ERROR TCPEndPoint::Send(System::PacketBufferHandle && data, bool push)
+CHIP_ERROR TCPEndPoint::Send(System::PacketBufferHandle && data, bool push)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (State != kState_Connected && State != kState_ReceiveShutdown)
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
     if (mSendQueue.IsNull())
@@ -844,12 +844,12 @@
  *
  */
 
-INET_ERROR TCPEndPoint::EnableNoDelay()
+CHIP_ERROR TCPEndPoint::EnableNoDelay()
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     // Lock LwIP stack
@@ -858,7 +858,7 @@
     if (mTCP != NULL)
         tcp_nagle_disable(mTCP);
     else
-        res = INET_ERROR_CONNECTION_ABORTED;
+        res = CHIP_ERROR_CONNECTION_ABORTED;
 
     // Unlock LwIP stack
     UNLOCK_TCPIP_CORE();
@@ -882,12 +882,12 @@
     return res;
 }
 
-INET_ERROR TCPEndPoint::EnableKeepAlive(uint16_t interval, uint16_t timeoutCount)
+CHIP_ERROR TCPEndPoint::EnableKeepAlive(uint16_t interval, uint16_t timeoutCount)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -911,14 +911,14 @@
         ip_set_option(mTCP, SOF_KEEPALIVE);
     }
     else
-        res = INET_ERROR_CONNECTION_ABORTED;
+        res = CHIP_ERROR_CONNECTION_ABORTED;
 
     // Unlock LwIP stack
     UNLOCK_TCPIP_CORE();
 
 #else // LWIP_TCP_KEEPALIVE
 
-    res = INET_ERROR_NOT_IMPLEMENTED;
+    res = CHIP_ERROR_NOT_IMPLEMENTED;
 
 #endif // LWIP_TCP_KEEPALIVE
 
@@ -966,12 +966,12 @@
  *    This method does nothing if keepalives have not been enabled on the endpoint.
  */
 
-INET_ERROR TCPEndPoint::DisableKeepAlive()
+CHIP_ERROR TCPEndPoint::DisableKeepAlive()
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -986,14 +986,14 @@
         ip_reset_option(mTCP, SOF_KEEPALIVE);
     }
     else
-        res = INET_ERROR_CONNECTION_ABORTED;
+        res = CHIP_ERROR_CONNECTION_ABORTED;
 
     // Unlock LwIP stack
     UNLOCK_TCPIP_CORE();
 
 #else // LWIP_TCP_KEEPALIVE
 
-    res = INET_ERROR_NOT_IMPLEMENTED;
+    res = CHIP_ERROR_NOT_IMPLEMENTED;
 
 #endif // LWIP_TCP_KEEPALIVE
 
@@ -1034,13 +1034,13 @@
  *    This method can be called multiple times to adjust the keepalive interval or timeout
  *    count.
  */
-INET_ERROR TCPEndPoint::SetUserTimeout(uint32_t userTimeoutMillis)
+CHIP_ERROR TCPEndPoint::SetUserTimeout(uint32_t userTimeoutMillis)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (!IsConnected())
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
 #if INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT
@@ -1059,13 +1059,13 @@
     if (setsockopt(mSocket.GetFD(), TCP_SOCKOPT_LEVEL, TCP_USER_TIMEOUT, &val, sizeof(val)) != 0)
         return chip::System::MapErrorPOSIX(errno);
 #else  // TCP_USER_TIMEOUT
-    res = INET_ERROR_NOT_IMPLEMENTED;
+    res = CHIP_ERROR_NOT_IMPLEMENTED;
 #endif // defined(TCP_USER_TIMEOUT)
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
-    res = INET_ERROR_NOT_IMPLEMENTED;
+    res = CHIP_ERROR_NOT_IMPLEMENTED;
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #endif // !INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT
@@ -1073,12 +1073,12 @@
     return res;
 }
 
-INET_ERROR TCPEndPoint::AckReceive(uint16_t len)
+CHIP_ERROR TCPEndPoint::AckReceive(uint16_t len)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -1088,7 +1088,7 @@
     if (mTCP != NULL)
         tcp_recved(mTCP, len);
     else
-        res = INET_ERROR_CONNECTION_ABORTED;
+        res = CHIP_ERROR_CONNECTION_ABORTED;
 
     // Unlock LwIP stack
     UNLOCK_TCPIP_CORE();
@@ -1104,14 +1104,14 @@
     return res;
 }
 
-INET_ERROR TCPEndPoint::SetReceivedDataForTesting(System::PacketBufferHandle && data)
+CHIP_ERROR TCPEndPoint::SetReceivedDataForTesting(System::PacketBufferHandle && data)
 {
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
     mRcvQueue = std::move(data);
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 uint32_t TCPEndPoint::PendingSendLength()
@@ -1128,12 +1128,12 @@
     return 0;
 }
 
-INET_ERROR TCPEndPoint::Shutdown()
+CHIP_ERROR TCPEndPoint::Shutdown()
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     if (!IsConnected())
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
     // If fully connected, enter the SendShutdown state.
     if (State == kState_Connected)
@@ -1149,7 +1149,7 @@
     return err;
 }
 
-INET_ERROR TCPEndPoint::Close()
+CHIP_ERROR TCPEndPoint::Close()
 {
     // Clear the receive queue.
     mRcvQueue = nullptr;
@@ -1160,7 +1160,7 @@
     OnConnectComplete  = nullptr;
 
     // Perform a graceful close.
-    return DoClose(INET_NO_ERROR, true);
+    return DoClose(CHIP_NO_ERROR, true);
 }
 
 void TCPEndPoint::Abort()
@@ -1170,12 +1170,12 @@
     OnPeerClose        = nullptr;
     OnConnectComplete  = nullptr;
 
-    DoClose(INET_ERROR_CONNECTION_ABORTED, true);
+    DoClose(CHIP_ERROR_CONNECTION_ABORTED, true);
 }
 
 void TCPEndPoint::Free()
 {
-    INET_ERROR err;
+    CHIP_ERROR err;
 
     // Ensure no callbacks to the app after this point.
     OnAcceptError        = nullptr;
@@ -1188,7 +1188,7 @@
 
     // Ensure the end point is Closed or Closing.
     err = Close();
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
         Abort();
 
     // Release the Retain() that happened when the end point was allocated
@@ -1257,9 +1257,9 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 }
 
-INET_ERROR TCPEndPoint::DriveSending()
+CHIP_ERROR TCPEndPoint::DriveSending()
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -1334,7 +1334,7 @@
             // Call LwIP to send the queued data.
             INET_FAULT_INJECT(FaultInjection::kFault_Send, err = chip::System::MapErrorLwIP(ERR_RTE));
 
-            if (err == INET_NO_ERROR)
+            if (err == CHIP_NO_ERROR)
             {
                 lwipErr = tcp_output(mTCP);
 
@@ -1343,7 +1343,7 @@
             }
         }
 
-        if (err == INET_NO_ERROR)
+        if (err == CHIP_NO_ERROR)
         {
             // If in the SendShutdown state and the unsent queue is now empty, shutdown the PCB for sending.
             if (State == kState_SendShutdown && (RemainingToSend() == 0))
@@ -1356,7 +1356,7 @@
     }
 
     else
-        err = INET_ERROR_CONNECTION_ABORTED;
+        err = CHIP_ERROR_CONNECTION_ABORTED;
 
     // Unlock LwIP stack
     UNLOCK_TCPIP_CORE();
@@ -1393,7 +1393,7 @@
 
         if (lenSentRaw < 0 || lenSentRaw > bufLen)
         {
-            err = INET_ERROR_INCORRECT_STATE;
+            err = CHIP_ERROR_INCORRECT_STATE;
             break;
         }
 
@@ -1432,7 +1432,7 @@
         bool isProgressing = false;
 
         err = CheckConnectionProgress(isProgressing);
-        if (err != INET_NO_ERROR)
+        if (err != CHIP_NO_ERROR)
         {
             break;
         }
@@ -1457,7 +1457,7 @@
             break;
     }
 
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         // If we're in the SendShutdown state and the send queue is now empty, shutdown writing on the socket.
         if (State == kState_SendShutdown && mSendQueue.IsNull())
@@ -1469,7 +1469,7 @@
 
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
         DoClose(err, false);
 
     CHIP_SYSTEM_FAULT_INJECT_ASYNC_EVENT();
@@ -1486,8 +1486,8 @@
         // Acknowledgement is done after handling the buffers to allow the
         // application processing to throttle flow.
         uint16_t ackLength = mRcvQueue->TotalLength();
-        INET_ERROR err     = OnDataReceived(this, std::move(mRcvQueue));
-        if (err != INET_NO_ERROR)
+        CHIP_ERROR err     = OnDataReceived(this, std::move(mRcvQueue));
+        if (err != CHIP_NO_ERROR)
         {
             DoClose(err, false);
             return;
@@ -1498,13 +1498,13 @@
     // If the connection is closing, and the receive queue is now empty, call DoClose() to complete
     // the process of closing the connection.
     if (State == kState_Closing && mRcvQueue.IsNull())
-        DoClose(INET_NO_ERROR, false);
+        DoClose(CHIP_NO_ERROR, false);
 }
 
-void TCPEndPoint::HandleConnectComplete(INET_ERROR err)
+void TCPEndPoint::HandleConnectComplete(CHIP_ERROR err)
 {
     // If the connect succeeded enter the Connected state and call the app's callback.
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         // Stop the TCP Connect timer in case it is still running.
         StopConnectTimer();
@@ -1521,7 +1521,7 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
         if (OnConnectComplete != nullptr)
-            OnConnectComplete(this, INET_NO_ERROR);
+            OnConnectComplete(this, CHIP_NO_ERROR);
     }
 
     // Otherwise, close the connection with an error.
@@ -1529,7 +1529,7 @@
         DoClose(err, false);
 }
 
-INET_ERROR TCPEndPoint::DoClose(INET_ERROR err, bool suppressCallback)
+CHIP_ERROR TCPEndPoint::DoClose(CHIP_ERROR err, bool suppressCallback)
 {
     int oldState = State;
 
@@ -1542,7 +1542,7 @@
     // AND there is data waiting to be processed on either the send or receive queues
     // ... THEN enter the Closing state, allowing the queued data to drain,
     // ... OTHERWISE go straight to the Closed state.
-    if (IsConnected() && err == INET_NO_ERROR && (!mSendQueue.IsNull() || !mRcvQueue.IsNull()))
+    if (IsConnected() && err == CHIP_NO_ERROR && (!mSendQueue.IsNull() || !mRcvQueue.IsNull()))
         State = kState_Closing;
     else
         State = kState_Closed;
@@ -1553,7 +1553,7 @@
 
     // If not making a state transition, return immediately.
     if (State == oldState)
-        return INET_NO_ERROR;
+        return CHIP_NO_ERROR;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -1589,7 +1589,7 @@
 
                 // If the endpoint is being closed without error, THEN call tcp_close() to close the underlying
                 // TCP connection gracefully, preserving any in-transit send data.
-                if (err == INET_NO_ERROR)
+                if (err == CHIP_NO_ERROR)
                 {
                     tcp_close(mTCP);
                 }
@@ -1635,7 +1635,7 @@
         if (State == kState_Closed || (State == kState_Closing && mSendQueue.IsNull()))
         {
             // If aborting the connection, ensure we send a TCP RST.
-            if (IsConnected(oldState) && err != INET_NO_ERROR)
+            if (IsConnected(oldState) && err != CHIP_NO_ERROR)
             {
                 lingerStruct.l_onoff  = 1;
                 lingerStruct.l_linger = 0;
@@ -1644,7 +1644,7 @@
                     ChipLogError(Inet, "SO_LINGER: %d", errno);
             }
 
-            if (mSocket.Close() != 0 && err == INET_NO_ERROR)
+            if (mSocket.Close() != 0 && err == CHIP_NO_ERROR)
                 err = chip::System::MapErrorPOSIX(errno);
         }
     }
@@ -1718,7 +1718,7 @@
 }
 
 #if INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT
-void TCPEndPoint::TCPUserTimeoutHandler(chip::System::Layer * aSystemLayer, void * aAppState, chip::System::Error aError)
+void TCPEndPoint::TCPUserTimeoutHandler(chip::System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError)
 {
     TCPEndPoint * tcpEndPoint = reinterpret_cast<TCPEndPoint *>(aAppState);
 
@@ -1728,7 +1728,7 @@
     tcpEndPoint->mUserTimeoutTimerRunning = false;
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-    INET_ERROR err     = INET_NO_ERROR;
+    CHIP_ERROR err     = CHIP_NO_ERROR;
     bool isProgressing = false;
     err                = tcpEndPoint->CheckConnectionProgress(isProgressing);
     SuccessOrExit(err);
@@ -1780,7 +1780,7 @@
 
 exit:
 
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         // Close the connection as the TCP UserTimeout has expired
 
@@ -1916,7 +1916,7 @@
     return startOfUnsent;
 }
 
-INET_ERROR TCPEndPoint::GetPCB(IPAddressType addrType)
+CHIP_ERROR TCPEndPoint::GetPCB(IPAddressType addrType)
 {
     // IMMPORTANT: This method MUST be called with the LwIP stack LOCKED!
 
@@ -1941,7 +1941,7 @@
 
         if (mTCP == NULL)
         {
-            return INET_ERROR_NO_MEMORY;
+            return CHIP_ERROR_NO_MEMORY;
         }
         else
         {
@@ -1981,7 +1981,7 @@
             return INET_ERROR_WRONG_ADDRESS_TYPE;
         if (mTCP == NULL)
         {
-            return INET_ERROR_NO_MEMORY;
+            return CHIP_ERROR_NO_MEMORY;
         }
         else
         {
@@ -2000,7 +2000,7 @@
     }
 #endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR >= 5
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void TCPEndPoint::HandleDataSent(uint16_t lenSent)
@@ -2012,13 +2012,13 @@
         if (lenSent > mUnackedLength)
         {
             ChipLogError(Inet, "Got more ACKed bytes (%d) than were pending (%d)", (int) lenSent, (int) mUnackedLength);
-            DoClose(INET_ERROR_UNEXPECTED_EVENT, false);
+            DoClose(CHIP_ERROR_UNEXPECTED_EVENT, false);
             return;
         }
         else if (mSendQueue.IsNull())
         {
             ChipLogError(Inet, "Got ACK for %d bytes but data backing gone", (int) lenSent);
-            DoClose(INET_ERROR_UNEXPECTED_EVENT, false);
+            DoClose(CHIP_ERROR_UNEXPECTED_EVENT, false);
             return;
         }
 
@@ -2066,7 +2066,7 @@
 
         // If in the closing state and the send queue is now empty, attempt to transition to closed.
         if ((State == kState_Closing) && (RemainingToSend() == 0))
-            DoClose(INET_NO_ERROR, false);
+            DoClose(CHIP_NO_ERROR, false);
     }
 }
 
@@ -2119,7 +2119,7 @@
 
 void TCPEndPoint::HandleIncomingConnection(TCPEndPoint * conEP)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     IPAddress peerAddr;
     uint16_t peerPort;
 
@@ -2127,14 +2127,14 @@
     {
         // If there's no callback available, fail with an error.
         if (OnConnectionReceived == NULL)
-            err = INET_ERROR_NO_CONNECTION_HANDLER;
+            err = CHIP_ERROR_NO_CONNECTION_HANDLER;
 
         // Extract the peer's address information.
-        if (err == INET_NO_ERROR)
+        if (err == CHIP_NO_ERROR)
             err = conEP->GetPeerInfo(&peerAddr, &peerPort);
 
         // If successful, call the app's callback function.
-        if (err == INET_NO_ERROR)
+        if (err == CHIP_NO_ERROR)
             OnConnectionReceived(this, conEP, peerAddr, peerPort);
 
         // Otherwise clean up and call the app's error callback.
@@ -2142,14 +2142,14 @@
             OnAcceptError(this, err);
     }
     else
-        err = INET_ERROR_INCORRECT_STATE;
+        err = CHIP_ERROR_INCORRECT_STATE;
 
     // If something failed above, abort and free the connection end point.
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
         conEP->Free();
 }
 
-void TCPEndPoint::HandleError(INET_ERROR err)
+void TCPEndPoint::HandleError(CHIP_ERROR err)
 {
     if (State == kState_Listening)
     {
@@ -2166,7 +2166,7 @@
 
     if (arg != NULL)
     {
-        INET_ERROR conErr;
+        CHIP_ERROR conErr;
         TCPEndPoint * ep                   = static_cast<TCPEndPoint *>(arg);
         chip::System::Layer & lSystemLayer = ep->SystemLayer();
 
@@ -2179,7 +2179,7 @@
 
         // Post callback to HandleConnectComplete.
         conErr = chip::System::MapErrorLwIP(lwipErr);
-        if (lSystemLayer.PostEvent(*ep, kInetEvent_TCPConnectComplete, (uintptr_t) conErr) != INET_NO_ERROR)
+        if (lSystemLayer.PostEvent(*ep, kInetEvent_TCPConnectComplete, (uintptr_t) conErr) != CHIP_NO_ERROR)
             res = ERR_ABRT;
     }
     else
@@ -2193,7 +2193,7 @@
 
 err_t TCPEndPoint::LwIPHandleIncomingConnection(void * arg, struct tcp_pcb * tpcb, err_t lwipErr)
 {
-    INET_ERROR err = chip::System::MapErrorLwIP(lwipErr);
+    CHIP_ERROR err = chip::System::MapErrorLwIP(lwipErr);
 
     if (arg != NULL)
     {
@@ -2211,7 +2211,7 @@
         // function returns, LwIP is free to begin calling callbacks on the new PCB. For that to work we need
         // to have an end point associated with the PCB.
         //
-        if (err == INET_NO_ERROR)
+        if (err == CHIP_NO_ERROR)
         {
             InetLayer & lInetLayer = listenEP->Layer();
 
@@ -2219,13 +2219,13 @@
         }
 
         // Ensure that TCP timers have been started
-        if (err == INET_NO_ERROR)
+        if (err == CHIP_NO_ERROR)
         {
             err = start_tcp_timers();
         }
 
         // If successful in allocating an end point...
-        if (err == INET_NO_ERROR)
+        if (err == CHIP_NO_ERROR)
         {
             // Put the new end point into the Connected state.
             conEP->State             = kState_Connected;
@@ -2240,9 +2240,9 @@
             tcp_err(tpcb, LwIPHandleError);
 
             // Post a callback to the HandleConnectionReceived() function, passing it the new end point.
-            if (lSystemLayer.PostEvent(*listenEP, kInetEvent_TCPConnectionReceived, (uintptr_t) conEP) != INET_NO_ERROR)
+            if (lSystemLayer.PostEvent(*listenEP, kInetEvent_TCPConnectionReceived, (uintptr_t) conEP) != CHIP_NO_ERROR)
             {
-                err = INET_ERROR_CONNECTION_ABORTED;
+                err = CHIP_ERROR_CONNECTION_ABORTED;
                 conEP->Release(); // for the Retain() above
                 conEP->Release(); // for the Retain() in NewTCPEndPoint()
             }
@@ -2253,9 +2253,9 @@
             lSystemLayer.PostEvent(*listenEP, kInetEvent_TCPError, (uintptr_t) err);
     }
     else
-        err = INET_ERROR_CONNECTION_ABORTED;
+        err = CHIP_ERROR_CONNECTION_ABORTED;
 
-    if (err != INET_NO_ERROR && tpcb != NULL)
+    if (err != CHIP_NO_ERROR && tpcb != NULL)
     {
         tcp_abort(tpcb);
         return ERR_ABRT;
@@ -2276,7 +2276,7 @@
         chip::System::Layer & lSystemLayer = ep->SystemLayer();
 
         // Post callback to HandleDataReceived.
-        if (lSystemLayer.PostEvent(*ep, kInetEvent_TCPDataReceived, (uintptr_t) p) != INET_NO_ERROR)
+        if (lSystemLayer.PostEvent(*ep, kInetEvent_TCPDataReceived, (uintptr_t) p) != CHIP_NO_ERROR)
             res = ERR_ABRT;
     }
     else
@@ -2298,7 +2298,7 @@
         chip::System::Layer & lSystemLayer = ep->SystemLayer();
 
         // Post callback to HandleDataReceived.
-        if (lSystemLayer.PostEvent(*ep, kInetEvent_TCPDataSent, (uintptr_t) len) != INET_NO_ERROR)
+        if (lSystemLayer.PostEvent(*ep, kInetEvent_TCPDataSent, (uintptr_t) len) != CHIP_NO_ERROR)
             res = ERR_ABRT;
     }
     else
@@ -2326,7 +2326,7 @@
         ep->mLwIPEndPointType = kLwIPEndPointType_Unknown;
 
         // Post callback to HandleError.
-        INET_ERROR err = chip::System::MapErrorLwIP(lwipErr);
+        CHIP_ERROR err = chip::System::MapErrorLwIP(lwipErr);
         lSystemLayer.PostEvent(*ep, kInetEvent_TCPError, (uintptr_t) err);
     }
 }
@@ -2335,14 +2335,14 @@
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-INET_ERROR TCPEndPoint::BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intfId)
+CHIP_ERROR TCPEndPoint::BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intfId)
 {
     // If we are trying to make a TCP connection over a 'specified target interface',
     // then we bind the TCPEndPoint to an IP address on that target interface
     // and use that address as the source address for that connection. This is
     // done in the event that directly binding the connection to the target
     // interface is not allowed due to insufficient privileges.
-    VerifyOrReturnError(State != kState_Bound, INET_ERROR_NOT_SUPPORTED);
+    VerifyOrReturnError(State != kState_Bound, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE);
 
     bool ipAddrFound = false;
     for (InterfaceAddressIterator addrIter; addrIter.HasCurrent(); addrIter.Next())
@@ -2384,12 +2384,12 @@
         }
     }
 
-    VerifyOrReturnError(ipAddrFound, INET_ERROR_NOT_SUPPORTED);
+    VerifyOrReturnError(ipAddrFound, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE);
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-INET_ERROR TCPEndPoint::GetSocket(IPAddressType addrType)
+CHIP_ERROR TCPEndPoint::GetSocket(IPAddressType addrType)
 {
     if (!mSocket.HasFD())
     {
@@ -2432,9 +2432,9 @@
 #endif // defined(SO_NOSIGPIPE)
     }
     else if (mAddrType != addrType)
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 // static
@@ -2469,7 +2469,7 @@
             socklen_t optLen = sizeof(osConRes);
             if (getsockopt(mSocket.GetFD(), SOL_SOCKET, SO_ERROR, &osConRes, &optLen) != 0)
                 osConRes = errno;
-            INET_ERROR conRes = chip::System::MapErrorPOSIX(osConRes);
+            CHIP_ERROR conRes = chip::System::MapErrorPOSIX(osConRes);
 
             // Process the connection result.
             HandleConnectComplete(conRes);
@@ -2518,7 +2518,7 @@
 
     if (rcvBuf.IsNull())
     {
-        DoClose(INET_ERROR_NO_MEMORY, false);
+        DoClose(CHIP_ERROR_NO_MEMORY, false);
         return;
     }
 
@@ -2526,11 +2526,11 @@
     ssize_t rcvLen = recv(mSocket.GetFD(), rcvBuf->Start() + rcvBuf->DataLength(), rcvBuf->AvailableDataLength(), 0);
 
 #if INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT
-    INET_ERROR err;
+    CHIP_ERROR err;
     bool isProgressing = false;
 
     err = CheckConnectionProgress(isProgressing);
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         DoClose(err, false);
 
@@ -2629,7 +2629,7 @@
 
 void TCPEndPoint::HandleIncomingConnection()
 {
-    INET_ERROR err      = INET_NO_ERROR;
+    CHIP_ERROR err      = CHIP_NO_ERROR;
     TCPEndPoint * conEP = nullptr;
     IPAddress peerAddr;
     uint16_t peerPort;
@@ -2649,11 +2649,11 @@
         err = chip::System::MapErrorPOSIX(errno);
 
     // If there's no callback available, fail with an error.
-    if (err == INET_NO_ERROR && OnConnectionReceived == nullptr)
-        err = INET_ERROR_NO_CONNECTION_HANDLER;
+    if (err == CHIP_NO_ERROR && OnConnectionReceived == nullptr)
+        err = CHIP_ERROR_NO_CONNECTION_HANDLER;
 
     // Extract the peer's address information.
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         if (sa.any.sa_family == AF_INET6)
         {
@@ -2668,11 +2668,11 @@
         }
 #endif // INET_CONFIG_ENABLE_IPV4
         else
-            err = INET_ERROR_INCORRECT_STATE;
+            err = CHIP_ERROR_INCORRECT_STATE;
     }
 
     // Attempt to allocate an end point object.
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         InetLayer & lInetLayer = Layer();
 
@@ -2680,7 +2680,7 @@
     }
 
     // If all went well...
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         // Put the new end point into the Connected state.
         conEP->mSocket.Attach(conSocket);
@@ -2721,7 +2721,7 @@
  *  This function probes the TCP output queue and checks if data is successfully
  *  being transferred to the other end.
  */
-INET_ERROR TCPEndPoint::CheckConnectionProgress(bool & isProgressing)
+CHIP_ERROR TCPEndPoint::CheckConnectionProgress(bool & isProgressing)
 {
     int currPendingBytesRaw = 0;
     uint32_t currPendingBytes; // Will be initialized once we know it's safe.
@@ -2735,7 +2735,7 @@
 
     if (!CanCastTo<uint32_t>(currPendingBytesRaw))
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
     currPendingBytes = static_cast<uint32_t>(currPendingBytesRaw);
@@ -2760,7 +2760,7 @@
 
     mLastTCPKernelSendQueueLen = currPendingBytes;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT
 
diff --git a/src/inet/TCPEndPoint.h b/src/inet/TCPEndPoint.h
index c53d2c2..2f42d6b 100644
--- a/src/inet/TCPEndPoint.h
+++ b/src/inet/TCPEndPoint.h
@@ -99,9 +99,9 @@
      * @param[in]   port        the TCP port
      * @param[in]   reuseAddr   option to share binding with other endpoints
      *
-     * @retval  INET_NO_ERROR               success: endpoint bound to address
-     * @retval  INET_ERROR_INCORRECT_STATE  endpoint has been bound previously
-     * @retval  INET_NO_MEMORY              insufficient memory for endpoint
+     * @retval  CHIP_NO_ERROR               success: endpoint bound to address
+     * @retval  CHIP_ERROR_INCORRECT_STATE  endpoint has been bound previously
+     * @retval  CHIP_ERROR_NO_MEMORY        insufficient memory for endpoint
      *
      * @retval  INET_ERROR_WRONG_PROTOCOL_TYPE
      *      \c addrType does not match \c IPVer.
@@ -118,15 +118,15 @@
      *  On LwIP, this method must not be called with the LwIP stack lock
      *  already acquired.
      */
-    INET_ERROR Bind(IPAddressType addrType, const IPAddress & addr, uint16_t port, bool reuseAddr = false);
+    CHIP_ERROR Bind(IPAddressType addrType, const IPAddress & addr, uint16_t port, bool reuseAddr = false);
 
     /**
      * @brief   Prepare the endpoint to receive TCP messages.
      *
      * @param[in]   backlog     maximum depth of connection acceptance queue
      *
-     * @retval  INET_NO_ERROR   success: endpoint ready to receive messages.
-     * @retval  INET_ERROR_INCORRECT_STATE  endpoint is already listening.
+     * @retval  CHIP_NO_ERROR   success: endpoint ready to receive messages.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  endpoint is already listening.
      *
      * @details
      *  If \c State is already \c kState_Listening, then no operation is
@@ -140,7 +140,7 @@
      *  On LwIP systems, this method must not be called with the LwIP stack
      *  lock already acquired
      */
-    INET_ERROR Listen(uint16_t backlog);
+    CHIP_ERROR Listen(uint16_t backlog);
 
     /**
      * @brief   Initiate a TCP connection.
@@ -149,8 +149,8 @@
      * @param[in]   port        the destination TCP port
      * @param[in]   intfId      an optional network interface indicator
      *
-     * @retval  INET_NO_ERROR       success: \c msg is queued for transmit.
-     * @retval  INET_ERROR_NOT_IMPLEMENTED  system implementation not complete.
+     * @retval  CHIP_NO_ERROR       success: \c msg is queued for transmit.
+     * @retval  CHIP_ERROR_NOT_IMPLEMENTED  system implementation not complete.
      *
      * @retval  INET_ERROR_WRONG_ADDRESS_TYPE
      *      the destination address and the bound interface address do not
@@ -164,7 +164,7 @@
      *      destination \c addr (with \c intfId used as the scope
      *      identifier for IPv6 link-local destinations) and \c port.
      */
-    INET_ERROR Connect(const IPAddress & addr, uint16_t port, InterfaceId intfId = INET_NULL_INTERFACEID);
+    CHIP_ERROR Connect(const IPAddress & addr, uint16_t port, InterfaceId intfId = INET_NULL_INTERFACEID);
 
     /**
      * @brief   Extract IP address and TCP port of remote endpoint.
@@ -172,14 +172,14 @@
      * @param[out]  retAddr     IP address of remote endpoint.
      * @param[out]  retPort     TCP port of remote endpoint.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
-     * @retval  INET_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
      *
      * @details
      *  Do not use \c NULL pointer values for either argument.
      */
-    INET_ERROR GetPeerInfo(IPAddress * retAddr, uint16_t * retPort) const;
+    CHIP_ERROR GetPeerInfo(IPAddress * retAddr, uint16_t * retPort) const;
 
     /**
      * @brief   Extract IP address and TCP port of local endpoint.
@@ -187,25 +187,25 @@
      * @param[out]  retAddr     IP address of local endpoint.
      * @param[out]  retPort     TCP port of local endpoint.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
-     * @retval  INET_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
      *
      * @details
      *  Do not use \c NULL pointer values for either argument.
      */
-    INET_ERROR GetLocalInfo(IPAddress * retAddr, uint16_t * retPort);
+    CHIP_ERROR GetLocalInfo(IPAddress * retAddr, uint16_t * retPort);
 
     /**
      * @brief   Extract the interface id of the TCP endpoint.
      *
      * @param[out]  retInterface  The interface id.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
-     * @retval  INET_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
      */
-    INET_ERROR GetInterfaceId(InterfaceId * retInterface);
+    CHIP_ERROR GetInterfaceId(InterfaceId * retInterface);
 
     /**
      * @brief   Send message text on TCP connection.
@@ -213,10 +213,10 @@
      * @param[out]  data    Message text to send.
      * @param[out]  push    If \c true, then send immediately, otherwise queue.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
      */
-    INET_ERROR Send(chip::System::PacketBufferHandle && data, bool push = true);
+    CHIP_ERROR Send(chip::System::PacketBufferHandle && data, bool push = true);
 
     /**
      * @brief   Disable reception.
@@ -239,7 +239,7 @@
     /**
      *  @brief EnableNoDelay
      */
-    INET_ERROR EnableNoDelay();
+    CHIP_ERROR EnableNoDelay();
 
     /**
      * @brief
@@ -254,10 +254,10 @@
      *    The maximum number of unacknowledged probes before the connection will be deemed
      *    to have failed.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
-     * @retval  INET_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
-     * @retval  INET_ERROR_NOT_IMPLEMENTED  system implementation not complete.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
+     * @retval  CHIP_ERROR_NOT_IMPLEMENTED  system implementation not complete.
      *
      * @retval  other                   another system or platform error
      *
@@ -275,27 +275,27 @@
      *
      *  See RFC 1122, section 4.2.3.6 for specification details.
      */
-    INET_ERROR EnableKeepAlive(uint16_t interval, uint16_t timeoutCount);
+    CHIP_ERROR EnableKeepAlive(uint16_t interval, uint16_t timeoutCount);
 
     /**
      * @brief   Disable the TCP "keep-alive" option.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
-     * @retval  INET_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
-     * @retval  INET_ERROR_NOT_IMPLEMENTED  system implementation not complete.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
+     * @retval  CHIP_ERROR_NOT_IMPLEMENTED  system implementation not complete.
      *
      * @retval  other                   another system or platform error
      */
-    INET_ERROR DisableKeepAlive();
+    CHIP_ERROR DisableKeepAlive();
 
     /**
      * @brief   Set the TCP TCP_USER_TIMEOUT socket option.
      *
      * @param[in]   userTimeoutMillis    Tcp user timeout value in milliseconds.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_NOT_IMPLEMENTED  system implementation not complete.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_NOT_IMPLEMENTED  system implementation not complete.
      *
      * @retval  other                   another system or platform error
      *
@@ -307,37 +307,37 @@
      *  TCP will to use the system default.
      *  See RFC 5482, for further details.
      */
-    INET_ERROR SetUserTimeout(uint32_t userTimeoutMillis);
+    CHIP_ERROR SetUserTimeout(uint32_t userTimeoutMillis);
 
     /**
      * @brief   Acknowledge receipt of message text.
      *
      * @param[in]   len     number of bytes to acknowledge.
      *
-     * @retval  INET_NO_ERROR           success: reception acknowledged.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
-     * @retval  INET_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
+     * @retval  CHIP_NO_ERROR           success: reception acknowledged.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_ERROR_CONNECTION_ABORTED   TCP connection no longer open.
      *
      * @details
      *  Use this method to acknowledge reception of all or part of the data
      *  received. The operational semantics are undefined if \c len is larger
      *  than the total outstanding unacknowledged received data.
      */
-    INET_ERROR AckReceive(uint16_t len);
+    CHIP_ERROR AckReceive(uint16_t len);
 
     /**
      * @brief   Set the receive queue, for testing.
      *
      * @param[out]  data    Message text to push.
      *
-     * @retval  INET_NO_ERROR           success: reception acknowledged.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_NO_ERROR           success: reception acknowledged.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
      *
      * @details
      *  This method may only be called by data reception event handlers to
      *  put data on the receive queue for unit test purposes.
      */
-    INET_ERROR SetReceivedDataForTesting(chip::System::PacketBufferHandle && data);
+    CHIP_ERROR SetReceivedDataForTesting(chip::System::PacketBufferHandle && data);
 
     /**
      * @brief   Extract the length of the data awaiting first transmit.
@@ -357,23 +357,23 @@
     /**
      * @brief   Initiate TCP half close, in other words, finished with sending.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
      *
      * @retval  other                   another system or platform error
      */
-    INET_ERROR Shutdown();
+    CHIP_ERROR Shutdown();
 
     /**
      * @brief   Initiate TCP full close, in other words, finished with both send and
      *  receive.
      *
-     * @retval  INET_NO_ERROR           success: address and port extracted.
-     * @retval  INET_ERROR_INCORRECT_STATE  TCP connection not established.
+     * @retval  CHIP_NO_ERROR           success: address and port extracted.
+     * @retval  CHIP_ERROR_INCORRECT_STATE  TCP connection not established.
      *
      * @retval  other                   another system or platform error
      */
-    INET_ERROR Close();
+    CHIP_ERROR Close();
 
     /**
      * @brief   Abortively close the endpoint, in other words, send RST packets.
@@ -428,14 +428,14 @@
      * @brief   Type of connection establishment event handling function.
      *
      * @param[in]   endPoint    The TCP endpoint associated with the event.
-     * @param[in]   err         \c INET_NO_ERROR if success, else another code.
+     * @param[in]   err         \c CHIP_NO_ERROR if success, else another code.
      *
      * @details
      *  Provide a function of this type to the \c OnConnectComplete delegate
      *  member to process connection establishment events on \c endPoint. The
      *  \c err argument distinguishes successful connections from failures.
      */
-    typedef void (*OnConnectCompleteFunct)(TCPEndPoint * endPoint, INET_ERROR err);
+    typedef void (*OnConnectCompleteFunct)(TCPEndPoint * endPoint, CHIP_ERROR err);
 
     /**
      * The endpoint's connection establishment event handling function
@@ -449,7 +449,7 @@
      * @param[in]   endPoint        The TCP endpoint associated with the event.
      * @param[in]   data            The data received.
      *
-     * @retval      INET_NO_ERROR   If the received data can be handled by higher layers.
+     * @retval      CHIP_NO_ERROR   If the received data can be handled by higher layers.
      * @retval      other           If the received data can not be used, and higher layers will not see it.
      *
      * @details
@@ -460,7 +460,7 @@
      *  If this function returns an error, the connection will be closed, since higher layers
      *  are not able to process the data for a better response.
      */
-    typedef INET_ERROR (*OnDataReceivedFunct)(TCPEndPoint * endPoint, chip::System::PacketBufferHandle && data);
+    typedef CHIP_ERROR (*OnDataReceivedFunct)(TCPEndPoint * endPoint, chip::System::PacketBufferHandle && data);
 
     /**
      * The endpoint's message text reception event handling function delegate.
@@ -491,14 +491,14 @@
      * @brief   Type of connection establishment event handling function.
      *
      * @param[in]   endPoint    The TCP endpoint associated with the event.
-     * @param[in]   err         \c INET_NO_ERROR if success, else another code.
+     * @param[in]   err         \c CHIP_NO_ERROR if success, else another code.
      *
      * @details
      *  Provide a function of this type to the \c OnConnectionClosed delegate
      *  member to process connection termination events on \c endPoint. The
      *  \c err argument distinguishes successful terminations from failures.
      */
-    typedef void (*OnConnectionClosedFunct)(TCPEndPoint * endPoint, INET_ERROR err);
+    typedef void (*OnConnectionClosedFunct)(TCPEndPoint * endPoint, CHIP_ERROR err);
 
     /** The endpoint's close event handling function delegate. */
     OnConnectionClosedFunct OnConnectionClosed;
@@ -548,7 +548,7 @@
      *  member to process connection acceptance error events on \c endPoint. The
      *  \c err argument provides specific detail about the type of the error.
      */
-    typedef void (*OnAcceptErrorFunct)(TCPEndPoint * endPoint, INET_ERROR err);
+    typedef void (*OnAcceptErrorFunct)(TCPEndPoint * endPoint, CHIP_ERROR err);
 
     /**
      * The endpoint's connection acceptance event handling function delegate.
@@ -612,7 +612,7 @@
 
     bool mUserTimeoutTimerRunning; // Indicates whether the TCP UserTimeout timer has been started.
 
-    static void TCPUserTimeoutHandler(chip::System::Layer * aSystemLayer, void * aAppState, chip::System::Error aError);
+    static void TCPUserTimeoutHandler(chip::System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError);
 
     void StartTCPUserTimeoutTimer();
 
@@ -632,7 +632,7 @@
 
     uint32_t mLastTCPKernelSendQueueLen; // This is the measured size(in bytes) of the kernel TCP send queue
                                          // at the end of the last user timeout window.
-    INET_ERROR CheckConnectionProgress(bool & IsProgressing);
+    CHIP_ERROR CheckConnectionProgress(bool & IsProgressing);
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
 #endif // INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT
@@ -642,14 +642,14 @@
     ~TCPEndPoint();                   // not defined
 
     void Init(InetLayer * inetLayer);
-    INET_ERROR DriveSending();
+    CHIP_ERROR DriveSending();
     void DriveReceiving();
-    void HandleConnectComplete(INET_ERROR err);
-    void HandleAcceptError(INET_ERROR err);
-    INET_ERROR DoClose(INET_ERROR err, bool suppressCallback);
+    void HandleConnectComplete(CHIP_ERROR err);
+    void HandleAcceptError(CHIP_ERROR err);
+    CHIP_ERROR DoClose(CHIP_ERROR err, bool suppressCallback);
     static bool IsConnected(int state);
 
-    static void TCPConnectTimeoutHandler(chip::System::Layer * aSystemLayer, void * aAppState, chip::System::Error aError);
+    static void TCPConnectTimeoutHandler(chip::System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError);
 
     void StartConnectTimerIfSet();
     void StopConnectTimer();
@@ -672,11 +672,11 @@
 
     uint16_t RemainingToSend();
     BufferOffset FindStartOfUnsent();
-    INET_ERROR GetPCB(IPAddressType addrType);
+    CHIP_ERROR GetPCB(IPAddressType addrType);
     void HandleDataSent(uint16_t len);
     void HandleDataReceived(chip::System::PacketBufferHandle && buf);
     void HandleIncomingConnection(TCPEndPoint * pcb);
-    void HandleError(INET_ERROR err);
+    void HandleError(CHIP_ERROR err);
 
     static err_t LwIPHandleConnectComplete(void * arg, struct tcp_pcb * tpcb, err_t lwipErr);
     static err_t LwIPHandleIncomingConnection(void * arg, struct tcp_pcb * tcpConPCB, err_t lwipErr);
@@ -687,11 +687,11 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-    INET_ERROR GetSocket(IPAddressType addrType);
+    CHIP_ERROR GetSocket(IPAddressType addrType);
     void HandlePendingIO();
     void ReceiveData();
     void HandleIncomingConnection();
-    INET_ERROR BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intfId);
+    CHIP_ERROR BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intfId);
     static void HandlePendingIO(System::WatchableSocket & socket);
 
 #if CHIP_SYSTEM_CONFIG_USE_DISPATCH
diff --git a/src/inet/UDPEndPoint.cpp b/src/inet/UDPEndPoint.cpp
index 0af8042..df06a51 100644
--- a/src/inet/UDPEndPoint.cpp
+++ b/src/inet/UDPEndPoint.cpp
@@ -87,9 +87,9 @@
  *   udp_bind_netif(aUDP, intfId);
  *
  */
-static INET_ERROR LwIPBindInterface(struct udp_pcb * aUDP, InterfaceId intfId)
+static CHIP_ERROR LwIPBindInterface(struct udp_pcb * aUDP, InterfaceId intfId)
 {
-    INET_ERROR res = INET_NO_ERROR;
+    CHIP_ERROR res = CHIP_NO_ERROR;
 
 #if HAVE_LWIP_UDP_BIND_NETIF
     if (!IsInterfaceIdPresent(intfId))
@@ -129,9 +129,9 @@
  * @param[in]   port        the UDP port
  * @param[in]   intfId      an optional network interface indicator
  *
- * @retval  INET_NO_ERROR               success: endpoint bound to address
- * @retval  INET_ERROR_INCORRECT_STATE  endpoint has been bound previously
- * @retval  INET_NO_MEMORY              insufficient memory for endpoint
+ * @retval  CHIP_NO_ERROR               success: endpoint bound to address
+ * @retval  CHIP_ERROR_INCORRECT_STATE  endpoint has been bound previously
+ * @retval  CHIP_ERROR_NO_MEMORY        insufficient memory for endpoint
  *
  * @retval  INET_ERROR_UNKNOWN_INTERFACE
  *      On some platforms, the optionally specified interface is not
@@ -152,11 +152,11 @@
  *  On LwIP, this method must not be called with the LwIP stack lock
  *  already acquired.
  */
-INET_ERROR UDPEndPoint::Bind(IPAddressType addrType, const IPAddress & addr, uint16_t port, InterfaceId intfId)
+CHIP_ERROR UDPEndPoint::Bind(IPAddressType addrType, const IPAddress & addr, uint16_t port, InterfaceId intfId)
 {
     if (mState != kState_Ready && mState != kState_Bound)
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
     if ((addr != IPAddress::Any) && (addr.Type() != kIPAddressType_Any) && (addr.Type() != addrType))
@@ -170,10 +170,10 @@
     LOCK_TCPIP_CORE();
 
     // Make sure we have the appropriate type of PCB.
-    INET_ERROR res = GetPCB(addrType);
+    CHIP_ERROR res = GetPCB(addrType);
 
     // Bind the PCB to the specified address/port.
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
 #if LWIP_VERSION_MAJOR > 1 || LWIP_VERSION_MINOR >= 5
         ip_addr_t ipAddr = addr.ToLwIPAddr();
@@ -200,7 +200,7 @@
 #endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR >= 5
     }
 
-    if (res == INET_NO_ERROR)
+    if (res == CHIP_NO_ERROR)
     {
         res = LwIPBindInterface(mUDP, intfId);
     }
@@ -252,7 +252,7 @@
         unsigned long fd = static_cast<unsigned long>(mSocket.GetFD());
 
         mReadableSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, dispatchQueue);
-        ReturnErrorCodeIf(mReadableSource == nullptr, INET_ERROR_NO_MEMORY);
+        ReturnErrorCodeIf(mReadableSource == nullptr, CHIP_ERROR_NO_MEMORY);
 
         dispatch_source_set_event_handler(mReadableSource, ^{
             this->mSocket.SetPendingIO(System::SocketEventFlags::kRead);
@@ -271,7 +271,7 @@
 
     if (intfId != INET_NULL_INTERFACEID)
     {
-        return INET_ERROR_NOT_IMPLEMENTED;
+        return CHIP_ERROR_NOT_IMPLEMENTED;
     }
 
     configure_tls = NW_PARAMETERS_DISABLE_PROTOCOL;
@@ -285,7 +285,7 @@
 
     mState = kState_Bound;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -295,8 +295,8 @@
  * @param[in]  onReceiveError      The endpoint's receive error event handling function delegate.
  * @param[in]  appState            Application state pointer.
  *
- * @retval  INET_NO_ERROR   success: endpoint ready to receive messages.
- * @retval  INET_ERROR_INCORRECT_STATE  endpoint is already listening.
+ * @retval  CHIP_NO_ERROR   success: endpoint ready to receive messages.
+ * @retval  CHIP_ERROR_INCORRECT_STATE  endpoint is already listening.
  *
  * @details
  *  If \c State is already \c kState_Listening, then no operation is
@@ -307,16 +307,16 @@
  *  On LwIP, this method must not be called with the LwIP stack lock
  *  already acquired
  */
-INET_ERROR UDPEndPoint::Listen(OnMessageReceivedFunct onMessageReceived, OnReceiveErrorFunct onReceiveError, void * appState)
+CHIP_ERROR UDPEndPoint::Listen(OnMessageReceivedFunct onMessageReceived, OnReceiveErrorFunct onReceiveError, void * appState)
 {
     if (mState == kState_Listening)
     {
-        return INET_NO_ERROR;
+        return CHIP_NO_ERROR;
     }
 
     if (mState != kState_Bound)
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
     OnMessageReceived = onMessageReceived;
@@ -354,7 +354,7 @@
     mSocket.RequestCallbackOnPendingRead();
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -442,7 +442,7 @@
 /**
  *  A synonym for <tt>SendTo(addr, port, INET_NULL_INTERFACEID, msg, sendFlags)</tt>.
  */
-INET_ERROR UDPEndPoint::SendTo(const IPAddress & addr, uint16_t port, chip::System::PacketBufferHandle && msg, uint16_t sendFlags)
+CHIP_ERROR UDPEndPoint::SendTo(const IPAddress & addr, uint16_t port, chip::System::PacketBufferHandle && msg, uint16_t sendFlags)
 {
     return SendTo(addr, port, INET_NULL_INTERFACEID, std::move(msg), sendFlags);
 }
@@ -456,19 +456,19 @@
  * @param[in]   msg         the packet buffer containing the UDP message
  * @param[in]   sendFlags   optional transmit option flags
  *
- * @retval  INET_NO_ERROR       success: \c msg is queued for transmit.
+ * @retval  CHIP_NO_ERROR       success: \c msg is queued for transmit.
  *
- * @retval  INET_ERROR_NOT_SUPPORTED
+ * @retval  CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *      the system does not support the requested operation.
  *
  * @retval  INET_ERROR_WRONG_ADDRESS_TYPE
  *      the destination address and the bound interface address do not
  *      have matching protocol versions or address type.
  *
- * @retval  INET_ERROR_MESSAGE_TOO_LONG
+ * @retval  CHIP_ERROR_MESSAGE_TOO_LONG
  *      \c msg does not contain the whole UDP message.
  *
- * @retval  INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED
+ * @retval  CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG
  *      On some platforms, only a truncated portion of \c msg was queued
  *      for transmit.
  *
@@ -481,7 +481,7 @@
  *      identifier for IPv6 link-local destinations) and \c port with the
  *      transmit option flags encoded in \c sendFlags.
  */
-INET_ERROR UDPEndPoint::SendTo(const IPAddress & addr, uint16_t port, InterfaceId intfId, chip::System::PacketBufferHandle && msg,
+CHIP_ERROR UDPEndPoint::SendTo(const IPAddress & addr, uint16_t port, InterfaceId intfId, chip::System::PacketBufferHandle && msg,
                                uint16_t sendFlags)
 {
     IPPacketInfo pktInfo;
@@ -499,20 +499,20 @@
  * @param[in]   msg         a packet buffer containing the UDP message
  * @param[in]   sendFlags   optional transmit option flags
  *
- * @retval  INET_NO_ERROR
+ * @retval  CHIP_NO_ERROR
  *      success: \c msg is queued for transmit.
  *
- * @retval  INET_ERROR_NOT_SUPPORTED
+ * @retval  CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *      the system does not support the requested operation.
  *
  * @retval  INET_ERROR_WRONG_ADDRESS_TYPE
  *      the destination address and the bound interface address do not
  *      have matching protocol versions or address type.
  *
- * @retval  INET_ERROR_MESSAGE_TOO_LONG
+ * @retval  CHIP_ERROR_MESSAGE_TOO_LONG
  *      \c msg does not contain the whole UDP message.
  *
- * @retval  INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED
+ * @retval  CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG
  *      On some platforms, only a truncated portion of \c msg was queued
  *      for transmit.
  *
@@ -525,13 +525,13 @@
  *      over the specified interface.  If \c pktInfo contains a source address, the
  *      given address will be used as the source of the UDP message.
  */
-INET_ERROR UDPEndPoint::SendMsg(const IPPacketInfo * pktInfo, System::PacketBufferHandle && msg, uint16_t sendFlags)
+CHIP_ERROR UDPEndPoint::SendMsg(const IPPacketInfo * pktInfo, System::PacketBufferHandle && msg, uint16_t sendFlags)
 {
-    INET_ERROR res             = INET_NO_ERROR;
+    CHIP_ERROR res             = CHIP_NO_ERROR;
     const IPAddress & destAddr = pktInfo->DestAddress;
 
     INET_FAULT_INJECT(FaultInjection::kFault_Send, return INET_ERROR_UNKNOWN_INTERFACE;);
-    INET_FAULT_INJECT(FaultInjection::kFault_SendNonCritical, return INET_ERROR_NO_MEMORY;);
+    INET_FAULT_INJECT(FaultInjection::kFault_SendNonCritical, return CHIP_ERROR_NO_MEMORY;);
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
@@ -543,7 +543,7 @@
         // msg into a fresh object in this case, and queues that for transmission, leaving
         // the original msg available after return.
         msg = msg.CloneData();
-        VerifyOrExit(!msg.IsNull(), res = INET_ERROR_NO_MEMORY);
+        VerifyOrExit(!msg.IsNull(), res = CHIP_ERROR_NO_MEMORY);
     }
 
     // Lock LwIP stack
@@ -668,9 +668,9 @@
  *
  * @param[in]   intfId      indicator of the network interface.
  *
- * @retval  INET_NO_ERROR               success: endpoint bound to address
- * @retval  INET_NO_MEMORY              insufficient memory for endpoint
- * @retval  INET_ERROR_NOT_IMPLEMENTED  system implementation not complete.
+ * @retval  CHIP_NO_ERROR               success: endpoint bound to address
+ * @retval  CHIP_ERROR_NO_MEMORY        insufficient memory for endpoint
+ * @retval  CHIP_ERROR_NOT_IMPLEMENTED  system implementation not complete.
  *
  * @retval  INET_ERROR_UNKNOWN_INTERFACE
  *      On some platforms, the interface is not present.
@@ -683,11 +683,11 @@
  *  On LwIP, this method must not be called with the LwIP stack lock
  *  already acquired.
  */
-INET_ERROR UDPEndPoint::BindInterface(IPAddressType addrType, InterfaceId intfId)
+CHIP_ERROR UDPEndPoint::BindInterface(IPAddressType addrType, InterfaceId intfId)
 {
     if (mState != kState_Ready && mState != kState_Bound)
     {
-        return INET_ERROR_INCORRECT_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
     }
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
@@ -698,9 +698,9 @@
     LOCK_TCPIP_CORE();
 
     // Make sure we have the appropriate type of PCB.
-    INET_ERROR err = GetPCB(addrType);
+    CHIP_ERROR err = GetPCB(addrType);
 
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         err = LwIPBindInterface(mUDP, intfId);
     }
@@ -723,7 +723,7 @@
 
     mState = kState_Bound;
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void UDPEndPoint::Init(InetLayer * inetLayer)
@@ -778,7 +778,7 @@
     IPEndPointBasis::HandleDataReceived(std::move(msg));
 }
 
-INET_ERROR UDPEndPoint::GetPCB(IPAddressType addrType)
+CHIP_ERROR UDPEndPoint::GetPCB(IPAddressType addrType)
 {
     // IMPORTANT: This method MUST be called with the LwIP stack LOCKED!
 
@@ -813,7 +813,7 @@
         if (mUDP == NULL)
         {
             ChipLogError(Inet, "Unable to allocate UDP PCB");
-            return INET_ERROR_NO_MEMORY;
+            return CHIP_ERROR_NO_MEMORY;
         }
 
         // Allow multiple bindings to the same port.
@@ -852,7 +852,7 @@
         VerifyOrReturnError(addrType == pcbAddrType, INET_ERROR_WRONG_ADDRESS_TYPE);
     }
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 #if LWIP_VERSION_MAJOR > 1 || LWIP_VERSION_MINOR >= 5
@@ -898,7 +898,7 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-INET_ERROR UDPEndPoint::GetSocket(IPAddressType aAddressType)
+CHIP_ERROR UDPEndPoint::GetSocket(IPAddressType aAddressType)
 {
     constexpr int lType     = (SOCK_DGRAM | SOCK_FLAGS);
     constexpr int lProtocol = 0;
diff --git a/src/inet/UDPEndPoint.h b/src/inet/UDPEndPoint.h
index 5747deb..b2549a1 100644
--- a/src/inet/UDPEndPoint.h
+++ b/src/inet/UDPEndPoint.h
@@ -56,15 +56,15 @@
     friend class InetLayer;
 
 public:
-    INET_ERROR Bind(IPAddressType addrType, const IPAddress & addr, uint16_t port, InterfaceId intfId = INET_NULL_INTERFACEID);
-    INET_ERROR BindInterface(IPAddressType addrType, InterfaceId intfId);
+    CHIP_ERROR Bind(IPAddressType addrType, const IPAddress & addr, uint16_t port, InterfaceId intfId = INET_NULL_INTERFACEID);
+    CHIP_ERROR BindInterface(IPAddressType addrType, InterfaceId intfId);
     InterfaceId GetBoundInterface();
     uint16_t GetBoundPort();
-    INET_ERROR Listen(OnMessageReceivedFunct onMessageReceived, OnReceiveErrorFunct onReceiveError, void * appState = nullptr);
-    INET_ERROR SendTo(const IPAddress & addr, uint16_t port, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
-    INET_ERROR SendTo(const IPAddress & addr, uint16_t port, InterfaceId intfId, chip::System::PacketBufferHandle && msg,
+    CHIP_ERROR Listen(OnMessageReceivedFunct onMessageReceived, OnReceiveErrorFunct onReceiveError, void * appState = nullptr);
+    CHIP_ERROR SendTo(const IPAddress & addr, uint16_t port, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
+    CHIP_ERROR SendTo(const IPAddress & addr, uint16_t port, InterfaceId intfId, chip::System::PacketBufferHandle && msg,
                       uint16_t sendFlags = 0);
-    INET_ERROR SendMsg(const IPPacketInfo * pktInfo, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
+    CHIP_ERROR SendMsg(const IPPacketInfo * pktInfo, chip::System::PacketBufferHandle && msg, uint16_t sendFlags = 0);
     void Close();
     void Free();
 
@@ -79,7 +79,7 @@
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     void HandleDataReceived(chip::System::PacketBufferHandle && msg);
-    INET_ERROR GetPCB(IPAddressType addrType4);
+    CHIP_ERROR GetPCB(IPAddressType addrType4);
 #if LWIP_VERSION_MAJOR > 1 || LWIP_VERSION_MINOR >= 5
     static void LwIPReceiveUDPMessage(void * arg, struct udp_pcb * pcb, struct pbuf * p, const ip_addr_t * addr, u16_t port);
 #else  // LWIP_VERSION_MAJOR <= 1 && LWIP_VERSION_MINOR < 5
@@ -90,7 +90,7 @@
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
     uint16_t mBoundPort;
 
-    INET_ERROR GetSocket(IPAddressType addrType);
+    CHIP_ERROR GetSocket(IPAddressType addrType);
     void HandlePendingIO();
     static void HandlePendingIO(System::WatchableSocket & socket);
 
diff --git a/src/inet/tests/TestInetCommon.h b/src/inet/tests/TestInetCommon.h
index 7bd68f0..958a451 100644
--- a/src/inet/tests/TestInetCommon.h
+++ b/src/inet/tests/TestInetCommon.h
@@ -60,7 +60,7 @@
 void InitTestInetCommon();
 void InitSystemLayer();
 void ShutdownSystemLayer();
-void InetFailError(int32_t err, const char * msg);
+void InetFailError(CHIP_ERROR err, const char * msg);
 
 void InitNetwork();
 void ServiceEvents(struct ::timeval & aSleepTime);
diff --git a/src/inet/tests/TestInetCommonPosix.cpp b/src/inet/tests/TestInetCommonPosix.cpp
index 95dd561..5c2d178 100644
--- a/src/inet/tests/TestInetCommonPosix.cpp
+++ b/src/inet/tests/TestInetCommonPosix.cpp
@@ -117,9 +117,9 @@
 char gDefaultTapDeviceName[32];
 bool gDone = false;
 
-void InetFailError(int32_t err, const char * msg)
+void InetFailError(CHIP_ERROR err, const char * msg)
 {
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         fprintf(stderr, "%s: %s\n", msg, ErrorStr(err));
         exit(-1);
diff --git a/src/inet/tests/TestInetEndPoint.cpp b/src/inet/tests/TestInetEndPoint.cpp
index adde861..4547b50 100644
--- a/src/inet/tests/TestInetEndPoint.cpp
+++ b/src/inet/tests/TestInetEndPoint.cpp
@@ -59,7 +59,7 @@
 
 bool callbackHandlerCalled = false;
 
-void HandleDNSResolveComplete(void * appState, INET_ERROR err, uint8_t addrCount, IPAddress * addrArray)
+void HandleDNSResolveComplete(void * appState, CHIP_ERROR err, uint8_t addrCount, IPAddress * addrArray)
 {
     callbackHandlerCalled = true;
 
@@ -73,7 +73,7 @@
         printf("    DNS name resolution return no addresses\n");
 }
 
-void HandleTimer(Layer * aLayer, void * aAppState, Error aError)
+void HandleTimer(Layer * aLayer, void * aAppState, CHIP_ERROR aError)
 {
     printf("    timer handler\n");
 }
@@ -90,7 +90,7 @@
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT
     TCPEndPoint * testTCPEP = nullptr;
 #endif // INET_CONFIG_ENABLE_TCP_ENDPOINT
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 #if INET_CONFIG_ENABLE_DNS_RESOLVER
     IPAddress testDestAddr = IPAddress::Any;
     char testHostName[20]  = "www.nest.com";
@@ -98,25 +98,25 @@
 
 #if INET_CONFIG_ENABLE_RAW_ENDPOINT
     err = gInet.NewRawEndPoint(kIPVersion_6, kIPProtocol_ICMPv6, &testRawEP);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
 #endif // INET_CONFIG_ENABLE_RAW_ENDPOINT
 
 #if INET_CONFIG_ENABLE_UDP_ENDPOINT
     err = gInet.NewUDPEndPoint(&testUDPEP);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
 #endif // INET_CONFIG_ENABLE_UDP_ENDPOINT
 
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT
     err = gInet.NewTCPEndPoint(&testTCPEP);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
 #endif // INET_CONFIG_ENABLE_TCP_ENDPOINT
 
     err = gSystemLayer.StartTimer(10, HandleTimer, nullptr);
-    NL_TEST_ASSERT(inSuite, err == CHIP_SYSTEM_ERROR_UNEXPECTED_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
 
 #if INET_CONFIG_ENABLE_DNS_RESOLVER
     err = gInet.ResolveHostAddress(testHostName, 1, &testDestAddr, HandleDNSResolveComplete, nullptr);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
 #endif // INET_CONFIG_ENABLE_DNS_RESOLVER
 
     // then init network
@@ -134,7 +134,7 @@
     char testHostName4[260];
     struct timeval sleepTime;
     IPAddress testDestAddr[1] = { IPAddress::Any };
-    INET_ERROR err;
+    CHIP_ERROR err;
 
     sleepTime.tv_sec  = 0;
     sleepTime.tv_usec = 10000;
@@ -144,9 +144,9 @@
 
     callbackHandlerCalled = false;
     err = gInet.ResolveHostAddress(testHostName1, 1, testDestAddr, HandleDNSResolveComplete, &callbackHandlerCalled);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         while (!callbackHandlerCalled)
         {
@@ -156,9 +156,9 @@
 
     callbackHandlerCalled = false;
     err = gInet.ResolveHostAddress(testHostName2, 1, testDestAddr, HandleDNSResolveComplete, &callbackHandlerCalled);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         while (!callbackHandlerCalled)
         {
@@ -168,9 +168,9 @@
 
     callbackHandlerCalled = false;
     err = gInet.ResolveHostAddress(testHostName3, 1, testDestAddr, HandleDNSResolveComplete, &callbackHandlerCalled);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         while (!callbackHandlerCalled)
         {
@@ -179,7 +179,7 @@
     }
 
     err = gInet.ResolveHostAddress(testHostName2, 0, testDestAddr, HandleDNSResolveComplete, &callbackHandlerCalled);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_NO_MEMORY);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_NO_MEMORY);
 
     err = gInet.ResolveHostAddress(testHostName4, 1, testDestAddr, HandleDNSResolveComplete, &callbackHandlerCalled);
     NL_TEST_ASSERT(inSuite, err == INET_ERROR_HOST_NAME_TOO_LONG);
@@ -197,12 +197,12 @@
     const char * host;
     const char * intf;
     uint16_t port, hostlen, intflen;
-    INET_ERROR err;
+    CHIP_ERROR err;
 
     for (char * correctHostName : correctHostNames)
     {
         err = ParseHostPortAndInterface(correctHostName, uint16_t(strlen(correctHostName)), host, hostlen, port, intf, intflen);
-        NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+        NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
     }
     for (char * invalidHostName : invalidHostNames)
     {
@@ -213,7 +213,7 @@
 
 static void TestInetError(nlTestSuite * inSuite, void * inContext)
 {
-    INET_ERROR err = INET_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     err = MapErrorPOSIX(EPERM);
     NL_TEST_ASSERT(inSuite, DescribeErrorPOSIX(err));
@@ -228,22 +228,22 @@
     InterfaceId intId;
     IPAddress addr;
     IPPrefix addrWithPrefix;
-    INET_ERROR err;
+    CHIP_ERROR err;
 
     err = InterfaceNameToId("0", intId);
-    NL_TEST_ASSERT(inSuite, err != INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR);
 
     err = GetInterfaceName(INET_NULL_INTERFACEID, intName, 0);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_NO_MEMORY);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_NO_MEMORY);
 
     err = GetInterfaceName(INET_NULL_INTERFACEID, intName, sizeof(intName));
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR && intName[0] == '\0');
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR && intName[0] == '\0');
 
     err = gInet.GetInterfaceFromAddr(addr, intId);
     NL_TEST_ASSERT(inSuite, intId == INET_NULL_INTERFACEID);
 
     err = gInet.GetLinkLocalAddr(intId, nullptr);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_BAD_ARGS);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_ARGUMENT);
 
     printf("    Interfaces:\n");
     for (; intIterator.HasCurrent(); intIterator.Next())
@@ -252,7 +252,7 @@
         NL_TEST_ASSERT(inSuite, intId != INET_NULL_INTERFACEID);
         memset(intName, 42, sizeof(intName));
         err = intIterator.GetInterfaceName(intName, sizeof(intName));
-        NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+        NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
         printf("     interface id: 0x%" PRIxPTR ", interface name: %s, interface state: %s, %s multicast, %s broadcast addr\n",
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
                reinterpret_cast<uintptr_t>(intId),
@@ -267,7 +267,7 @@
     }
     NL_TEST_ASSERT(inSuite, !intIterator.Next());
     NL_TEST_ASSERT(inSuite, intIterator.GetInterface() == INET_NULL_INTERFACEID);
-    NL_TEST_ASSERT(inSuite, intIterator.GetInterfaceName(intName, sizeof(intName)) == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, intIterator.GetInterfaceName(intName, sizeof(intName)) == CHIP_ERROR_INCORRECT_STATE);
     NL_TEST_ASSERT(inSuite, !intIterator.SupportsMulticast());
     NL_TEST_ASSERT(inSuite, !intIterator.HasBroadcastAddress());
 
@@ -282,7 +282,7 @@
         NL_TEST_ASSERT(inSuite, intId != INET_NULL_INTERFACEID);
         memset(intName, 42, sizeof(intName));
         err = addrIterator.GetInterfaceName(intName, sizeof(intName));
-        NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+        NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
         NL_TEST_ASSERT(inSuite, intName[0] != '\0' && memchr(intName, '\0', sizeof(intName)) != nullptr);
         printf("     %s/%d, interface id: 0x%" PRIxPTR
                ", interface name: %s, interface state: %s, %s multicast, %s broadcast addr\n",
@@ -299,14 +299,14 @@
     addrIterator.GetAddressWithPrefix(addrWithPrefix);
     NL_TEST_ASSERT(inSuite, addrWithPrefix.IsZero());
     NL_TEST_ASSERT(inSuite, addrIterator.GetInterface() == INET_NULL_INTERFACEID);
-    NL_TEST_ASSERT(inSuite, addrIterator.GetInterfaceName(intName, sizeof(intName)) == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, addrIterator.GetInterfaceName(intName, sizeof(intName)) == CHIP_ERROR_INCORRECT_STATE);
     NL_TEST_ASSERT(inSuite, !addrIterator.SupportsMulticast());
     NL_TEST_ASSERT(inSuite, !addrIterator.HasBroadcastAddress());
 }
 
 static void TestInetEndPointInternal(nlTestSuite * inSuite, void * inContext)
 {
-    INET_ERROR err;
+    CHIP_ERROR err;
     IPAddress addr_any = IPAddress::Any;
     IPAddress addr;
 #if INET_CONFIG_ENABLE_IPV4
@@ -327,23 +327,23 @@
 
     // init all the EndPoints
     err = gInet.NewRawEndPoint(kIPVersion_6, kIPProtocol_ICMPv6, &testRaw6EP);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
 #if INET_CONFIG_ENABLE_IPV4
     err = gInet.NewRawEndPoint(kIPVersion_4, kIPProtocol_ICMPv4, &testRaw4EP);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 #endif // INET_CONFIG_ENABLE_IPV4
 
     err = gInet.NewUDPEndPoint(&testUDPEP);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
     err = gInet.NewTCPEndPoint(&testTCPEP1);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
     err = gInet.GetLinkLocalAddr(INET_NULL_INTERFACEID, &addr);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
     err = gInet.GetInterfaceFromAddr(addr, intId);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
     // RawEndPoint special cases to cover the error branch
     uint8_t ICMP6Types[2] = { 128, 129 };
@@ -361,40 +361,40 @@
     NL_TEST_ASSERT(inSuite, err == INET_ERROR_WRONG_ADDRESS_TYPE);
 #endif // INET_CONFIG_ENABLE_IPV4
     err = testRaw6EP->BindInterface(kIPAddressType_Unknown, INET_NULL_INTERFACEID);
-    NL_TEST_ASSERT(inSuite, err != INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR);
 
     // A bind should succeed with appropriate permissions but will
     // otherwise fail.
 
     err = testRaw6EP->BindIPv6LinkLocal(intId, addr);
-    NL_TEST_ASSERT(inSuite, (err == INET_NO_ERROR) || (err == System::MapErrorPOSIX(EPERM)));
+    NL_TEST_ASSERT(inSuite, (err == CHIP_NO_ERROR) || (err == System::MapErrorPOSIX(EPERM)));
 
-    didBind = (err == INET_NO_ERROR);
+    didBind = (err == CHIP_NO_ERROR);
 
     // Listen after bind should succeed if the prior bind succeeded.
 
     err = testRaw6EP->Listen(nullptr /*OnMessageReceived*/, nullptr /*OnReceiveError*/);
-    NL_TEST_ASSERT(inSuite, (didBind && (err == INET_NO_ERROR)) || (!didBind && (err == INET_ERROR_INCORRECT_STATE)));
+    NL_TEST_ASSERT(inSuite, (didBind && (err == CHIP_NO_ERROR)) || (!didBind && (err == CHIP_ERROR_INCORRECT_STATE)));
 
-    didListen = (err == INET_NO_ERROR);
+    didListen = (err == CHIP_NO_ERROR);
 
     // If the first listen succeeded, then the second listen should be successful.
 
     err = testRaw6EP->Listen(nullptr /*OnMessageReceived*/, nullptr /*OnReceiveError*/);
-    NL_TEST_ASSERT(inSuite, (didBind && didListen && (err == INET_NO_ERROR)) || (!didBind && (err == INET_ERROR_INCORRECT_STATE)));
+    NL_TEST_ASSERT(inSuite, (didBind && didListen && (err == CHIP_NO_ERROR)) || (!didBind && (err == CHIP_ERROR_INCORRECT_STATE)));
 
-    didListen = (err == INET_NO_ERROR);
+    didListen = (err == CHIP_NO_ERROR);
 
     // A bind-after-listen should result in an incorrect state error;
     // otherwise, it will fail with a permissions error.
 
     err = testRaw6EP->Bind(kIPAddressType_IPv6, addr);
     NL_TEST_ASSERT(inSuite,
-                   (didListen && (err == INET_ERROR_INCORRECT_STATE)) || (!didListen && (err == System::MapErrorPOSIX(EPERM))));
+                   (didListen && (err == CHIP_ERROR_INCORRECT_STATE)) || (!didListen && (err == System::MapErrorPOSIX(EPERM))));
 
     // error SetICMPFilter case
     err = testRaw6EP->SetICMPFilter(0, ICMP6Types);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_BAD_ARGS);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_ARGUMENT);
 
 #if INET_CONFIG_ENABLE_IPV4
     // We should never be able to send an IPv4-addressed message on an
@@ -413,7 +413,7 @@
 
     // UdpEndPoint special cases to cover the error branch
     err = testUDPEP->Listen(nullptr /*OnMessageReceived*/, nullptr /*OnReceiveError*/);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     err = testUDPEP->Bind(kIPAddressType_Unknown, addr_any, 3000);
     NL_TEST_ASSERT(inSuite, err == INET_ERROR_WRONG_ADDRESS_TYPE);
     err = testUDPEP->Bind(kIPAddressType_Unknown, addr, 3000);
@@ -431,16 +431,16 @@
     err = testUDPEP->Listen(nullptr /*OnMessageReceived*/, nullptr /*OnReceiveError*/);
     err = testUDPEP->Listen(nullptr /*OnMessageReceived*/, nullptr /*OnReceiveError*/);
     err = testUDPEP->Bind(kIPAddressType_IPv6, addr, 3000, intId);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     err = testUDPEP->BindInterface(kIPAddressType_IPv6, intId);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     testUDPEP->Free();
 
     err = gInet.NewUDPEndPoint(&testUDPEP);
-    NL_TEST_ASSERT(inSuite, err == INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 #if INET_CONFIG_ENABLE_IPV4
     err = testUDPEP->Bind(kIPAddressType_IPv4, addr_v4, 3000, intId);
-    NL_TEST_ASSERT(inSuite, err != INET_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR);
     buf = PacketBufferHandle::New(PacketBuffer::kMaxSize);
     err = testUDPEP->SendTo(addr_v4, 3000, std::move(buf));
     testUDPEP->Free();
@@ -448,21 +448,21 @@
 
     // TcpEndPoint special cases to cover the error branch
     err = testTCPEP1->GetPeerInfo(nullptr, nullptr);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     buf = PacketBufferHandle::New(PacketBuffer::kMaxSize);
     err = testTCPEP1->Send(std::move(buf), false);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     err = testTCPEP1->EnableKeepAlive(10, 100);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     err = testTCPEP1->DisableKeepAlive();
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     err = testTCPEP1->AckReceive(10);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     NL_TEST_ASSERT(inSuite, !testTCPEP1->PendingReceiveLength());
     err = testTCPEP1->Listen(4);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     err = testTCPEP1->GetLocalInfo(nullptr, nullptr);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
 
     err = testTCPEP1->Bind(kIPAddressType_Unknown, addr_any, 3000, true);
     NL_TEST_ASSERT(inSuite, err == INET_ERROR_WRONG_ADDRESS_TYPE);
@@ -475,11 +475,11 @@
 
     err = testTCPEP1->Bind(kIPAddressType_IPv6, addr_any, 3000, true);
     err = testTCPEP1->Bind(kIPAddressType_IPv6, addr_any, 3000, true);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
     err = testTCPEP1->Listen(4);
 #if INET_CONFIG_ENABLE_IPV4
     err = testTCPEP1->Connect(addr_v4, 4000, intId);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_INCORRECT_STATE);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);
 #endif // INET_CONFIG_ENABLE_IPV4
 
     testTCPEP1->Shutdown();
@@ -491,31 +491,31 @@
     RawEndPoint * testRawEP = nullptr;
     UDPEndPoint * testUDPEP = nullptr;
     TCPEndPoint * testTCPEP = nullptr;
-    INET_ERROR err;
+    CHIP_ERROR err;
     char numTimersTest[CHIP_SYSTEM_CONFIG_NUM_TIMERS + 1];
 
     for (int i = 0; i < INET_CONFIG_NUM_RAW_ENDPOINTS + 1; i++)
         err = gInet.NewRawEndPoint(kIPVersion_6, kIPProtocol_ICMPv6, &testRawEP);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_NO_ENDPOINTS);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_ENDPOINT_POOL_FULL);
 
     for (int i = 0; i < INET_CONFIG_NUM_UDP_ENDPOINTS + 1; i++)
         err = gInet.NewUDPEndPoint(&testUDPEP);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_NO_ENDPOINTS);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_ENDPOINT_POOL_FULL);
 
     for (int i = 0; i < INET_CONFIG_NUM_TCP_ENDPOINTS + 1; i++)
         err = gInet.NewTCPEndPoint(&testTCPEP);
-    NL_TEST_ASSERT(inSuite, err == INET_ERROR_NO_ENDPOINTS);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_ENDPOINT_POOL_FULL);
 
     // Verify same aComplete and aAppState args do not exhaust timer pool
     for (int i = 0; i < CHIP_SYSTEM_CONFIG_NUM_TIMERS + 1; i++)
     {
         err = gSystemLayer.StartTimer(10, HandleTimer, nullptr);
-        NL_TEST_ASSERT(inSuite, err == CHIP_SYSTEM_NO_ERROR);
+        NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
     }
 
     for (int i = 0; i < CHIP_SYSTEM_CONFIG_NUM_TIMERS + 1; i++)
         err = gSystemLayer.StartTimer(10, HandleTimer, &numTimersTest[i]);
-    NL_TEST_ASSERT(inSuite, err == CHIP_SYSTEM_ERROR_NO_MEMORY);
+    NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_NO_MEMORY);
 
     ShutdownNetwork();
     ShutdownSystemLayer();
diff --git a/src/inet/tests/TestInetErrorStr.cpp b/src/inet/tests/TestInetErrorStr.cpp
index fa95072..ff3dd20 100644
--- a/src/inet/tests/TestInetErrorStr.cpp
+++ b/src/inet/tests/TestInetErrorStr.cpp
@@ -51,28 +51,16 @@
 static int32_t sContext[] =
 {
     INET_ERROR_WRONG_ADDRESS_TYPE,
-    INET_ERROR_CONNECTION_ABORTED,
     INET_ERROR_PEER_DISCONNECTED,
-    INET_ERROR_INCORRECT_STATE,
-    INET_ERROR_MESSAGE_TOO_LONG,
-    INET_ERROR_NO_CONNECTION_HANDLER,
-    INET_ERROR_NO_MEMORY,
-    INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED,
-    INET_ERROR_INBOUND_MESSAGE_TOO_BIG,
     INET_ERROR_HOST_NOT_FOUND,
     INET_ERROR_DNS_TRY_AGAIN,
     INET_ERROR_DNS_NO_RECOVERY,
-    INET_ERROR_BAD_ARGS,
     INET_ERROR_WRONG_PROTOCOL_TYPE,
     INET_ERROR_UNKNOWN_INTERFACE,
-    INET_ERROR_NOT_IMPLEMENTED,
     INET_ERROR_ADDRESS_NOT_FOUND,
     INET_ERROR_HOST_NAME_TOO_LONG,
     INET_ERROR_INVALID_HOST_NAME,
-    INET_ERROR_NOT_SUPPORTED,
-    INET_ERROR_NO_ENDPOINTS,
     INET_ERROR_IDLE_TIMEOUT,
-    INET_ERROR_UNEXPECTED_EVENT,
     INET_ERROR_INVALID_IPV6_PKT,
     INET_ERROR_INTERFACE_INIT_FAILURE,
     INET_ERROR_TCP_USER_TIMEOUT,
diff --git a/src/inet/tests/TestInetLayer.cpp b/src/inet/tests/TestInetLayer.cpp
index 1317ec5..d26b72d 100644
--- a/src/inet/tests/TestInetLayer.cpp
+++ b/src/inet/tests/TestInetLayer.cpp
@@ -236,7 +236,7 @@
 int main(int argc, char * argv[])
 {
     bool lSuccessful = true;
-    INET_ERROR lStatus;
+    CHIP_ERROR lStatus;
 
     InitTestInetCommon();
 
@@ -269,7 +269,7 @@
     if (gInterfaceName != nullptr)
     {
         lStatus = InterfaceNameToId(gInterfaceName, gInterfaceId);
-        if (lStatus != INET_NO_ERROR)
+        if (lStatus != CHIP_NO_ERROR)
         {
             PrintArgError("%s: unknown network interface %s\n", kToolName, gInterfaceName);
             lSuccessful = false;
@@ -522,11 +522,11 @@
 
 // TCP Endpoint Callbacks
 
-void HandleTCPConnectionComplete(TCPEndPoint * aEndPoint, INET_ERROR aError)
+void HandleTCPConnectionComplete(TCPEndPoint * aEndPoint, CHIP_ERROR aError)
 {
-    INET_ERROR lStatus;
+    CHIP_ERROR lStatus;
 
-    if (aError == INET_NO_ERROR)
+    if (aError == CHIP_NO_ERROR)
     {
         IPAddress lPeerAddress;
         uint16_t lPeerPort;
@@ -564,9 +564,9 @@
     }
 }
 
-static void HandleTCPConnectionClosed(TCPEndPoint * aEndPoint, INET_ERROR aError)
+static void HandleTCPConnectionClosed(TCPEndPoint * aEndPoint, CHIP_ERROR aError)
 {
-    if (aError == INET_NO_ERROR)
+    if (aError == CHIP_NO_ERROR)
     {
         printf("TCP connection closed\n");
     }
@@ -587,7 +587,7 @@
 
 static void HandleTCPDataSent(TCPEndPoint * aEndPoint, uint16_t len) {}
 
-static INET_ERROR HandleTCPDataReceived(TCPEndPoint * aEndPoint, PacketBufferHandle && aBuffer)
+static CHIP_ERROR HandleTCPDataReceived(TCPEndPoint * aEndPoint, PacketBufferHandle && aBuffer)
 {
     const uint32_t lFirstValueReceived = sTestState.mStats.mReceive.mActual;
     const uint8_t lFirstValue          = uint8_t(lFirstValueReceived);
@@ -596,13 +596,13 @@
     uint16_t lPeerPort;
     char lPeerAddressBuffer[INET6_ADDRSTRLEN];
     bool lCheckPassed;
-    INET_ERROR lStatus = INET_NO_ERROR;
+    CHIP_ERROR lStatus = CHIP_NO_ERROR;
 
     // Check that we did not lose information in our narrowing cast.
-    VerifyOrExit(lFirstValue == lFirstValueReceived, lStatus = INET_ERROR_UNEXPECTED_EVENT);
+    VerifyOrExit(lFirstValue == lFirstValueReceived, lStatus = CHIP_ERROR_UNEXPECTED_EVENT);
 
-    VerifyOrExit(aEndPoint != nullptr, lStatus = INET_ERROR_BAD_ARGS);
-    VerifyOrExit(!aBuffer.IsNull(), lStatus = INET_ERROR_BAD_ARGS);
+    VerifyOrExit(aEndPoint != nullptr, lStatus = CHIP_ERROR_INVALID_ARGUMENT);
+    VerifyOrExit(!aBuffer.IsNull(), lStatus = CHIP_ERROR_INVALID_ARGUMENT);
 
     if (aEndPoint->State != TCPEndPoint::kState_Connected)
     {
@@ -620,20 +620,20 @@
            static_cast<size_t>(aBuffer->DataLength()));
 
     lCheckPassed = HandleDataReceived(aBuffer, lCheckBuffer, lFirstValue);
-    VerifyOrExit(lCheckPassed == true, lStatus = INET_ERROR_UNEXPECTED_EVENT);
+    VerifyOrExit(lCheckPassed == true, lStatus = CHIP_ERROR_UNEXPECTED_EVENT);
 
     lStatus = aEndPoint->AckReceive(aBuffer->TotalLength());
     INET_FAIL_ERROR(lStatus, "TCPEndPoint::AckReceive failed");
 
 exit:
-    if (lStatus != INET_NO_ERROR)
+    if (lStatus != CHIP_NO_ERROR)
     {
         SetStatusFailed(sTestState.mStatus);
     }
     return lStatus;
 }
 
-static void HandleTCPAcceptError(TCPEndPoint * aEndPoint, INET_ERROR aError)
+static void HandleTCPAcceptError(TCPEndPoint * aEndPoint, CHIP_ERROR aError)
 {
     printf("TCP accept error: %s\n", ErrorStr(aError));
 
@@ -703,7 +703,7 @@
     }
 }
 
-static void HandleRawReceiveError(IPEndPointBasis * aEndPoint, INET_ERROR aError, const IPPacketInfo * aPacketInfo)
+static void HandleRawReceiveError(IPEndPointBasis * aEndPoint, CHIP_ERROR aError, const IPPacketInfo * aPacketInfo)
 {
     Common::HandleRawReceiveError(aEndPoint, aError, aPacketInfo);
 
@@ -732,7 +732,7 @@
     }
 }
 
-static void HandleUDPReceiveError(IPEndPointBasis * aEndPoint, INET_ERROR aError, const IPPacketInfo * aPacketInfo)
+static void HandleUDPReceiveError(IPEndPointBasis * aEndPoint, CHIP_ERROR aError, const IPPacketInfo * aPacketInfo)
 {
     Common::HandleUDPReceiveError(aEndPoint, aError, aPacketInfo);
 
@@ -774,9 +774,9 @@
     return (lStatus);
 }
 
-static INET_ERROR PrepareTransportForSend()
+static CHIP_ERROR PrepareTransportForSend()
 {
-    INET_ERROR lStatus = INET_NO_ERROR;
+    CHIP_ERROR lStatus = CHIP_NO_ERROR;
 
     if (gOptFlags & kOptFlagUseTCPIP)
     {
@@ -798,7 +798,7 @@
     return (lStatus);
 }
 
-static INET_ERROR DriveSendForDestination(const IPAddress & aAddress, uint16_t aSize)
+static CHIP_ERROR DriveSendForDestination(const IPAddress & aAddress, uint16_t aSize)
 {
     PacketBufferHandle lBuffer;
 
@@ -812,13 +812,13 @@
         if ((gOptFlags & kOptFlagUseIPv6) == (kOptFlagUseIPv6))
         {
             lBuffer = Common::MakeICMPv6DataBuffer(aSize);
-            VerifyOrReturnError(!lBuffer.IsNull(), INET_ERROR_NO_MEMORY);
+            VerifyOrReturnError(!lBuffer.IsNull(), CHIP_ERROR_NO_MEMORY);
         }
 #if INET_CONFIG_ENABLE_IPV4
         else if ((gOptFlags & kOptFlagUseIPv4) == (kOptFlagUseIPv4))
         {
             lBuffer = Common::MakeICMPv4DataBuffer(aSize);
-            VerifyOrReturnError(!lBuffer.IsNull(), INET_ERROR_NO_MEMORY);
+            VerifyOrReturnError(!lBuffer.IsNull(), CHIP_ERROR_NO_MEMORY);
         }
 #endif // INET_CONFIG_ENABLE_IPV4
 
@@ -834,14 +834,14 @@
             // patterned from zero to aSize - 1.
 
             lBuffer = Common::MakeDataBuffer(aSize, lFirstValue);
-            VerifyOrReturnError(!lBuffer.IsNull(), INET_ERROR_NO_MEMORY);
+            VerifyOrReturnError(!lBuffer.IsNull(), CHIP_ERROR_NO_MEMORY);
 
             ReturnErrorOnFailure(sUDPIPEndPoint->SendTo(aAddress, kUDPPort, std::move(lBuffer)));
         }
         else if ((gOptFlags & kOptFlagUseTCPIP) == kOptFlagUseTCPIP)
         {
             const uint32_t lFirstValue = sTestState.mStats.mTransmit.mActual;
-            VerifyOrReturnError(lFirstValue < 256u, INET_ERROR_UNEXPECTED_EVENT);
+            VerifyOrReturnError(lFirstValue < 256u, CHIP_ERROR_UNEXPECTED_EVENT);
 
             // For TCP, we'll send one byte stream of
             // sTestState.mStats.mTransmit.mExpected in n aSize or
@@ -849,18 +849,18 @@
             // sTestState.mStats.mTransmit.mExpected - 1.
 
             lBuffer = Common::MakeDataBuffer(aSize, uint8_t(lFirstValue));
-            VerifyOrReturnError(!lBuffer.IsNull(), INET_ERROR_NO_MEMORY);
+            VerifyOrReturnError(!lBuffer.IsNull(), CHIP_ERROR_NO_MEMORY);
 
             ReturnErrorOnFailure(sTCPIPEndPoint->Send(std::move(lBuffer)));
         }
     }
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void DriveSend()
 {
-    INET_ERROR lStatus = INET_NO_ERROR;
+    CHIP_ERROR lStatus = CHIP_NO_ERROR;
 
     if (!Common::IsSender())
         goto exit;
@@ -897,7 +897,7 @@
     }
 
 exit:
-    if (lStatus != INET_NO_ERROR)
+    if (lStatus != CHIP_NO_ERROR)
     {
         SetStatusFailed(sTestState.mStatus);
     }
@@ -909,7 +909,7 @@
     IPProtocol lIPProtocol       = kIPProtocol_ICMPv6;
     IPVersion lIPVersion         = kIPVersion_6;
     IPAddress lAddress           = chip::Inet::IPAddress::Any;
-    INET_ERROR lStatus;
+    CHIP_ERROR lStatus;
 
     if (!gNetworkOptions.LocalIPv6Addr.empty())
         lAddress = gNetworkOptions.LocalIPv6Addr[0];
@@ -1011,7 +1011,7 @@
 
 static void CleanupTest()
 {
-    INET_ERROR lStatus;
+    CHIP_ERROR lStatus;
 
     gSendIntervalExpired = false;
     gSystemLayer.CancelTimer(Common::HandleSendTimerComplete, nullptr);
diff --git a/src/inet/tests/TestInetLayerCommon.cpp b/src/inet/tests/TestInetLayerCommon.cpp
index 13300ae..b908f9b 100644
--- a/src/inet/tests/TestInetLayerCommon.cpp
+++ b/src/inet/tests/TestInetLayerCommon.cpp
@@ -340,7 +340,7 @@
 
 // Timer Callback Handler
 
-void HandleSendTimerComplete(System::Layer * aSystemLayer, void * aAppState, System::Error aError)
+void HandleSendTimerComplete(System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError)
 {
     INET_FAIL_ERROR(aError, "Send timer completed with error");
 
@@ -364,7 +364,7 @@
            static_cast<size_t>(aBuffer->DataLength()));
 }
 
-void HandleRawReceiveError(const IPEndPointBasis * aEndPoint, const INET_ERROR & aError, const IPPacketInfo * aPacketInfo)
+void HandleRawReceiveError(const IPEndPointBasis * aEndPoint, const CHIP_ERROR & aError, const IPPacketInfo * aPacketInfo)
 {
     char lAddressBuffer[INET6_ADDRSTRLEN];
 
@@ -395,7 +395,7 @@
            lDestinationAddressBuffer, aPacketInfo->DestPort, static_cast<size_t>(aBuffer->DataLength()));
 }
 
-void HandleUDPReceiveError(const IPEndPointBasis * aEndPoint, const INET_ERROR & aError, const IPPacketInfo * aPacketInfo)
+void HandleUDPReceiveError(const IPEndPointBasis * aEndPoint, const CHIP_ERROR & aError, const IPPacketInfo * aPacketInfo)
 {
     char lAddressBuffer[INET6_ADDRSTRLEN];
     uint16_t lSourcePort;
diff --git a/src/inet/tests/TestInetLayerCommon.hpp b/src/inet/tests/TestInetLayerCommon.hpp
index b59e2e9..59c5cc0 100644
--- a/src/inet/tests/TestInetLayerCommon.hpp
+++ b/src/inet/tests/TestInetLayerCommon.hpp
@@ -145,14 +145,14 @@
 
 // Timer Callback Handler
 
-extern void HandleSendTimerComplete(chip::System::Layer * aSystemLayer, void * aAppState, chip::System::Error aError);
+extern void HandleSendTimerComplete(chip::System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError);
 
 // Raw Endpoint Callback Handlers
 
 extern void HandleRawMessageReceived(const chip::Inet::IPEndPointBasis * aEndPoint,
                                      const chip::System::PacketBufferHandle & aBuffer,
                                      const chip::Inet::IPPacketInfo * aPacketInfo);
-extern void HandleRawReceiveError(const chip::Inet::IPEndPointBasis * aEndPoint, const INET_ERROR & aError,
+extern void HandleRawReceiveError(const chip::Inet::IPEndPointBasis * aEndPoint, const CHIP_ERROR & aError,
                                   const chip::Inet::IPPacketInfo * aPacketInfo);
 
 // UDP Endpoint Callback Handlers
@@ -160,7 +160,7 @@
 extern void HandleUDPMessageReceived(const chip::Inet::IPEndPointBasis * aEndPoint,
                                      const chip::System::PacketBufferHandle & aBuffer,
                                      const chip::Inet::IPPacketInfo * aPacketInfo);
-extern void HandleUDPReceiveError(const chip::Inet::IPEndPointBasis * aEndPoint, const INET_ERROR & aError,
+extern void HandleUDPReceiveError(const chip::Inet::IPEndPointBasis * aEndPoint, const CHIP_ERROR & aError,
                                   const chip::Inet::IPPacketInfo * aPacketInfo);
 
 } // namespace Common
diff --git a/src/inet/tests/TestInetLayerDNS.cpp b/src/inet/tests/TestInetLayerDNS.cpp
index 281d7a2..4691e34 100644
--- a/src/inet/tests/TestInetLayerDNS.cpp
+++ b/src/inet/tests/TestInetLayerDNS.cpp
@@ -66,7 +66,7 @@
     const char * hostName;
     uint8_t dnsOptions;
     uint8_t maxResults;
-    INET_ERROR expectErr;
+    CHIP_ERROR expectErr;
     bool expectIPv4Addrs;
     bool expectIPv6Addrs;
 };
@@ -81,7 +81,7 @@
 
 static void RunTestCase(nlTestSuite * testSuite, const DNSResolutionTestCase & testCase);
 static void StartTestCase(DNSResolutionTestContext & testContext);
-static void HandleResolutionComplete(void * appState, INET_ERROR err, uint8_t addrCount, IPAddress * addrArray);
+static void HandleResolutionComplete(void * appState, CHIP_ERROR err, uint8_t addrCount, IPAddress * addrArray);
 static void ServiceNetworkUntilDone(uint32_t timeoutMS);
 static void HandleSIGUSR1(int sig);
 
@@ -100,7 +100,7 @@
             "ipv4.google.com",
             kDNSOption_Default,
             kMaxResults,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             false
         }
@@ -113,7 +113,7 @@
             "ipv6.google.com",
             kDNSOption_Default,
             kMaxResults,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             false,
             true
         }
@@ -126,7 +126,7 @@
             "google.com",
             kDNSOption_Default,
             kMaxResults,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             true
         }
@@ -151,7 +151,7 @@
             "google.com",
             kDNSOption_AddrFamily_IPv4Only,
             kMaxResults,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             false
         }
@@ -165,7 +165,7 @@
             "google.com",
             kDNSOption_AddrFamily_IPv6Only,
             kMaxResults,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             false,
             true
         }
@@ -179,7 +179,7 @@
             "google.com",
             kDNSOption_AddrFamily_IPv4Preferred,
             kMaxResults,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             true
         }
@@ -193,7 +193,7 @@
             "google.com",
             kDNSOption_AddrFamily_IPv6Preferred,
             kMaxResults,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             true
         }
@@ -218,7 +218,7 @@
             "google.com",
             kDNSOption_AddrFamily_IPv4Only,
             2,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             false
         }
@@ -232,7 +232,7 @@
             "google.com",
             kDNSOption_AddrFamily_IPv6Only,
             2,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             false,
             true
         }
@@ -247,7 +247,7 @@
             "google.com",
             kDNSOption_AddrFamily_IPv4Preferred,
             2,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             true
         }
@@ -262,7 +262,7 @@
             "google.com",
             kDNSOption_AddrFamily_IPv6Preferred,
             2,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             true
         }
@@ -357,7 +357,7 @@
             "216.58.194.174",
             kDNSOption_AddrFamily_Any,
             1,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             true,
             false
         }
@@ -369,7 +369,7 @@
             "2607:f8b0:4005:804::200e",
             kDNSOption_AddrFamily_Any,
             1,
-            INET_NO_ERROR,
+            CHIP_NO_ERROR,
             false,
             true
         }
@@ -407,7 +407,7 @@
 static void TestDNSResolution_Cancel(nlTestSuite * testSuite, void * inContext)
 {
     DNSResolutionTestContext testContext{
-        testSuite, DNSResolutionTestCase{ "www.google.com", kDNSOption_Default, kMaxResults, INET_NO_ERROR, true, false }
+        testSuite, DNSResolutionTestCase{ "www.google.com", kDNSOption_Default, kMaxResults, CHIP_NO_ERROR, true, false }
     };
 
     // Start DNS resolution.
@@ -444,7 +444,7 @@
                 "www.nest.com",
                 kDNSOption_Default,
                 kMaxResults,
-                INET_NO_ERROR,
+                CHIP_NO_ERROR,
                 true,
                 false
             }
@@ -456,7 +456,7 @@
                 "10.0.0.1",
                 kDNSOption_Default,
                 kMaxResults,
-                INET_NO_ERROR,
+                CHIP_NO_ERROR,
                 true,
                 false
             }
@@ -468,7 +468,7 @@
                 "www.google.com",
                 kDNSOption_Default,
                 kMaxResults,
-                INET_NO_ERROR,
+                CHIP_NO_ERROR,
                 true,
                 true
             }
@@ -480,7 +480,7 @@
                 "pool.ntp.org",
                 kDNSOption_Default,
                 kMaxResults,
-                INET_NO_ERROR,
+                CHIP_NO_ERROR,
                 true,
                 false
             }
@@ -523,7 +523,7 @@
 
 static void StartTestCase(DNSResolutionTestContext & testContext)
 {
-    INET_ERROR err                   = INET_NO_ERROR;
+    CHIP_ERROR err                   = CHIP_NO_ERROR;
     DNSResolutionTestCase & testCase = testContext.testCase;
     nlTestSuite * testSuite          = testContext.testSuite;
 
@@ -534,7 +534,7 @@
     err = gInet.ResolveHostAddress(testCase.hostName, strlen(testCase.hostName), testCase.dnsOptions, testCase.maxResults,
                                    testContext.resultsBuf, HandleResolutionComplete, &testContext);
 
-    if (err != INET_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         printf("ResolveHostAddress failed for %s: %s\n", testCase.hostName, ::chip::ErrorStr(err));
 
@@ -552,13 +552,13 @@
     }
 }
 
-static void HandleResolutionComplete(void * appState, INET_ERROR err, uint8_t addrCount, IPAddress * addrArray)
+static void HandleResolutionComplete(void * appState, CHIP_ERROR err, uint8_t addrCount, IPAddress * addrArray)
 {
     DNSResolutionTestContext & testContext = *static_cast<DNSResolutionTestContext *>(appState);
     DNSResolutionTestCase & testCase       = testContext.testCase;
     nlTestSuite * testSuite                = testContext.testSuite;
 
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         printf("DNS resolution complete for %s: %" PRIu8 " result%s returned\n", testCase.hostName, addrCount,
                (addrCount != 1) ? "s" : "");
@@ -577,7 +577,7 @@
     // Verify the expected result.
     NL_TEST_ASSERT(testSuite, err == testCase.expectErr);
 
-    if (err == INET_NO_ERROR)
+    if (err == CHIP_NO_ERROR)
     {
         // Make sure the number of addresses is within the max expected.
         NL_TEST_ASSERT(testSuite, addrCount <= testCase.maxResults);
diff --git a/src/inet/tests/TestInetLayerMulticast.cpp b/src/inet/tests/TestInetLayerMulticast.cpp
index fa40b95..ef458af 100644
--- a/src/inet/tests/TestInetLayerMulticast.cpp
+++ b/src/inet/tests/TestInetLayerMulticast.cpp
@@ -263,7 +263,7 @@
 int main(int argc, char * argv[])
 {
     bool lSuccessful = true;
-    INET_ERROR lStatus;
+    CHIP_ERROR lStatus;
 
     InitTestInetCommon();
 
@@ -296,7 +296,7 @@
     if (gInterfaceName != nullptr)
     {
         lStatus = InterfaceNameToId(gInterfaceName, gInterfaceId);
-        if (lStatus != INET_NO_ERROR)
+        if (lStatus != CHIP_NO_ERROR)
         {
             PrintArgError("%s: unknown network interface %s\n", kToolName, gInterfaceName);
             lSuccessful = false;
@@ -665,7 +665,7 @@
     }
 }
 
-static void HandleRawReceiveError(IPEndPointBasis * aEndPoint, INET_ERROR aError, const IPPacketInfo * aPacketInfo)
+static void HandleRawReceiveError(IPEndPointBasis * aEndPoint, CHIP_ERROR aError, const IPPacketInfo * aPacketInfo)
 {
     Common::HandleRawReceiveError(aEndPoint, aError, aPacketInfo);
 
@@ -694,7 +694,7 @@
     }
 }
 
-static void HandleUDPReceiveError(IPEndPointBasis * aEndPoint, INET_ERROR aError, const IPPacketInfo * aPacketInfo)
+static void HandleUDPReceiveError(IPEndPointBasis * aEndPoint, CHIP_ERROR aError, const IPPacketInfo * aPacketInfo)
 {
     Common::HandleUDPReceiveError(aEndPoint, aError, aPacketInfo);
 
@@ -717,14 +717,14 @@
     return (lStatus);
 }
 
-static INET_ERROR PrepareTransportForSend()
+static CHIP_ERROR PrepareTransportForSend()
 {
-    INET_ERROR lStatus = INET_NO_ERROR;
+    CHIP_ERROR lStatus = CHIP_NO_ERROR;
 
     return (lStatus);
 }
 
-static INET_ERROR DriveSendForDestination(const IPAddress & aAddress, uint16_t aSize)
+static CHIP_ERROR DriveSendForDestination(const IPAddress & aAddress, uint16_t aSize)
 {
     PacketBufferHandle lBuffer;
 
@@ -738,13 +738,13 @@
         if ((gOptFlags & kOptFlagUseIPv6) == (kOptFlagUseIPv6))
         {
             lBuffer = Common::MakeICMPv6DataBuffer(aSize);
-            VerifyOrReturnError(!lBuffer.IsNull(), INET_ERROR_NO_MEMORY);
+            VerifyOrReturnError(!lBuffer.IsNull(), CHIP_ERROR_NO_MEMORY);
         }
 #if INET_CONFIG_ENABLE_IPV4
         else if ((gOptFlags & kOptFlagUseIPv4) == (kOptFlagUseIPv4))
         {
             lBuffer = Common::MakeICMPv4DataBuffer(aSize);
-            VerifyOrReturnError(!lBuffer.IsNull(), INET_ERROR_NO_MEMORY);
+            VerifyOrReturnError(!lBuffer.IsNull(), CHIP_ERROR_NO_MEMORY);
         }
 #endif // INET_CONFIG_ENABLE_IPV4
 
@@ -759,15 +759,15 @@
         // patterned from zero to aSize - 1.
 
         lBuffer = Common::MakeDataBuffer(aSize, lFirstValue);
-        VerifyOrReturnError(!lBuffer.IsNull(), INET_ERROR_NO_MEMORY);
+        VerifyOrReturnError(!lBuffer.IsNull(), CHIP_ERROR_NO_MEMORY);
 
         return sUDPIPEndPoint->SendTo(aAddress, kUDPPort, std::move(lBuffer));
     }
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-static INET_ERROR DriveSendForGroup(GroupAddress & aGroupAddress)
+static CHIP_ERROR DriveSendForGroup(GroupAddress & aGroupAddress)
 {
     if (aGroupAddress.mStats.mTransmit.mActual < aGroupAddress.mStats.mTransmit.mExpected)
     {
@@ -779,11 +779,11 @@
                aGroupAddress.mStats.mTransmit.mExpected, aGroupAddress.mGroup);
     }
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 template <size_t tCapacity>
-static INET_ERROR DriveSendForGroups(GroupAddresses<tCapacity> & aGroupAddresses)
+static CHIP_ERROR DriveSendForGroups(GroupAddresses<tCapacity> & aGroupAddresses)
 {
     // Iterate over each multicast group for which this node is a
     // member and send a packet.
@@ -792,12 +792,12 @@
         ReturnErrorOnFailure(DriveSendForGroup(aGroupAddresses.mAddresses[i]));
     }
 
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void DriveSend()
 {
-    INET_ERROR lStatus = INET_NO_ERROR;
+    CHIP_ERROR lStatus = CHIP_NO_ERROR;
 
     if (!Common::IsSender())
         goto exit;
@@ -820,7 +820,7 @@
     }
 
 exit:
-    if (lStatus != INET_NO_ERROR)
+    if (lStatus != CHIP_NO_ERROR)
     {
         SetStatusFailed(sTestState.mStatus);
     }
@@ -834,7 +834,7 @@
     IPAddress lAddress           = IPAddress::Any;
     IPEndPointBasis * lEndPoint  = nullptr;
     const bool lUseLoopback      = ((gOptFlags & kOptFlagNoLoopback) == 0);
-    INET_ERROR lStatus;
+    CHIP_ERROR lStatus;
 
 #if INET_CONFIG_ENABLE_IPV4
     if (gOptFlags & kOptFlagUseIPv4)
@@ -943,7 +943,7 @@
 static void CleanupTest()
 {
     IPEndPointBasis * lEndPoint = nullptr;
-    INET_ERROR lStatus;
+    CHIP_ERROR lStatus;
 
     gSendIntervalExpired = false;
     gSystemLayer.CancelTimer(Common::HandleSendTimerComplete, nullptr);
diff --git a/src/lib/asn1/ASN1.h b/src/lib/asn1/ASN1.h
index e6193b5..03564bf 100644
--- a/src/lib/asn1/ASN1.h
+++ b/src/lib/asn1/ASN1.h
@@ -112,19 +112,19 @@
     bool IsIndefiniteLen(void) const { return IndefiniteLen; };
     bool IsEndOfContents(void) const { return EndOfContents; };
 
-    ASN1_ERROR Next(void);
-    ASN1_ERROR EnterConstructedType(void);
-    ASN1_ERROR ExitConstructedType(void);
-    ASN1_ERROR GetConstructedType(const uint8_t *& val, uint32_t & valLen);
-    ASN1_ERROR EnterEncapsulatedType(void);
-    ASN1_ERROR ExitEncapsulatedType(void);
+    CHIP_ERROR Next(void);
+    CHIP_ERROR EnterConstructedType(void);
+    CHIP_ERROR ExitConstructedType(void);
+    CHIP_ERROR GetConstructedType(const uint8_t *& val, uint32_t & valLen);
+    CHIP_ERROR EnterEncapsulatedType(void);
+    CHIP_ERROR ExitEncapsulatedType(void);
     bool IsContained(void) const;
-    ASN1_ERROR GetInteger(int64_t & val);
-    ASN1_ERROR GetBoolean(bool & val);
-    ASN1_ERROR GetObjectId(OID & oid);
-    ASN1_ERROR GetUTCTime(ASN1UniversalTime & outTime);
-    ASN1_ERROR GetGeneralizedTime(ASN1UniversalTime & outTime);
-    ASN1_ERROR GetBitString(uint32_t & outVal);
+    CHIP_ERROR GetInteger(int64_t & val);
+    CHIP_ERROR GetBoolean(bool & val);
+    CHIP_ERROR GetObjectId(OID & oid);
+    CHIP_ERROR GetUTCTime(ASN1UniversalTime & outTime);
+    CHIP_ERROR GetGeneralizedTime(ASN1UniversalTime & outTime);
+    CHIP_ERROR GetBitString(uint32_t & outVal);
 
 private:
     static constexpr size_t kMaxContextDepth = kMaxConstructedAndEncapsulatedTypesDepth;
@@ -154,10 +154,10 @@
     ASN1ParseContext mSavedContexts[kMaxContextDepth];
     uint32_t mNumSavedContexts;
 
-    ASN1_ERROR DecodeHead(void);
+    CHIP_ERROR DecodeHead(void);
     void ResetElementState(void);
-    ASN1_ERROR EnterContainer(uint32_t offset);
-    ASN1_ERROR ExitContainer(void);
+    CHIP_ERROR EnterContainer(uint32_t offset);
+    CHIP_ERROR ExitContainer(void);
 };
 
 class DLL_EXPORT ASN1Writer
@@ -165,29 +165,29 @@
 public:
     void Init(uint8_t * buf, uint32_t maxLen);
     void InitNullWriter(void);
-    ASN1_ERROR Finalize(void);
+    CHIP_ERROR Finalize(void);
     uint16_t GetLengthWritten(void) const;
 
-    ASN1_ERROR PutInteger(int64_t val);
-    ASN1_ERROR PutBoolean(bool val);
-    ASN1_ERROR PutObjectId(const uint8_t * val, uint16_t valLen);
-    ASN1_ERROR PutObjectId(OID oid);
-    ASN1_ERROR PutString(uint32_t tag, const char * val, uint16_t valLen);
-    ASN1_ERROR PutOctetString(const uint8_t * val, uint16_t valLen);
-    ASN1_ERROR PutOctetString(uint8_t cls, uint32_t tag, const uint8_t * val, uint16_t valLen);
-    ASN1_ERROR PutOctetString(uint8_t cls, uint32_t tag, chip::TLV::TLVReader & val);
-    ASN1_ERROR PutBitString(uint32_t val);
-    ASN1_ERROR PutBitString(uint8_t unusedBits, const uint8_t * val, uint16_t valLen);
-    ASN1_ERROR PutBitString(uint8_t unusedBits, chip::TLV::TLVReader & val);
-    ASN1_ERROR PutTime(const ASN1UniversalTime & val);
-    ASN1_ERROR PutNull(void);
-    ASN1_ERROR PutConstructedType(const uint8_t * val, uint16_t valLen);
-    ASN1_ERROR StartConstructedType(uint8_t cls, uint32_t tag);
-    ASN1_ERROR EndConstructedType(void);
-    ASN1_ERROR StartEncapsulatedType(uint8_t cls, uint32_t tag, bool bitStringEncoding);
-    ASN1_ERROR EndEncapsulatedType(void);
-    ASN1_ERROR PutValue(uint8_t cls, uint32_t tag, bool isConstructed, const uint8_t * val, uint16_t valLen);
-    ASN1_ERROR PutValue(uint8_t cls, uint32_t tag, bool isConstructed, chip::TLV::TLVReader & val);
+    CHIP_ERROR PutInteger(int64_t val);
+    CHIP_ERROR PutBoolean(bool val);
+    CHIP_ERROR PutObjectId(const uint8_t * val, uint16_t valLen);
+    CHIP_ERROR PutObjectId(OID oid);
+    CHIP_ERROR PutString(uint32_t tag, const char * val, uint16_t valLen);
+    CHIP_ERROR PutOctetString(const uint8_t * val, uint16_t valLen);
+    CHIP_ERROR PutOctetString(uint8_t cls, uint32_t tag, const uint8_t * val, uint16_t valLen);
+    CHIP_ERROR PutOctetString(uint8_t cls, uint32_t tag, chip::TLV::TLVReader & val);
+    CHIP_ERROR PutBitString(uint32_t val);
+    CHIP_ERROR PutBitString(uint8_t unusedBits, const uint8_t * val, uint16_t valLen);
+    CHIP_ERROR PutBitString(uint8_t unusedBits, chip::TLV::TLVReader & val);
+    CHIP_ERROR PutTime(const ASN1UniversalTime & val);
+    CHIP_ERROR PutNull(void);
+    CHIP_ERROR PutConstructedType(const uint8_t * val, uint16_t valLen);
+    CHIP_ERROR StartConstructedType(uint8_t cls, uint32_t tag);
+    CHIP_ERROR EndConstructedType(void);
+    CHIP_ERROR StartEncapsulatedType(uint8_t cls, uint32_t tag, bool bitStringEncoding);
+    CHIP_ERROR EndEncapsulatedType(void);
+    CHIP_ERROR PutValue(uint8_t cls, uint32_t tag, bool isConstructed, const uint8_t * val, uint16_t valLen);
+    CHIP_ERROR PutValue(uint8_t cls, uint32_t tag, bool isConstructed, chip::TLV::TLVReader & val);
 
 private:
     static constexpr size_t kMaxDeferredLengthDepth = kMaxConstructedAndEncapsulatedTypesDepth;
@@ -198,8 +198,8 @@
     uint8_t * mDeferredLengthLocations[kMaxDeferredLengthDepth];
     uint8_t mDeferredLengthCount;
 
-    ASN1_ERROR EncodeHead(uint8_t cls, uint32_t tag, bool isConstructed, int32_t len);
-    ASN1_ERROR WriteDeferredLength(void);
+    CHIP_ERROR EncodeHead(uint8_t cls, uint32_t tag, bool isConstructed, int32_t len);
+    CHIP_ERROR WriteDeferredLength(void);
     static uint8_t BytesForLength(int32_t len);
     static void EncodeLength(uint8_t * buf, uint8_t bytesForLen, int32_t lenToEncode);
 };
@@ -211,7 +211,7 @@
 
 const char * GetOIDName(OID oid);
 
-ASN1_ERROR DumpASN1(ASN1Reader & reader, const char * prefix, const char * indent);
+CHIP_ERROR DumpASN1(ASN1Reader & reader, const char * prefix, const char * indent);
 
 inline OID GetOID(OIDCategory category, uint8_t id)
 {
diff --git a/src/lib/asn1/ASN1Config.h b/src/lib/asn1/ASN1Config.h
index 3c40f8c..7cfbf85 100644
--- a/src/lib/asn1/ASN1Config.h
+++ b/src/lib/asn1/ASN1Config.h
@@ -31,31 +31,6 @@
 // clang-format off
 
 /**
- *  @def ASN1_CONFIG_ERROR_TYPE
- *
- *  @brief
- *    This defines the data type used to represent errors for the ASN1
- *    subsystem.
- *
- */
-#ifndef ASN1_CONFIG_ERROR_TYPE
-#include <stdint.h>
-
-#define ASN1_CONFIG_ERROR_TYPE                              int32_t
-#endif // ASN1_CONFIG_ERROR_TYPE
-
-/**
- *  @def ASN1_CONFIG_NO_ERROR
- *
- *  @brief
- *    This defines the ASN1 error code for no error or success.
- *
- */
-#ifndef ASN1_CONFIG_NO_ERROR
-#define ASN1_CONFIG_NO_ERROR                                0
-#endif // ASN1_CONFIG_NO_ERROR
-
-/**
  *  @def ASN1_CONFIG_ERROR_MIN
  *
  *  @brief
@@ -78,15 +53,15 @@
 #endif // ASN1_CONFIG_ERROR_MAX
 
 /**
- *  @def _ASN1_CONFIG_ERROR
+ *  @def ASN1_CONFIG_ERROR
  *
  *  @brief
  *    This defines a mapping function for ASN1 errors that allows
  *    mapping such errors into a platform- or system-specific range.
  *
  */
-#ifndef _ASN1_CONFIG_ERROR
-#define _ASN1_CONFIG_ERROR(e)                               (ASN1_ERROR_MIN + (e))
-#endif // _ASN1_CONFIG_ERROR
+#ifndef ASN1_CONFIG_ERROR
+#define ASN1_CONFIG_ERROR(e)                               (ASN1_ERROR_MIN + (e))
+#endif // ASN1_CONFIG_ERROR
 
 // clang-format on
diff --git a/src/lib/asn1/ASN1Error.h b/src/lib/asn1/ASN1Error.h
index 1a5af95..1ee65de 100644
--- a/src/lib/asn1/ASN1Error.h
+++ b/src/lib/asn1/ASN1Error.h
@@ -31,22 +31,14 @@
 
 #include "ASN1Config.h"
 
+#include <core/CHIPError.h>
+
 namespace chip {
 namespace ASN1 {
 
 // clang-format off
 
 /**
- *  @def ASN1_NO_ERROR
- *
- *  @brief
- *    This defines the InetLayer error code for success or no
- *    error. This value may be configured via #ASN1_CONFIG_NO_ERROR.
- *
- */
-#define ASN1_NO_ERROR                   ASN1_CONFIG_NO_ERROR
-
-/**
  *  @def ASN1_ERROR_MIN
  *
  *  @brief
@@ -67,28 +59,20 @@
 #define ASN1_ERROR_MAX                  ASN1_CONFIG_ERROR_MAX
 
 /**
- *  @def _ASN1_ERROR(e)
+ *  @def CHIP_ASN1_ERROR(e)
  *
  *  @brief
  *    This defines a mapping function for ASN1 errors that allows
  *    mapping such errors into a platform- or system-specific
  *    range. This function may be configured via
- *    #_ASN1_CONFIG_ERROR(e).
+ *    #ASN1_CONFIG_ERROR(e).
  *
  *  @param[in]  e  The ASN1 error to map.
  *
  *  @return The mapped ASN1 error.
  *
  */
-#define _ASN1_ERROR(e)                  _ASN1_CONFIG_ERROR(e)
-
-/**
- *  The basic type for all ASN1 subsystem errors.
- *
- *  This is defined to a platform- or system-specific type.
- *
- */
-typedef ASN1_CONFIG_ERROR_TYPE ASN1_ERROR;
+#define CHIP_ASN1_ERROR(e)              ASN1_CONFIG_ERROR(e)
 
 
 /**
@@ -104,7 +88,7 @@
  *    An end of ASN1 container or stream condition occurred.
  *
  */
-#define ASN1_END                        _ASN1_ERROR(0)
+#define ASN1_END                        CHIP_ASN1_ERROR(0)
 
 /**
  *  @def ASN1_ERROR_UNDERRUN
@@ -113,7 +97,7 @@
  *    The ASN.1 encoding ended prematurely.
  *
  */
-#define ASN1_ERROR_UNDERRUN             _ASN1_ERROR(1)
+#define ASN1_ERROR_UNDERRUN             CHIP_ASN1_ERROR(1)
 
 /**
  *  @def ASN1_ERROR_OVERFLOW
@@ -122,7 +106,7 @@
  *    The encoding exceeds the available space required to write it.
  *
  */
-#define ASN1_ERROR_OVERFLOW             _ASN1_ERROR(2)
+#define ASN1_ERROR_OVERFLOW             CHIP_ASN1_ERROR(2)
 
 /**
  *  @def ASN1_ERROR_INVALID_STATE
@@ -131,7 +115,7 @@
  *    An unexpected or invalid state was encountered.
  *
  */
-#define ASN1_ERROR_INVALID_STATE        _ASN1_ERROR(3)
+#define ASN1_ERROR_INVALID_STATE        CHIP_ASN1_ERROR(3)
 
 /**
  *  @def ASN1_ERROR_MAX_DEPTH_EXCEEDED
@@ -140,7 +124,7 @@
  *    The maximum number of container reading contexts was exceeded.
  *
  */
-#define ASN1_ERROR_MAX_DEPTH_EXCEEDED   _ASN1_ERROR(4)
+#define ASN1_ERROR_MAX_DEPTH_EXCEEDED   CHIP_ASN1_ERROR(4)
 
 /**
  *  @def ASN1_ERROR_INVALID_ENCODING
@@ -149,7 +133,7 @@
  *    The ASN.1 encoding is invalid.
  *
  */
-#define ASN1_ERROR_INVALID_ENCODING     _ASN1_ERROR(5)
+#define ASN1_ERROR_INVALID_ENCODING     CHIP_ASN1_ERROR(5)
 
 /**
  *  @def ASN1_ERROR_UNSUPPORTED_ENCODING
@@ -158,7 +142,7 @@
  *    An unsupported encoding was requested or encountered.
  *
  */
-#define ASN1_ERROR_UNSUPPORTED_ENCODING _ASN1_ERROR(6)
+#define ASN1_ERROR_UNSUPPORTED_ENCODING CHIP_ASN1_ERROR(6)
 
 /**
  *  @def ASN1_ERROR_TAG_OVERFLOW
@@ -168,7 +152,7 @@
  *    for it.
  *
  */
-#define ASN1_ERROR_TAG_OVERFLOW         _ASN1_ERROR(7)
+#define ASN1_ERROR_TAG_OVERFLOW         CHIP_ASN1_ERROR(7)
 
 /**
  *  @def ASN1_ERROR_LENGTH_OVERFLOW
@@ -178,7 +162,7 @@
  *    required for it.
  *
  */
-#define ASN1_ERROR_LENGTH_OVERFLOW      _ASN1_ERROR(8)
+#define ASN1_ERROR_LENGTH_OVERFLOW      CHIP_ASN1_ERROR(8)
 
 /**
  *  @def ASN1_ERROR_VALUE_OVERFLOW
@@ -188,7 +172,7 @@
  *    required for it.
  *
  */
-#define ASN1_ERROR_VALUE_OVERFLOW       _ASN1_ERROR(9)
+#define ASN1_ERROR_VALUE_OVERFLOW       CHIP_ASN1_ERROR(9)
 
 /**
  *  @def ASN1_ERROR_UNKNOWN_OBJECT_ID
@@ -198,7 +182,7 @@
  *    supported object identifiers.
  *
  */
-#define ASN1_ERROR_UNKNOWN_OBJECT_ID    _ASN1_ERROR(10)
+#define ASN1_ERROR_UNKNOWN_OBJECT_ID    CHIP_ASN1_ERROR(10)
 
 //                        !!!!! IMPORTANT !!!!!
 //
@@ -210,6 +194,12 @@
  *  @}
  */
 
+// !!!!! IMPORTANT !!!!!
+// These definitions are present temporarily in order to reduce breakage for PRs in flight.
+// TODO: remove compatibility definitions
+#define ASN1_ERROR                              CHIP_ERROR
+#define ASN1_NO_ERROR                           CHIP_NO_ERROR
+
 // clang-format on
 
 bool FormatASN1Error(char * buf, uint16_t bufSize, int32_t err);
diff --git a/src/lib/asn1/ASN1Macros.h b/src/lib/asn1/ASN1Macros.h
index 6f4de82..795c90f 100644
--- a/src/lib/asn1/ASN1Macros.h
+++ b/src/lib/asn1/ASN1Macros.h
@@ -75,10 +75,10 @@
 
 #define ASN1_EXIT_CONSTRUCTED                                                                                                      \
     ASN1_ERR = ASN1_READER.Next();                                                                                                 \
-    if (ASN1_ERR == ASN1_NO_ERROR)                                                                                                 \
+    if (ASN1_ERR == CHIP_NO_ERROR)                                                                                                 \
         ASN1_ERR = ASN1_ERROR_INVALID_ENCODING;                                                                                    \
     else if (ASN1_ERR == ASN1_END)                                                                                                 \
-        ASN1_ERR = ASN1_NO_ERROR;                                                                                                  \
+        ASN1_ERR = CHIP_NO_ERROR;                                                                                                  \
     SuccessOrExit(ASN1_ERR);                                                                                                       \
                                                                                                                                    \
     ASN1_ERR = ASN1_READER.ExitConstructedType();                                                                                  \
@@ -119,10 +119,10 @@
 
 #define ASN1_EXIT_ENCAPSULATED                                                                                                     \
     ASN1_ERR = ASN1_READER.Next();                                                                                                 \
-    if (ASN1_ERR == ASN1_NO_ERROR)                                                                                                 \
+    if (ASN1_ERR == CHIP_NO_ERROR)                                                                                                 \
         ASN1_ERR = ASN1_ERROR_INVALID_ENCODING;                                                                                    \
     else if (ASN1_ERR == ASN1_END)                                                                                                 \
-        ASN1_ERR = ASN1_NO_ERROR;                                                                                                  \
+        ASN1_ERR = CHIP_NO_ERROR;                                                                                                  \
     SuccessOrExit(ASN1_ERR);                                                                                                       \
                                                                                                                                    \
     ASN1_ERR = ASN1_READER.ExitEncapsulatedType();                                                                                 \
diff --git a/src/lib/asn1/ASN1OID.cpp b/src/lib/asn1/ASN1OID.cpp
index e60a3c2..7040ef2 100644
--- a/src/lib/asn1/ASN1OID.cpp
+++ b/src/lib/asn1/ASN1OID.cpp
@@ -84,7 +84,7 @@
     return "Unknown";
 }
 
-ASN1_ERROR ASN1Reader::GetObjectId(OID & oid)
+CHIP_ERROR ASN1Reader::GetObjectId(OID & oid)
 {
     if (Value == nullptr)
         return ASN1_ERROR_INVALID_STATE;
@@ -93,10 +93,10 @@
     if (mElemStart + mHeadLen + ValueLen > mContainerEnd)
         return ASN1_ERROR_UNDERRUN;
     oid = ParseObjectID(Value, ValueLen);
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::PutObjectId(OID oid)
+CHIP_ERROR ASN1Writer::PutObjectId(OID oid)
 {
     const uint8_t * encodedOID;
     uint16_t encodedOIDLen;
diff --git a/src/lib/asn1/ASN1Reader.cpp b/src/lib/asn1/ASN1Reader.cpp
index 96d1aa9..ed6e204 100644
--- a/src/lib/asn1/ASN1Reader.cpp
+++ b/src/lib/asn1/ASN1Reader.cpp
@@ -44,7 +44,7 @@
     mNumSavedContexts = 0;
 }
 
-ASN1_ERROR ASN1Reader::Next()
+CHIP_ERROR ASN1Reader::Next()
 {
     if (EndOfContents)
         return ASN1_END;
@@ -64,7 +64,7 @@
     return DecodeHead();
 }
 
-ASN1_ERROR ASN1Reader::EnterConstructedType()
+CHIP_ERROR ASN1Reader::EnterConstructedType()
 {
     if (!Constructed)
         return ASN1_ERROR_INVALID_STATE;
@@ -72,12 +72,12 @@
     return EnterContainer(0);
 }
 
-ASN1_ERROR ASN1Reader::ExitConstructedType()
+CHIP_ERROR ASN1Reader::ExitConstructedType()
 {
     return ExitContainer();
 }
 
-ASN1_ERROR ASN1Reader::GetConstructedType(const uint8_t *& val, uint32_t & valLen)
+CHIP_ERROR ASN1Reader::GetConstructedType(const uint8_t *& val, uint32_t & valLen)
 {
     if (!Constructed)
         return ASN1_ERROR_INVALID_STATE;
@@ -85,9 +85,9 @@
     val    = mElemStart;
     valLen = mHeadLen + ValueLen;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
-ASN1_ERROR ASN1Reader::EnterEncapsulatedType()
+CHIP_ERROR ASN1Reader::EnterEncapsulatedType()
 {
     if (Class != kASN1TagClass_Universal || (Tag != kASN1UniversalTag_OctetString && Tag != kASN1UniversalTag_BitString))
         return ASN1_ERROR_INVALID_STATE;
@@ -98,12 +98,12 @@
     return EnterContainer((Tag == kASN1UniversalTag_BitString) ? 1 : 0);
 }
 
-ASN1_ERROR ASN1Reader::ExitEncapsulatedType()
+CHIP_ERROR ASN1Reader::ExitEncapsulatedType()
 {
     return ExitContainer();
 }
 
-ASN1_ERROR ASN1Reader::EnterContainer(uint32_t offset)
+CHIP_ERROR ASN1Reader::EnterContainer(uint32_t offset)
 {
     if (mNumSavedContexts == kMaxContextDepth)
         return ASN1_ERROR_MAX_DEPTH_EXCEEDED;
@@ -121,10 +121,10 @@
 
     ResetElementState();
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Reader::ExitContainer()
+CHIP_ERROR ASN1Reader::ExitContainer()
 {
     if (mNumSavedContexts == 0)
         return ASN1_ERROR_INVALID_STATE;
@@ -142,7 +142,7 @@
 
     ResetElementState();
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 bool ASN1Reader::IsContained() const
@@ -150,7 +150,7 @@
     return mNumSavedContexts > 0;
 }
 
-ASN1_ERROR ASN1Reader::GetInteger(int64_t & val)
+CHIP_ERROR ASN1Reader::GetInteger(int64_t & val)
 {
     if (Value == nullptr)
         return ASN1_ERROR_INVALID_STATE;
@@ -164,10 +164,10 @@
     val               = ((*p & 0x80) == 0) ? 0 : -1;
     for (uint32_t i = ValueLen; i > 0; i--, p++)
         val = (val << 8) | *p;
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Reader::GetBoolean(bool & val)
+CHIP_ERROR ASN1Reader::GetBoolean(bool & val)
 {
     if (Value == nullptr)
         return ASN1_ERROR_INVALID_STATE;
@@ -181,10 +181,10 @@
         val = true;
     else
         return ASN1_ERROR_INVALID_ENCODING;
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Reader::GetUTCTime(ASN1UniversalTime & outTime)
+CHIP_ERROR ASN1Reader::GetUTCTime(ASN1UniversalTime & outTime)
 {
     // Supported Encoding: YYMMDDHHMMSSZ
 
@@ -214,10 +214,10 @@
     else
         outTime.Year += 2000;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Reader::GetGeneralizedTime(ASN1UniversalTime & outTime)
+CHIP_ERROR ASN1Reader::GetGeneralizedTime(ASN1UniversalTime & outTime)
 {
     // Supported Encoding: YYYYMMDDHHMMSSZ
 
@@ -242,7 +242,7 @@
     outTime.Minute = (Value[10] - '0') * 10 + (Value[11] - '0');
     outTime.Second = (Value[12] - '0') * 10 + (Value[13] - '0');
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 static uint8_t ReverseBits(uint8_t v)
@@ -256,7 +256,7 @@
     return v;
 }
 
-ASN1_ERROR ASN1Reader::GetBitString(uint32_t & outVal)
+CHIP_ERROR ASN1Reader::GetBitString(uint32_t & outVal)
 {
     // NOTE: only supports DER encoding.
 
@@ -279,10 +279,10 @@
             outVal |= (ReverseBits(Value[i]) << shift);
     }
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Reader::DecodeHead()
+CHIP_ERROR ASN1Reader::DecodeHead()
 {
     const uint8_t * p = mElemStart;
 
@@ -345,7 +345,7 @@
 
     Value = p;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void ASN1Reader::ResetElementState()
@@ -360,9 +360,9 @@
     mHeadLen      = 0;
 }
 
-ASN1_ERROR DumpASN1(ASN1Reader & asn1Parser, const char * prefix, const char * indent)
+CHIP_ERROR DumpASN1(ASN1Reader & asn1Parser, const char * prefix, const char * indent)
 {
-    ASN1_ERROR err = ASN1_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     if (indent == nullptr)
         indent = "  ";
@@ -371,14 +371,14 @@
     while (true)
     {
         err = asn1Parser.Next();
-        if (err != ASN1_NO_ERROR)
+        if (err != CHIP_NO_ERROR)
         {
             if (err == ASN1_END)
             {
                 if (asn1Parser.IsContained())
                 {
                     err = asn1Parser.ExitConstructedType();
-                    if (err != ASN1_NO_ERROR)
+                    if (err != CHIP_NO_ERROR)
                     {
                         printf("ASN1Reader::ExitConstructedType() failed: %ld\n", (long) err);
                         return err;
@@ -475,7 +475,7 @@
         if (asn1Parser.IsConstructed())
         {
             err = asn1Parser.EnterConstructedType();
-            if (err != ASN1_NO_ERROR)
+            if (err != CHIP_NO_ERROR)
             {
                 printf("ASN1Reader::EnterConstructedType() failed: %ld\n", (long) err);
                 return err;
diff --git a/src/lib/asn1/ASN1Writer.cpp b/src/lib/asn1/ASN1Writer.cpp
index 75f421b..b9c7f8f 100644
--- a/src/lib/asn1/ASN1Writer.cpp
+++ b/src/lib/asn1/ASN1Writer.cpp
@@ -68,10 +68,10 @@
     mDeferredLengthCount = 0;
 }
 
-ASN1_ERROR ASN1Writer::Finalize()
+CHIP_ERROR ASN1Writer::Finalize()
 {
     // TODO: This method is not required and can be deprecated.
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 uint16_t ASN1Writer::GetLengthWritten() const
@@ -79,7 +79,7 @@
     return (mBuf != nullptr) ? mWritePoint - mBuf : 0;
 }
 
-ASN1_ERROR ASN1Writer::PutInteger(int64_t val)
+CHIP_ERROR ASN1Writer::PutInteger(int64_t val)
 {
     uint8_t encodedVal[8];
     uint8_t valStart, valLen;
@@ -99,39 +99,39 @@
     return PutValue(kASN1TagClass_Universal, kASN1UniversalTag_Integer, false, encodedVal + valStart, valLen);
 }
 
-ASN1_ERROR ASN1Writer::PutBoolean(bool val)
+CHIP_ERROR ASN1Writer::PutBoolean(bool val)
 {
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     ReturnErrorOnFailure(EncodeHead(kASN1TagClass_Universal, kASN1UniversalTag_Boolean, false, 1));
 
     *mWritePoint++ = (val) ? 0xFF : 0;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::PutObjectId(const uint8_t * val, uint16_t valLen)
+CHIP_ERROR ASN1Writer::PutObjectId(const uint8_t * val, uint16_t valLen)
 {
     return PutValue(kASN1TagClass_Universal, kASN1UniversalTag_ObjectId, false, val, valLen);
 }
 
-ASN1_ERROR ASN1Writer::PutString(uint32_t tag, const char * val, uint16_t valLen)
+CHIP_ERROR ASN1Writer::PutString(uint32_t tag, const char * val, uint16_t valLen)
 {
     return PutValue(kASN1TagClass_Universal, tag, false, (const uint8_t *) val, valLen);
 }
 
-ASN1_ERROR ASN1Writer::PutOctetString(const uint8_t * val, uint16_t valLen)
+CHIP_ERROR ASN1Writer::PutOctetString(const uint8_t * val, uint16_t valLen)
 {
     return PutValue(kASN1TagClass_Universal, kASN1UniversalTag_OctetString, false, val, valLen);
 }
 
-ASN1_ERROR ASN1Writer::PutOctetString(uint8_t cls, uint32_t tag, const uint8_t * val, uint16_t valLen)
+CHIP_ERROR ASN1Writer::PutOctetString(uint8_t cls, uint32_t tag, const uint8_t * val, uint16_t valLen)
 {
     return PutValue(cls, tag, false, val, valLen);
 }
 
-ASN1_ERROR ASN1Writer::PutOctetString(uint8_t cls, uint32_t tag, chip::TLV::TLVReader & val)
+CHIP_ERROR ASN1Writer::PutOctetString(uint8_t cls, uint32_t tag, chip::TLV::TLVReader & val)
 {
     return PutValue(cls, tag, false, val);
 }
@@ -176,12 +176,12 @@
     return highestBit;
 }
 
-ASN1_ERROR ASN1Writer::PutBitString(uint32_t val)
+CHIP_ERROR ASN1Writer::PutBitString(uint32_t val)
 {
     uint8_t len;
 
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     if (val == 0)
         len = 1;
@@ -223,13 +223,13 @@
 
     mWritePoint += len;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::PutBitString(uint8_t unusedBitCount, const uint8_t * encodedBits, uint16_t encodedBitsLen)
+CHIP_ERROR ASN1Writer::PutBitString(uint8_t unusedBitCount, const uint8_t * encodedBits, uint16_t encodedBitsLen)
 {
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     ReturnErrorOnFailure(EncodeHead(kASN1TagClass_Universal, kASN1UniversalTag_BitString, false, encodedBitsLen + 1));
 
@@ -238,15 +238,15 @@
     memcpy(mWritePoint, encodedBits, encodedBitsLen);
     mWritePoint += encodedBitsLen;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::PutBitString(uint8_t unusedBitCount, chip::TLV::TLVReader & encodedBits)
+CHIP_ERROR ASN1Writer::PutBitString(uint8_t unusedBitCount, chip::TLV::TLVReader & encodedBits)
 {
     uint32_t encodedBitsLen;
 
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     encodedBitsLen = encodedBits.GetLength();
 
@@ -257,7 +257,7 @@
     encodedBits.GetBytes(mWritePoint, encodedBitsLen);
     mWritePoint += encodedBitsLen;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 static void itoa2(uint32_t val, uint8_t * buf)
@@ -267,7 +267,7 @@
     buf[0] = '0' + (val % 10);
 }
 
-ASN1_ERROR ASN1Writer::PutTime(const ASN1UniversalTime & val)
+CHIP_ERROR ASN1Writer::PutTime(const ASN1UniversalTime & val)
 {
     uint8_t buf[15];
 
@@ -291,36 +291,36 @@
         return PutValue(kASN1TagClass_Universal, kASN1UniversalTag_UTCTime, false, buf + 2, 13);
 }
 
-ASN1_ERROR ASN1Writer::PutNull()
+CHIP_ERROR ASN1Writer::PutNull()
 {
     return EncodeHead(kASN1TagClass_Universal, kASN1UniversalTag_Null, false, 0);
 }
 
-ASN1_ERROR ASN1Writer::PutConstructedType(const uint8_t * val, uint16_t valLen)
+CHIP_ERROR ASN1Writer::PutConstructedType(const uint8_t * val, uint16_t valLen)
 {
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     memcpy(mWritePoint, val, valLen);
     mWritePoint += valLen;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::StartConstructedType(uint8_t cls, uint32_t tag)
+CHIP_ERROR ASN1Writer::StartConstructedType(uint8_t cls, uint32_t tag)
 {
     return EncodeHead(cls, tag, true, kUnknownLength);
 }
 
-ASN1_ERROR ASN1Writer::EndConstructedType()
+CHIP_ERROR ASN1Writer::EndConstructedType()
 {
     return WriteDeferredLength();
 }
 
-ASN1_ERROR ASN1Writer::StartEncapsulatedType(uint8_t cls, uint32_t tag, bool bitStringEncoding)
+CHIP_ERROR ASN1Writer::StartEncapsulatedType(uint8_t cls, uint32_t tag, bool bitStringEncoding)
 {
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     ReturnErrorOnFailure(EncodeHead(cls, tag, false, kUnknownLength));
 
@@ -333,33 +333,33 @@
         *mWritePoint++ = 0;
     }
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::EndEncapsulatedType()
+CHIP_ERROR ASN1Writer::EndEncapsulatedType()
 {
     return WriteDeferredLength();
 }
 
-ASN1_ERROR ASN1Writer::PutValue(uint8_t cls, uint32_t tag, bool isConstructed, const uint8_t * val, uint16_t valLen)
+CHIP_ERROR ASN1Writer::PutValue(uint8_t cls, uint32_t tag, bool isConstructed, const uint8_t * val, uint16_t valLen)
 {
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     ReturnErrorOnFailure(EncodeHead(cls, tag, isConstructed, valLen));
 
     memcpy(mWritePoint, val, valLen);
     mWritePoint += valLen;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::PutValue(uint8_t cls, uint32_t tag, bool isConstructed, chip::TLV::TLVReader & val)
+CHIP_ERROR ASN1Writer::PutValue(uint8_t cls, uint32_t tag, bool isConstructed, chip::TLV::TLVReader & val)
 {
     uint32_t valLen;
 
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     valLen = val.GetLength();
 
@@ -368,16 +368,16 @@
     val.GetBytes(mWritePoint, valLen);
     mWritePoint += valLen;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::EncodeHead(uint8_t cls, uint32_t tag, bool isConstructed, int32_t len)
+CHIP_ERROR ASN1Writer::EncodeHead(uint8_t cls, uint32_t tag, bool isConstructed, int32_t len)
 {
     uint8_t bytesForLen;
     uint32_t totalLen;
 
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     // Only tags <= 31 supported. The implication of this is that encoded tags are exactly 1 byte long.
     VerifyOrReturnError(tag <= 0x1F, ASN1_ERROR_UNSUPPORTED_ENCODING);
@@ -418,13 +418,13 @@
 
     mWritePoint += bytesForLen;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-ASN1_ERROR ASN1Writer::WriteDeferredLength()
+CHIP_ERROR ASN1Writer::WriteDeferredLength()
 {
     // Do nothing for a null writer.
-    VerifyOrReturnError(mBuf != nullptr, ASN1_NO_ERROR);
+    VerifyOrReturnError(mBuf != nullptr, CHIP_NO_ERROR);
 
     VerifyOrReturnError(mDeferredLengthCount > 0, ASN1_ERROR_INVALID_STATE);
 
@@ -456,7 +456,7 @@
 
     mDeferredLengthCount--;
 
-    return ASN1_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
diff --git a/src/lib/asn1/tests/TestASN1.cpp b/src/lib/asn1/tests/TestASN1.cpp
index 9d98d61..379d80c 100644
--- a/src/lib/asn1/tests/TestASN1.cpp
+++ b/src/lib/asn1/tests/TestASN1.cpp
@@ -90,9 +90,9 @@
     0x65, 0x6E, 0x65, 0x64, 0x69, 0x67, 0x04, 0x0D, 0x30, 0x0B, 0x06, 0x03, 0x55, 0x04, 0x03, 0x03, 0x04, 0x00, 0x02, 0x01, 0x2A
 };
 
-static ASN1_ERROR EncodeASN1TestData(ASN1Writer & writer)
+static CHIP_ERROR EncodeASN1TestData(ASN1Writer & writer)
 {
-    ASN1_ERROR err = ASN1_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
 
     ASN1_START_SEQUENCE
     {
@@ -155,7 +155,7 @@
 
 static void TestASN1_Encode(nlTestSuite * inSuite, void * inContext)
 {
-    ASN1_ERROR err;
+    CHIP_ERROR err;
     uint8_t buf[2048];
     ASN1Writer writer;
     uint16_t encodedLen;
@@ -163,10 +163,10 @@
     writer.Init(buf, sizeof(buf));
 
     err = EncodeASN1TestData(writer);
-    NL_TEST_ASSERT(inSuite, err == ASN1_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
     err = writer.Finalize();
-    NL_TEST_ASSERT(inSuite, err == ASN1_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
     encodedLen = writer.GetLengthWritten();
     NL_TEST_ASSERT(inSuite, encodedLen == sizeof(TestASN1_EncodedData));
@@ -186,7 +186,7 @@
 
 static void TestASN1_Decode(nlTestSuite * inSuite, void * inContext)
 {
-    ASN1_ERROR err = ASN1_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     ASN1Reader reader;
     bool boolVal;
     uint32_t bitStringVal;
@@ -285,22 +285,22 @@
     ASN1_EXIT_SEQUENCE;
 
 exit:
-    NL_TEST_ASSERT(inSuite, err == ASN1_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 }
 
 static void TestASN1_NullWriter(nlTestSuite * inSuite, void * inContext)
 {
-    ASN1_ERROR err;
+    CHIP_ERROR err;
     ASN1Writer writer;
     uint16_t encodedLen;
 
     writer.InitNullWriter();
 
     err = EncodeASN1TestData(writer);
-    NL_TEST_ASSERT(inSuite, err == ASN1_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
     err = writer.Finalize();
-    NL_TEST_ASSERT(inSuite, err == ASN1_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
     encodedLen = writer.GetLengthWritten();
     NL_TEST_ASSERT(inSuite, encodedLen == 0);
@@ -308,7 +308,7 @@
 
 static void TestASN1_ObjectID(nlTestSuite * inSuite, void * inContext)
 {
-    ASN1_ERROR err;
+    CHIP_ERROR err;
     uint8_t buf[2048];
     ASN1Writer writer;
     ASN1Reader reader;
@@ -328,7 +328,7 @@
     ASN1_END_SEQUENCE;
 
     err = writer.Finalize();
-    NL_TEST_ASSERT(inSuite, err == ASN1_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 
     encodedLen = writer.GetLengthWritten();
     NL_TEST_ASSERT(inSuite, encodedLen > 0);
@@ -370,7 +370,7 @@
     ASN1_EXIT_SEQUENCE;
 
 exit:
-    NL_TEST_ASSERT(inSuite, err == ASN1_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);
 }
 
 /**
diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h
index 387bc4b..2c166d4 100644
--- a/src/lib/core/CHIPConfig.h
+++ b/src/lib/core/CHIPConfig.h
@@ -53,7 +53,7 @@
  *
  * An application or module that incorporates chip can define a project configuration
  * file to override standard chip configuration with application-specific values.
- * The chipProjectConfig.h file is typically located outside the Openchip source tree,
+ * The chipProjectConfig.h file is typically located outside the CHIP source tree,
  * alongside the source code for the application.
  */
 #ifdef CHIP_PROJECT_CONFIG_INCLUDE
@@ -64,8 +64,8 @@
  *
  * A platform configuration file contains overrides to standard chip configuration
  * that are specific to the platform or OS on which chip is running.  It is typically
- * provided as apart of an adaptation layer that adapts Openchip to the target
- * environment.  This adaptation layer may be included in the Openchip source tree
+ * provided as apart of an adaptation layer that adapts CHIP to the target
+ * environment.  This adaptation layer may be included in the CHIP source tree
  * itself or implemented externally.
  */
 #ifdef CHIP_PLATFORM_CONFIG_INCLUDE
@@ -73,6 +73,7 @@
 #endif
 
 // Profile-specific Configuration Headers
+
 /**
  *  @def CHIP_CONFIG_ERROR_TYPE
  *
@@ -81,55 +82,46 @@
  *
  */
 #ifndef CHIP_CONFIG_ERROR_TYPE
+#include <inttypes.h>
 #include <stdint.h>
 
 #define CHIP_CONFIG_ERROR_TYPE int32_t
+#define CHIP_CONFIG_ERROR_FORMAT PRId32
 #endif // CHIP_CONFIG_ERROR_TYPE
 
 /**
- *  @def CHIP_CONFIG_NO_ERROR
- *
- *  @brief
- *    This defines the chip error code for no error or success.
- *
- */
-#ifndef CHIP_CONFIG_NO_ERROR
-#define CHIP_CONFIG_NO_ERROR 0
-#endif // CHIP_CONFIG_NO_ERROR
-
-/**
- *  @def CHIP_CONFIG_ERROR_MIN
+ *  @def CHIP_CONFIG_CORE_ERROR_MIN
  *
  *  @brief
  *    This defines the base or minimum chip error number range.
  *
  */
-#ifndef CHIP_CONFIG_ERROR_MIN
-#define CHIP_CONFIG_ERROR_MIN 4000
-#endif // CHIP_CONFIG_ERROR_MIN
+#ifndef CHIP_CONFIG_CORE_ERROR_MIN
+#define CHIP_CONFIG_CORE_ERROR_MIN 4000
+#endif // CHIP_CONFIG_CORE_ERROR_MIN
 
 /**
- *  @def CHIP_CONFIG_ERROR_MAX
+ *  @def CHIP_CONFIG_CORE_ERROR_MAX
  *
  *  @brief
  *    This defines the top or maximum chip error number range.
  *
  */
-#ifndef CHIP_CONFIG_ERROR_MAX
-#define CHIP_CONFIG_ERROR_MAX 4999
-#endif // CHIP_CONFIG_ERROR_MAX
+#ifndef CHIP_CONFIG_CORE_ERROR_MAX
+#define CHIP_CONFIG_CORE_ERROR_MAX 4999
+#endif // CHIP_CONFIG_CORE_ERROR_MAX
 
 /**
- *  @def _CHIP_CONFIG_ERROR
+ *  @def CHIP_CONFIG_CORE_ERROR
  *
  *  @brief
  *    This defines a mapping function for chip errors that allows
  *    mapping such errors into a platform- or system-specific manner.
  *
  */
-#ifndef _CHIP_CONFIG_ERROR
-#define _CHIP_CONFIG_ERROR(e) (CHIP_ERROR_MIN + (e))
-#endif // _CHIP_CONFIG_ERROR
+#ifndef CHIP_CONFIG_CORE_ERROR
+#define CHIP_CONFIG_CORE_ERROR(e) (CHIP_CONFIG_CORE_ERROR_MIN + (e))
+#endif // CHIP_CONFIG_CORE_ERROR
 
 /**
  *  @def CHIP_CONFIG_USE_OPENSSL_ECC
diff --git a/src/lib/core/CHIPError.cpp b/src/lib/core/CHIPError.cpp
index ca77b50..cad220a 100644
--- a/src/lib/core/CHIPError.cpp
+++ b/src/lib/core/CHIPError.cpp
@@ -50,11 +50,11 @@
  * @return false                    If the supplied error was not a CHIP error.
  *
  */
-bool FormatCHIPError(char * buf, uint16_t bufSize, int32_t err)
+bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
     const char * desc = nullptr;
 
-    if (err < CHIP_ERROR_MIN || err > CHIP_ERROR_MAX)
+    if (err < CHIP_CONFIG_CORE_ERROR_MIN || err > CHIP_CONFIG_CORE_ERROR_MAX)
     {
         return false;
     }
@@ -92,6 +92,9 @@
     case CHIP_ERROR_TOO_MANY_PEER_NODES:
         desc = "Too many peer nodes";
         break;
+    case CHIP_ERROR_SENTINEL:
+        desc = "Internal sentinel";
+        break;
     case CHIP_ERROR_NO_MEMORY:
         desc = "No memory";
         break;
@@ -618,6 +621,30 @@
     case CHIP_ERROR_PEER_NODE_NOT_FOUND:
         desc = "Unable to find the peer node";
         break;
+    case CHIP_ERROR_HSM:
+        desc = "Hardware security module";
+        break;
+    case CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED:
+        desc = "Intermediate CA not required";
+        break;
+    case CHIP_ERROR_REAL_TIME_NOT_SYNCED:
+        desc = "Real time not synchronized";
+        break;
+    case CHIP_ERROR_UNEXPECTED_EVENT:
+        desc = "Unexpected event";
+        break;
+    case CHIP_ERROR_ENDPOINT_POOL_FULL:
+        desc = "Endpoint pool full";
+        break;
+    case CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG:
+        desc = "Inbound message too big";
+        break;
+    case CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG:
+        desc = "Outbound message too big";
+        break;
+    case CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED:
+        desc = "Duplicate message received";
+        break;
     }
 #endif // !CHIP_CONFIG_SHORT_ERROR_STR
 
diff --git a/src/lib/core/CHIPError.h b/src/lib/core/CHIPError.h
index 849cfb1..6f50a7e 100644
--- a/src/lib/core/CHIPError.h
+++ b/src/lib/core/CHIPError.h
@@ -32,55 +32,12 @@
 #pragma once
 
 #include <core/CHIPConfig.h>
+
+#include <stdint.h>
+
 // clang-format off
 
 /**
- *  @def CHIP_NO_ERROR
- *
- *  @brief
- *    This defines the CHIP error code for success or no error.
- *    This value may be configured via #CHIP_CONFIG_NO_ERROR."
- *
- */
-#define CHIP_NO_ERROR                                          CHIP_CONFIG_NO_ERROR
-
-/**
- *  @def CHIP_ERROR_MIN
- *
- *  @brief
- *    This defines the bottom or minimum CHIP error number range.
- *    This value may be configured via #CHIP_CONFIG_ERROR_MIN.
- *
- */
-#define CHIP_ERROR_MIN                                         CHIP_CONFIG_ERROR_MIN
-
-/**
- *  @def CHIP_ERROR_MAX
- *
- *  @brief
- *    This defines the top or maximum CHIP error number range.
- *    This value may be configured via #CHIP_CONFIG_ERROR_MAX.
- *
- */
-#define CHIP_ERROR_MAX                                         CHIP_CONFIG_ERROR_MAX
-
-/**
- *  @def _CHIP_ERROR(e)
- *
- *  @brief
- *    This defines a mapping function for CHIP errors that allows
- *    mapping such errors into a platform- or system-specific range.
- *    This function may be configured via #_CHIP_CONFIG_ERROR(e).
- *
- *  @param[in] e       The CHIP error to map.
- *
- *  @return    The mapped CHIP error.
- *
- *
- */
-#define _CHIP_ERROR(e)                                         _CHIP_CONFIG_ERROR(e)
-
-/**
  *  The basic type for all CHIP errors.
  *
  *  @brief
@@ -89,6 +46,31 @@
  */
 typedef CHIP_CONFIG_ERROR_TYPE CHIP_ERROR;
 
+#define CHIP_ERROR_FORMAT   CHIP_CONFIG_ERROR_FORMAT
+
+/**
+ *  @def CHIP_NO_ERROR
+ *
+ *  @brief
+ *    This defines the CHIP error code for success or no error.
+ *
+ */
+#define CHIP_NO_ERROR                                          0
+
+/**
+ *  @def CHIP_CORE_ERROR(e)
+ *
+ *  @brief
+ *    This defines a mapping function for CHIP errors that allows
+ *    mapping such errors into a platform- or system-specific range.
+ *    This function may be configured via #CHIP_CONFIG_CORE_ERROR(e).
+ *
+ *  @param[in] e       The CHIP error to map.
+ *
+ *  @return    The mapped CHIP error.
+ */
+#define CHIP_CORE_ERROR(e)                                     CHIP_CONFIG_CORE_ERROR(e)
+
 /**
  *  @name Error Definitions
  *
@@ -103,7 +85,7 @@
  *    connections exist.
  *
  */
-#define CHIP_ERROR_TOO_MANY_CONNECTIONS                        _CHIP_ERROR(0)
+#define CHIP_ERROR_TOO_MANY_CONNECTIONS                        CHIP_CORE_ERROR(0)
 
 /**
  *  @def CHIP_ERROR_SENDING_BLOCKED
@@ -112,7 +94,7 @@
  *    A message exceeds the sent limit.
  *
  */
-#define CHIP_ERROR_SENDING_BLOCKED                             _CHIP_ERROR(1)
+#define CHIP_ERROR_SENDING_BLOCKED                             CHIP_CORE_ERROR(1)
 
 /**
  *  @def CHIP_ERROR_CONNECTION_ABORTED
@@ -121,7 +103,7 @@
  *    A connection has been aborted.
  *
  */
-#define CHIP_ERROR_CONNECTION_ABORTED                          _CHIP_ERROR(2)
+#define CHIP_ERROR_CONNECTION_ABORTED                          CHIP_CORE_ERROR(2)
 
 /**
  *  @def CHIP_ERROR_INCORRECT_STATE
@@ -130,7 +112,7 @@
  *    An unexpected state was encountered.
  *
  */
-#define CHIP_ERROR_INCORRECT_STATE                             _CHIP_ERROR(3)
+#define CHIP_ERROR_INCORRECT_STATE                             CHIP_CORE_ERROR(3)
 
 /**
  *  @def CHIP_ERROR_MESSAGE_TOO_LONG
@@ -139,7 +121,7 @@
  *    A message is too long.
  *
  */
-#define CHIP_ERROR_MESSAGE_TOO_LONG                            _CHIP_ERROR(4)
+#define CHIP_ERROR_MESSAGE_TOO_LONG                            CHIP_CORE_ERROR(4)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION
@@ -148,7 +130,7 @@
  *    An exchange version is not supported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION                _CHIP_ERROR(5)
+#define CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION                CHIP_CORE_ERROR(5)
 
 /**
  *  @def CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS
@@ -158,7 +140,7 @@
  *    unsolicited message handler pool is full.
  *
  */
-#define CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS       _CHIP_ERROR(6)
+#define CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS       CHIP_CORE_ERROR(6)
 
 /**
  *  @def CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER
@@ -168,7 +150,7 @@
  *    the target handler was not found in the unsolicited message handler pool.
  *
  */
-#define CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER              _CHIP_ERROR(7)
+#define CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER              CHIP_CORE_ERROR(7)
 
 /**
  *  @def CHIP_ERROR_NO_CONNECTION_HANDLER
@@ -177,7 +159,7 @@
  *    No callback has been registered for handling a connection.
  *
  */
-#define CHIP_ERROR_NO_CONNECTION_HANDLER                       _CHIP_ERROR(8)
+#define CHIP_ERROR_NO_CONNECTION_HANDLER                       CHIP_CORE_ERROR(8)
 
 /**
  *  @def CHIP_ERROR_TOO_MANY_PEER_NODES
@@ -186,7 +168,16 @@
  *    The number of peer nodes exceeds the maximum limit of a local node.
  *
  */
-#define CHIP_ERROR_TOO_MANY_PEER_NODES                         _CHIP_ERROR(9)
+#define CHIP_ERROR_TOO_MANY_PEER_NODES                         CHIP_CORE_ERROR(9)
+
+/**
+ *  @def CHIP_ERROR_SENTINEL
+ *
+ *  @brief
+ *    For use locally to mark conditions such as value found or end of iteration.
+ *
+ */
+#define CHIP_ERROR_SENTINEL                                    CHIP_CORE_ERROR(10)
 
 /**
  *  @def CHIP_ERROR_NO_MEMORY
@@ -195,7 +186,7 @@
  *    The attempt to allocate a buffer or object failed due to a lack of memory.
  *
  */
-#define CHIP_ERROR_NO_MEMORY                                   _CHIP_ERROR(11)
+#define CHIP_ERROR_NO_MEMORY                                   CHIP_CORE_ERROR(11)
 
 /**
  *  @def CHIP_ERROR_NO_MESSAGE_HANDLER
@@ -204,7 +195,7 @@
  *    No callback has been registered for handling a message.
  *
  */
-#define CHIP_ERROR_NO_MESSAGE_HANDLER                          _CHIP_ERROR(12)
+#define CHIP_ERROR_NO_MESSAGE_HANDLER                          CHIP_CORE_ERROR(12)
 
 /**
  *  @def CHIP_ERROR_MESSAGE_INCOMPLETE
@@ -213,7 +204,7 @@
  *    A message is incomplete.
  *
  */
-#define CHIP_ERROR_MESSAGE_INCOMPLETE                          _CHIP_ERROR(13)
+#define CHIP_ERROR_MESSAGE_INCOMPLETE                          CHIP_CORE_ERROR(13)
 
 /**
  *  @def CHIP_ERROR_DATA_NOT_ALIGNED
@@ -222,7 +213,7 @@
  *    The data is not aligned.
  *
  */
-#define CHIP_ERROR_DATA_NOT_ALIGNED                            _CHIP_ERROR(14)
+#define CHIP_ERROR_DATA_NOT_ALIGNED                            CHIP_CORE_ERROR(14)
 
 /**
  *  @def CHIP_ERROR_UNKNOWN_KEY_TYPE
@@ -231,7 +222,7 @@
  *    The encryption key type is unknown.
  *
  */
-#define CHIP_ERROR_UNKNOWN_KEY_TYPE                            _CHIP_ERROR(15)
+#define CHIP_ERROR_UNKNOWN_KEY_TYPE                            CHIP_CORE_ERROR(15)
 
 /**
  *  @def CHIP_ERROR_KEY_NOT_FOUND
@@ -240,7 +231,7 @@
  *    The encryption key is not found.
  *
  */
-#define CHIP_ERROR_KEY_NOT_FOUND                               _CHIP_ERROR(16)
+#define CHIP_ERROR_KEY_NOT_FOUND                               CHIP_CORE_ERROR(16)
 
 /**
  *  @def CHIP_ERROR_WRONG_ENCRYPTION_TYPE
@@ -249,7 +240,7 @@
  *    The encryption type is incorrect for the specified key.
  *
  */
-#define CHIP_ERROR_WRONG_ENCRYPTION_TYPE                       _CHIP_ERROR(17)
+#define CHIP_ERROR_WRONG_ENCRYPTION_TYPE                       CHIP_CORE_ERROR(17)
 
 /**
  *  @def CHIP_ERROR_TOO_MANY_KEYS
@@ -259,7 +250,7 @@
  *    exceeds the maximum limit.
  *
  */
-#define CHIP_ERROR_TOO_MANY_KEYS                               _CHIP_ERROR(18)
+#define CHIP_ERROR_TOO_MANY_KEYS                               CHIP_CORE_ERROR(18)
 
 /**
  *  @def CHIP_ERROR_INTEGRITY_CHECK_FAILED
@@ -269,7 +260,7 @@
  *    check.
  *
  */
-#define CHIP_ERROR_INTEGRITY_CHECK_FAILED                      _CHIP_ERROR(19)
+#define CHIP_ERROR_INTEGRITY_CHECK_FAILED                      CHIP_CORE_ERROR(19)
 
 /**
  *  @def CHIP_ERROR_INVALID_SIGNATURE
@@ -278,7 +269,7 @@
  *    Invalid signature.
  *
  */
-#define CHIP_ERROR_INVALID_SIGNATURE                           _CHIP_ERROR(20)
+#define CHIP_ERROR_INVALID_SIGNATURE                           CHIP_CORE_ERROR(20)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION
@@ -287,7 +278,7 @@
  *    A message version is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION                 _CHIP_ERROR(21)
+#define CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION                 CHIP_CORE_ERROR(21)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE
@@ -296,7 +287,7 @@
  *    An encryption type is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE                 _CHIP_ERROR(22)
+#define CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE                 CHIP_CORE_ERROR(22)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE
@@ -305,7 +296,7 @@
  *    A signature type is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE                  _CHIP_ERROR(23)
+#define CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE                  CHIP_CORE_ERROR(23)
 
 /**
  *  @def CHIP_ERROR_INVALID_MESSAGE_LENGTH
@@ -314,7 +305,7 @@
  *    A message length is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_MESSAGE_LENGTH                      _CHIP_ERROR(24)
+#define CHIP_ERROR_INVALID_MESSAGE_LENGTH                      CHIP_CORE_ERROR(24)
 
 /**
  *  @def CHIP_ERROR_BUFFER_TOO_SMALL
@@ -323,7 +314,7 @@
  *    A buffer is too small.
  *
  */
-#define CHIP_ERROR_BUFFER_TOO_SMALL                            _CHIP_ERROR(25)
+#define CHIP_ERROR_BUFFER_TOO_SMALL                            CHIP_CORE_ERROR(25)
 
 /**
  *  @def CHIP_ERROR_DUPLICATE_KEY_ID
@@ -332,7 +323,7 @@
  *    A key id is duplicate.
  *
  */
-#define CHIP_ERROR_DUPLICATE_KEY_ID                            _CHIP_ERROR(26)
+#define CHIP_ERROR_DUPLICATE_KEY_ID                            CHIP_CORE_ERROR(26)
 
 /**
  *  @def CHIP_ERROR_WRONG_KEY_TYPE
@@ -341,7 +332,7 @@
  *    A key type does not match the expected key type.
  *
  */
-#define CHIP_ERROR_WRONG_KEY_TYPE                              _CHIP_ERROR(27)
+#define CHIP_ERROR_WRONG_KEY_TYPE                              CHIP_CORE_ERROR(27)
 
 /**
  *  @def CHIP_ERROR_WELL_UNINITIALIZED
@@ -350,7 +341,7 @@
  *    A requested object is uninitialized.
  *
  */
-#define CHIP_ERROR_WELL_UNINITIALIZED                          _CHIP_ERROR(28)
+#define CHIP_ERROR_WELL_UNINITIALIZED                          CHIP_CORE_ERROR(28)
 
 /**
  *  @def CHIP_ERROR_WELL_EMPTY
@@ -359,7 +350,7 @@
  *    A requested object is empty.
  *
  */
-#define CHIP_ERROR_WELL_EMPTY                                  _CHIP_ERROR(29)
+#define CHIP_ERROR_WELL_EMPTY                                  CHIP_CORE_ERROR(29)
 
 /**
  *  @def CHIP_ERROR_INVALID_STRING_LENGTH
@@ -368,7 +359,7 @@
  *    A string length is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_STRING_LENGTH                       _CHIP_ERROR(30)
+#define CHIP_ERROR_INVALID_STRING_LENGTH                       CHIP_CORE_ERROR(30)
 
 /**
  *  @def CHIP_ERROR_INVALID_LIST_LENGTH
@@ -377,7 +368,7 @@
  *    A list length is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_LIST_LENGTH                         _CHIP_ERROR(31)
+#define CHIP_ERROR_INVALID_LIST_LENGTH                         CHIP_CORE_ERROR(31)
 
 /**
  *  @def CHIP_ERROR_INVALID_INTEGRITY_TYPE
@@ -386,7 +377,7 @@
  *    An integrity type is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_INTEGRITY_TYPE                      _CHIP_ERROR(32)
+#define CHIP_ERROR_INVALID_INTEGRITY_TYPE                      CHIP_CORE_ERROR(32)
 
 /**
  *  @def CHIP_END_OF_TLV
@@ -396,7 +387,8 @@
  *    or the end of a TLV container element has been reached.
  *
  */
-#define CHIP_END_OF_TLV                                        _CHIP_ERROR(33)
+#define CHIP_ERROR_END_OF_TLV                                  CHIP_CORE_ERROR(33)
+#define CHIP_END_OF_TLV CHIP_ERROR_END_OF_TLV
 
 /**
  *  @def CHIP_ERROR_TLV_UNDERRUN
@@ -405,7 +397,7 @@
  *    The TLV encoding ended prematurely.
  *
  */
-#define CHIP_ERROR_TLV_UNDERRUN                                _CHIP_ERROR(34)
+#define CHIP_ERROR_TLV_UNDERRUN                                CHIP_CORE_ERROR(34)
 
 /**
  *  @def CHIP_ERROR_INVALID_TLV_ELEMENT
@@ -414,7 +406,7 @@
  *    A TLV element is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_TLV_ELEMENT                         _CHIP_ERROR(35)
+#define CHIP_ERROR_INVALID_TLV_ELEMENT                         CHIP_CORE_ERROR(35)
 
 /**
  *  @def CHIP_ERROR_INVALID_TLV_TAG
@@ -423,7 +415,7 @@
  *    A TLV tag is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_TLV_TAG                             _CHIP_ERROR(36)
+#define CHIP_ERROR_INVALID_TLV_TAG                             CHIP_CORE_ERROR(36)
 
 /**
  *  @def CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG
@@ -433,7 +425,7 @@
  *    but an implicit profile id has not been defined.
  *
  */
-#define CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG                    _CHIP_ERROR(37)
+#define CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG                    CHIP_CORE_ERROR(37)
 
 /**
  *  @def CHIP_ERROR_WRONG_TLV_TYPE
@@ -442,7 +434,7 @@
  *    A TLV type is wrong.
  *
  */
-#define CHIP_ERROR_WRONG_TLV_TYPE                              _CHIP_ERROR(38)
+#define CHIP_ERROR_WRONG_TLV_TYPE                              CHIP_CORE_ERROR(38)
 
 /**
  *  @def CHIP_ERROR_TLV_CONTAINER_OPEN
@@ -451,7 +443,7 @@
  *    A TLV container is unexpectedly open.
  *
  */
-#define CHIP_ERROR_TLV_CONTAINER_OPEN                          _CHIP_ERROR(39)
+#define CHIP_ERROR_TLV_CONTAINER_OPEN                          CHIP_CORE_ERROR(39)
 
 /**
  *  @def CHIP_ERROR_INVALID_TRANSFER_MODE
@@ -460,7 +452,7 @@
  *    A transfer mode is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_TRANSFER_MODE                       _CHIP_ERROR(40)
+#define CHIP_ERROR_INVALID_TRANSFER_MODE                       CHIP_CORE_ERROR(40)
 
 /**
  *  @def CHIP_ERROR_INVALID_PROFILE_ID
@@ -469,7 +461,7 @@
  *    A profile id is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_PROFILE_ID                          _CHIP_ERROR(41)
+#define CHIP_ERROR_INVALID_PROFILE_ID                          CHIP_CORE_ERROR(41)
 
 /**
  *  @def CHIP_ERROR_INVALID_MESSAGE_TYPE
@@ -478,7 +470,7 @@
  *    A message type is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_MESSAGE_TYPE                        _CHIP_ERROR(42)
+#define CHIP_ERROR_INVALID_MESSAGE_TYPE                        CHIP_CORE_ERROR(42)
 
 /**
  *  @def CHIP_ERROR_UNEXPECTED_TLV_ELEMENT
@@ -487,7 +479,7 @@
  *    An unexpected TLV element was encountered.
  *
  */
-#define CHIP_ERROR_UNEXPECTED_TLV_ELEMENT                      _CHIP_ERROR(43)
+#define CHIP_ERROR_UNEXPECTED_TLV_ELEMENT                      CHIP_CORE_ERROR(43)
 
 /**
  *  @def CHIP_ERROR_STATUS_REPORT_RECEIVED
@@ -496,7 +488,7 @@
  *    A status report is received from a peer node.
  *
  */
-#define CHIP_ERROR_STATUS_REPORT_RECEIVED                      _CHIP_ERROR(44)
+#define CHIP_ERROR_STATUS_REPORT_RECEIVED                      CHIP_CORE_ERROR(44)
 
 /**
  *  @def CHIP_ERROR_NOT_IMPLEMENTED
@@ -505,7 +497,7 @@
  *    A requested function or feature is not implemented.
  *
  */
-#define CHIP_ERROR_NOT_IMPLEMENTED                             _CHIP_ERROR(45)
+#define CHIP_ERROR_NOT_IMPLEMENTED                             CHIP_CORE_ERROR(45)
 
 /**
  *  @def CHIP_ERROR_INVALID_ADDRESS
@@ -514,7 +506,7 @@
  *    An address is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_ADDRESS                             _CHIP_ERROR(46)
+#define CHIP_ERROR_INVALID_ADDRESS                             CHIP_CORE_ERROR(46)
 
 /**
  *  @def CHIP_ERROR_INVALID_ARGUMENT
@@ -523,7 +515,7 @@
  *    An argument is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_ARGUMENT                            _CHIP_ERROR(47)
+#define CHIP_ERROR_INVALID_ARGUMENT                            CHIP_CORE_ERROR(47)
 
 /**
  *  @def CHIP_ERROR_INVALID_PATH_LIST
@@ -532,7 +524,7 @@
  *    A TLV path list is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_PATH_LIST                           _CHIP_ERROR(48)
+#define CHIP_ERROR_INVALID_PATH_LIST                           CHIP_CORE_ERROR(48)
 
 /**
  *  @def CHIP_ERROR_INVALID_DATA_LIST
@@ -541,7 +533,7 @@
  *    A TLV data list is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_DATA_LIST                           _CHIP_ERROR(49)
+#define CHIP_ERROR_INVALID_DATA_LIST                           CHIP_CORE_ERROR(49)
 
 /**
  *  @def CHIP_ERROR_TIMEOUT
@@ -550,7 +542,7 @@
  *    A request timed out.
  *
  */
-#define CHIP_ERROR_TIMEOUT                                     _CHIP_ERROR(50)
+#define CHIP_ERROR_TIMEOUT                                     CHIP_CORE_ERROR(50)
 
 /**
  *  @def CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR
@@ -559,7 +551,7 @@
  *    A device descriptor is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR                   _CHIP_ERROR(51)
+#define CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR                   CHIP_CORE_ERROR(51)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION
@@ -568,7 +560,7 @@
  *    A device descriptor version is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION       _CHIP_ERROR(52)
+#define CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION       CHIP_CORE_ERROR(52)
 
 /**
  *  @def CHIP_END_OF_INPUT
@@ -577,7 +569,8 @@
  *    An input ended.
  *
  */
-#define CHIP_END_OF_INPUT                                      _CHIP_ERROR(53)
+#define CHIP_ERROR_END_OF_INPUT                                CHIP_CORE_ERROR(53)
+#define CHIP_END_OF_INPUT CHIP_ERROR_END_OF_INPUT
 
 /**
  *  @def CHIP_ERROR_RATE_LIMIT_EXCEEDED
@@ -586,7 +579,7 @@
  *    A rate limit is exceeded.
  *
  */
-#define CHIP_ERROR_RATE_LIMIT_EXCEEDED                         _CHIP_ERROR(54)
+#define CHIP_ERROR_RATE_LIMIT_EXCEEDED                         CHIP_CORE_ERROR(54)
 
 /**
  *  @def CHIP_ERROR_SECURITY_MANAGER_BUSY
@@ -595,7 +588,7 @@
  *    A security manager is busy.
  *
  */
-#define CHIP_ERROR_SECURITY_MANAGER_BUSY                       _CHIP_ERROR(55)
+#define CHIP_ERROR_SECURITY_MANAGER_BUSY                       CHIP_CORE_ERROR(55)
 
 /**
  *  @def CHIP_ERROR_INVALID_PASE_PARAMETER
@@ -604,7 +597,7 @@
  *    A PASE parameter is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_PASE_PARAMETER                      _CHIP_ERROR(56)
+#define CHIP_ERROR_INVALID_PASE_PARAMETER                      CHIP_CORE_ERROR(56)
 
 /**
  *  @def CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1
@@ -613,7 +606,7 @@
  *    PASE supports only config1.
  *
  */
-#define CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1                  _CHIP_ERROR(57)
+#define CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1                  CHIP_CORE_ERROR(57)
 
 /**
  *  @def CHIP_ERROR_KEY_CONFIRMATION_FAILED
@@ -622,7 +615,7 @@
  *    A key confirmation failed.
  *
  */
-#define CHIP_ERROR_KEY_CONFIRMATION_FAILED                     _CHIP_ERROR(58)
+#define CHIP_ERROR_KEY_CONFIRMATION_FAILED                     CHIP_CORE_ERROR(58)
 
 /**
  *  @def CHIP_ERROR_INVALID_USE_OF_SESSION_KEY
@@ -631,7 +624,7 @@
  *    A use of session key is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_USE_OF_SESSION_KEY                  _CHIP_ERROR(59)
+#define CHIP_ERROR_INVALID_USE_OF_SESSION_KEY                  CHIP_CORE_ERROR(59)
 
 /**
  *  @def CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY
@@ -640,7 +633,7 @@
  *    A connection is closed unexpectedly.
  *
  */
-#define CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY              _CHIP_ERROR(60)
+#define CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY              CHIP_CORE_ERROR(60)
 
 /**
  *  @def CHIP_ERROR_MISSING_TLV_ELEMENT
@@ -649,7 +642,7 @@
  *    A TLV element is missing.
  *
  */
-#define CHIP_ERROR_MISSING_TLV_ELEMENT                         _CHIP_ERROR(61)
+#define CHIP_ERROR_MISSING_TLV_ELEMENT                         CHIP_CORE_ERROR(61)
 
 /**
  *  @def CHIP_ERROR_RANDOM_DATA_UNAVAILABLE
@@ -658,7 +651,7 @@
  *    Secure random data is not available.
  *
  */
-#define CHIP_ERROR_RANDOM_DATA_UNAVAILABLE                     _CHIP_ERROR(62)
+#define CHIP_ERROR_RANDOM_DATA_UNAVAILABLE                     CHIP_CORE_ERROR(62)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT
@@ -667,7 +660,7 @@
  *    A type in host/port list is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT               _CHIP_ERROR(63)
+#define CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT               CHIP_CORE_ERROR(63)
 
 /**
  *  @def CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX
@@ -676,7 +669,7 @@
  *    A suffix index in host/port list is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX                   _CHIP_ERROR(64)
+#define CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX                   CHIP_CORE_ERROR(64)
 
 /**
  *  @def CHIP_ERROR_HOST_PORT_LIST_EMPTY
@@ -685,7 +678,7 @@
  *    A host/port list is empty.
  *
  */
-#define CHIP_ERROR_HOST_PORT_LIST_EMPTY                        _CHIP_ERROR(65)
+#define CHIP_ERROR_HOST_PORT_LIST_EMPTY                        CHIP_CORE_ERROR(65)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_AUTH_MODE
@@ -694,7 +687,7 @@
  *    An authentication mode is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_AUTH_MODE                       _CHIP_ERROR(66)
+#define CHIP_ERROR_UNSUPPORTED_AUTH_MODE                       CHIP_CORE_ERROR(66)
 
 /**
  *  @def CHIP_ERROR_INVALID_SERVICE_EP
@@ -703,7 +696,7 @@
  *    A service endpoint is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_SERVICE_EP                          _CHIP_ERROR(67)
+#define CHIP_ERROR_INVALID_SERVICE_EP                          CHIP_CORE_ERROR(67)
 
 /**
  *  @def CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE
@@ -712,7 +705,7 @@
  *    A directory entry type is unknown.
  *
  */
-#define CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE                _CHIP_ERROR(68)
+#define CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE                CHIP_CORE_ERROR(68)
 
 /**
  *  @def CHIP_ERROR_FORCED_RESET
@@ -721,7 +714,7 @@
  *    A service manager is forced to reset.
  *
  */
-#define CHIP_ERROR_FORCED_RESET                                _CHIP_ERROR(69)
+#define CHIP_ERROR_FORCED_RESET                                CHIP_CORE_ERROR(69)
 
 /**
  *  @def CHIP_ERROR_NO_ENDPOINT
@@ -730,7 +723,7 @@
  *    No endpoint is available.
  *
  */
-#define CHIP_ERROR_NO_ENDPOINT                                 _CHIP_ERROR(70)
+#define CHIP_ERROR_NO_ENDPOINT                                 CHIP_CORE_ERROR(70)
 
 /**
  *  @def CHIP_ERROR_INVALID_DESTINATION_NODE_ID
@@ -739,7 +732,7 @@
  *    A destination node id is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_DESTINATION_NODE_ID                 _CHIP_ERROR(71)
+#define CHIP_ERROR_INVALID_DESTINATION_NODE_ID                 CHIP_CORE_ERROR(71)
 
 /**
  *  @def CHIP_ERROR_NOT_CONNECTED
@@ -749,7 +742,7 @@
  *    connected.
  *
  */
-#define CHIP_ERROR_NOT_CONNECTED                               _CHIP_ERROR(72)
+#define CHIP_ERROR_NOT_CONNECTED                               CHIP_CORE_ERROR(72)
 
 /**
  *  @def CHIP_ERROR_NO_SW_UPDATE_AVAILABLE
@@ -758,7 +751,7 @@
  *    No software update is available.
  *
  */
-#define CHIP_ERROR_NO_SW_UPDATE_AVAILABLE                      _CHIP_ERROR(73)
+#define CHIP_ERROR_NO_SW_UPDATE_AVAILABLE                      CHIP_CORE_ERROR(73)
 
 /**
  *  @def CHIP_ERROR_CA_CERT_NOT_FOUND
@@ -767,7 +760,7 @@
  *    CA certificate is not found.
  *
  */
-#define CHIP_ERROR_CA_CERT_NOT_FOUND                           _CHIP_ERROR(74)
+#define CHIP_ERROR_CA_CERT_NOT_FOUND                           CHIP_CORE_ERROR(74)
 
 /**
  *  @def CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED
@@ -776,7 +769,7 @@
  *    A certificate path length exceeds the constraint.
  *
  */
-#define CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED           _CHIP_ERROR(75)
+#define CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED           CHIP_CORE_ERROR(75)
 
 /**
  *  @def CHIP_ERROR_CERT_PATH_TOO_LONG
@@ -785,7 +778,7 @@
  *    A certificate path is too long.
  *
  */
-#define CHIP_ERROR_CERT_PATH_TOO_LONG                          _CHIP_ERROR(76)
+#define CHIP_ERROR_CERT_PATH_TOO_LONG                          CHIP_CORE_ERROR(76)
 
 /**
  *  @def CHIP_ERROR_CERT_USAGE_NOT_ALLOWED
@@ -794,7 +787,7 @@
  *    A requested certificate usage is not allowed.
  *
  */
-#define CHIP_ERROR_CERT_USAGE_NOT_ALLOWED                      _CHIP_ERROR(77)
+#define CHIP_ERROR_CERT_USAGE_NOT_ALLOWED                      CHIP_CORE_ERROR(77)
 
 /**
  *  @def CHIP_ERROR_CERT_EXPIRED
@@ -803,7 +796,7 @@
  *    A certificate expired.
  *
  */
-#define CHIP_ERROR_CERT_EXPIRED                                _CHIP_ERROR(78)
+#define CHIP_ERROR_CERT_EXPIRED                                CHIP_CORE_ERROR(78)
 
 /**
  *  @def CHIP_ERROR_CERT_NOT_VALID_YET
@@ -812,7 +805,7 @@
  *    A certificate is not valid yet.
  *
  */
-#define CHIP_ERROR_CERT_NOT_VALID_YET                          _CHIP_ERROR(79)
+#define CHIP_ERROR_CERT_NOT_VALID_YET                          CHIP_CORE_ERROR(79)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_CERT_FORMAT
@@ -821,7 +814,7 @@
  *    A certificate format is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_CERT_FORMAT                     _CHIP_ERROR(80)
+#define CHIP_ERROR_UNSUPPORTED_CERT_FORMAT                     CHIP_CORE_ERROR(80)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE
@@ -830,7 +823,7 @@
  *    An elliptic curve is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE                  _CHIP_ERROR(81)
+#define CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE                  CHIP_CORE_ERROR(81)
 
 /**
  *  @def CHIP_CERT_NOT_USED
@@ -839,7 +832,8 @@
  *    A certificate was not used during the chain validation.
  *
  */
-#define CHIP_CERT_NOT_USED                                     _CHIP_ERROR(82)
+#define CHIP_ERROR_CERT_NOT_USED                               CHIP_CORE_ERROR(82)
+#define CHIP_CERT_NOT_USED CHIP_ERROR_CERT_NOT_USED
 
 /**
  *  @def CHIP_ERROR_CERT_NOT_FOUND
@@ -848,7 +842,7 @@
  *    A certificate is not found.
  *
  */
-#define CHIP_ERROR_CERT_NOT_FOUND                              _CHIP_ERROR(83)
+#define CHIP_ERROR_CERT_NOT_FOUND                              CHIP_CORE_ERROR(83)
 
 /**
  *  @def CHIP_ERROR_INVALID_CASE_PARAMETER
@@ -857,7 +851,7 @@
  *    A CASE parameter is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_CASE_PARAMETER                      _CHIP_ERROR(84)
+#define CHIP_ERROR_INVALID_CASE_PARAMETER                      CHIP_CORE_ERROR(84)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION
@@ -866,7 +860,7 @@
  *    A CASE configuration is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION              _CHIP_ERROR(85)
+#define CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION              CHIP_CORE_ERROR(85)
 
 /**
  *  @def CHIP_ERROR_CERT_LOAD_FAILED
@@ -875,7 +869,7 @@
  *    A certificate load failed.
  *
  */
-#define CHIP_ERROR_CERT_LOAD_FAILED                             _CHIP_ERROR(86)
+#define CHIP_ERROR_CERT_LOAD_FAILED                            CHIP_CORE_ERROR(86)
 
 /**
  *  @def CHIP_ERROR_CERT_NOT_TRUSTED
@@ -884,7 +878,7 @@
  *    A certificate is not trusted.
  *
  */
-#define CHIP_ERROR_CERT_NOT_TRUSTED                            _CHIP_ERROR(87)
+#define CHIP_ERROR_CERT_NOT_TRUSTED                            CHIP_CORE_ERROR(87)
 
 /**
  *  @def CHIP_ERROR_INVALID_ACCESS_TOKEN
@@ -893,7 +887,7 @@
  *    An access token is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_ACCESS_TOKEN                        _CHIP_ERROR(88)
+#define CHIP_ERROR_INVALID_ACCESS_TOKEN                        CHIP_CORE_ERROR(88)
 
 /**
  *  @def CHIP_ERROR_WRONG_CERT_SUBJECT
@@ -902,7 +896,7 @@
  *    A certificate subject is wrong.
  *
  */
-#define CHIP_ERROR_WRONG_CERT_SUBJECT                          _CHIP_ERROR(89)
+#define CHIP_ERROR_WRONG_CERT_SUBJECT                          CHIP_CORE_ERROR(89)
 
 // deprecated alias
 #define CHIP_ERROR_WRONG_CERTIFICATE_SUBJECT CHIP_ERROR_WRONG_CERT_SUBJECT
@@ -914,7 +908,7 @@
  *    A provisioning bundle is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_PROVISIONING_BUNDLE                 _CHIP_ERROR(90)
+#define CHIP_ERROR_INVALID_PROVISIONING_BUNDLE                 CHIP_CORE_ERROR(90)
 
 /**
  *  @def CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR
@@ -923,7 +917,7 @@
  *    A provision bundle encountered a decryption error.
  *
  */
-#define CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR        _CHIP_ERROR(91)
+#define CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR        CHIP_CORE_ERROR(91)
 
 /**
  *  @def CHIP_ERROR_WRONG_NODE_ID
@@ -932,7 +926,7 @@
  *    A node id is wrong.
  *
  */
-#define CHIP_ERROR_WRONG_NODE_ID                               _CHIP_ERROR(92)
+#define CHIP_ERROR_WRONG_NODE_ID                               CHIP_CORE_ERROR(92)
 
 /**
  *  @def CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT
@@ -941,7 +935,7 @@
  *    A connection is accepted on a wrong port.
  *
  */
-#define CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT                 _CHIP_ERROR(93)
+#define CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT                 CHIP_CORE_ERROR(93)
 
 /**
  *  @def CHIP_ERROR_CALLBACK_REPLACED
@@ -950,7 +944,7 @@
  *    An application callback has been replaced.
  *
  */
-#define CHIP_ERROR_CALLBACK_REPLACED                           _CHIP_ERROR(94)
+#define CHIP_ERROR_CALLBACK_REPLACED                           CHIP_CORE_ERROR(94)
 
 /**
  *  @def CHIP_ERROR_NO_CASE_AUTH_DELEGATE
@@ -959,7 +953,7 @@
  *    No CASE authentication delegate is set.
  *
  */
-#define CHIP_ERROR_NO_CASE_AUTH_DELEGATE                       _CHIP_ERROR(95)
+#define CHIP_ERROR_NO_CASE_AUTH_DELEGATE                       CHIP_CORE_ERROR(95)
 
 /**
  *  @def CHIP_ERROR_DEVICE_LOCATE_TIMEOUT
@@ -968,7 +962,7 @@
  *    The attempt to locate device timed out.
  *
  */
-#define CHIP_ERROR_DEVICE_LOCATE_TIMEOUT                       _CHIP_ERROR(96)
+#define CHIP_ERROR_DEVICE_LOCATE_TIMEOUT                       CHIP_CORE_ERROR(96)
 
 /**
  *  @def CHIP_ERROR_DEVICE_CONNECT_TIMEOUT
@@ -977,7 +971,7 @@
  *    The attempt to connect device timed out.
  *
  */
-#define CHIP_ERROR_DEVICE_CONNECT_TIMEOUT                      _CHIP_ERROR(97)
+#define CHIP_ERROR_DEVICE_CONNECT_TIMEOUT                      CHIP_CORE_ERROR(97)
 
 /**
  *  @def CHIP_ERROR_DEVICE_AUTH_TIMEOUT
@@ -986,7 +980,7 @@
  *    The attempt to authenticate device timed out.
  *
  */
-#define CHIP_ERROR_DEVICE_AUTH_TIMEOUT                         _CHIP_ERROR(98)
+#define CHIP_ERROR_DEVICE_AUTH_TIMEOUT                         CHIP_CORE_ERROR(98)
 
 /**
  *  @def CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED
@@ -995,7 +989,7 @@
  *    A message is not acknowledged after max retries.
  *
  */
-#define CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED                    _CHIP_ERROR(99)
+#define CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED                    CHIP_CORE_ERROR(99)
 
 /**
  *  @def CHIP_ERROR_RETRANS_TABLE_FULL
@@ -1004,7 +998,7 @@
  *    A retransmission table is already full.
  *
  */
-#define CHIP_ERROR_RETRANS_TABLE_FULL                          _CHIP_ERROR(100)
+#define CHIP_ERROR_RETRANS_TABLE_FULL                          CHIP_CORE_ERROR(100)
 
 /**
  *  @def CHIP_ERROR_INVALID_ACK_ID
@@ -1013,7 +1007,7 @@
  *    An acknowledgment id is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_ACK_ID                              _CHIP_ERROR(101)
+#define CHIP_ERROR_INVALID_ACK_ID                              CHIP_CORE_ERROR(101)
 
 /**
  *  @def CHIP_ERROR_SEND_THROTTLED
@@ -1022,7 +1016,7 @@
  *    A send is throttled.
  *
  */
-#define CHIP_ERROR_SEND_THROTTLED                              _CHIP_ERROR(102)
+#define CHIP_ERROR_SEND_THROTTLED                              CHIP_CORE_ERROR(102)
 
 /**
  *  @def CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE
@@ -1031,7 +1025,7 @@
  *    A message version is not supported by the current exchange context.
  *
  */
-#define CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE              _CHIP_ERROR(103)
+#define CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE              CHIP_CORE_ERROR(103)
 
 /**
  *  @def CHIP_ERROR_TRANSACTION_CANCELED
@@ -1040,7 +1034,7 @@
  *    A transaction is cancelled.
  *
  */
-#define CHIP_ERROR_TRANSACTION_CANCELED                        _CHIP_ERROR(104)
+#define CHIP_ERROR_TRANSACTION_CANCELED                        CHIP_CORE_ERROR(104)
 
 /**
  *  @def CHIP_ERROR_LISTENER_ALREADY_STARTED
@@ -1049,7 +1043,7 @@
  *    A listener has already started.
  *
  */
-#define CHIP_ERROR_LISTENER_ALREADY_STARTED                    _CHIP_ERROR(105)
+#define CHIP_ERROR_LISTENER_ALREADY_STARTED                    CHIP_CORE_ERROR(105)
 
 /**
  *  @def CHIP_ERROR_LISTENER_ALREADY_STOPPED
@@ -1058,7 +1052,7 @@
  *    A listener has already stopped.
  *
  */
-#define CHIP_ERROR_LISTENER_ALREADY_STOPPED                    _CHIP_ERROR(106)
+#define CHIP_ERROR_LISTENER_ALREADY_STOPPED                    CHIP_CORE_ERROR(106)
 
 /**
  *  @def CHIP_ERROR_UNKNOWN_TOPIC
@@ -1067,7 +1061,7 @@
  *    A topic ID was unknown to the recipient.
  *
  */
-#define CHIP_ERROR_UNKNOWN_TOPIC                               _CHIP_ERROR(107)
+#define CHIP_ERROR_UNKNOWN_TOPIC                               CHIP_CORE_ERROR(107)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
@@ -1076,7 +1070,7 @@
  *    A CHIP feature is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE                   _CHIP_ERROR(108)
+#define CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE                    CHIP_CORE_ERROR(108)
 
 /**
  *  @def CHIP_ERROR_PASE_RECONFIGURE_REQUIRED
@@ -1085,7 +1079,7 @@
  *    PASE is required to reconfigure.
  *
  */
-#define CHIP_ERROR_PASE_RECONFIGURE_REQUIRED                   _CHIP_ERROR(109)
+#define CHIP_ERROR_PASE_RECONFIGURE_REQUIRED                   CHIP_CORE_ERROR(109)
 
 /**
  *  @def CHIP_ERROR_INVALID_PASE_CONFIGURATION
@@ -1094,7 +1088,7 @@
  *    A PASE configuration is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_PASE_CONFIGURATION                  _CHIP_ERROR(110)
+#define CHIP_ERROR_INVALID_PASE_CONFIGURATION                  CHIP_CORE_ERROR(110)
 
 /**
  *  @def CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS
@@ -1103,7 +1097,7 @@
  *    No PASE configuration is in common.
  *
  */
-#define CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS               _CHIP_ERROR(111)
+#define CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS               CHIP_CORE_ERROR(111)
 
 /**
  *  @def CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR
@@ -1112,7 +1106,7 @@
  *    An unsolicited message with the originator bit clear.
  *
  */
-#define CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR               _CHIP_ERROR(112)
+#define CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR               CHIP_CORE_ERROR(112)
 
 /**
  *  @def CHIP_ERROR_INVALID_FABRIC_ID
@@ -1121,7 +1115,11 @@
  *    A fabric id is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_FABRIC_ID                           _CHIP_ERROR(113)
+#define CHIP_ERROR_INVALID_FABRIC_ID                           CHIP_CORE_ERROR(113)
+
+// unused                                                      CHIP_CORE_ERROR(114)
+// unused                                                      CHIP_CORE_ERROR(115)
+// unused                                                      CHIP_CORE_ERROR(116)
 
 /**
  *  @def CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED
@@ -1130,7 +1128,7 @@
  *    DRBG entropy source failed to generate entropy data.
  *
  */
-#define CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED                  _CHIP_ERROR(117)
+#define CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED                  CHIP_CORE_ERROR(117)
 
 /**
  *  @def CHIP_ERROR_TLV_TAG_NOT_FOUND
@@ -1139,7 +1137,7 @@
  *    A specified TLV tag was not found.
  *
  */
-#define CHIP_ERROR_TLV_TAG_NOT_FOUND                           _CHIP_ERROR(118)
+#define CHIP_ERROR_TLV_TAG_NOT_FOUND                           CHIP_CORE_ERROR(118)
 
 /**
  *  @def CHIP_ERROR_INVALID_TOKENPAIRINGBUNDLE
@@ -1148,7 +1146,7 @@
  *    A token pairing bundle is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_TOKENPAIRINGBUNDLE                  _CHIP_ERROR(119)
+#define CHIP_ERROR_INVALID_TOKENPAIRINGBUNDLE                  CHIP_CORE_ERROR(119)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_TOKENPAIRINGBUNDLE_VERSION
@@ -1157,7 +1155,7 @@
  *    A token pairing bundle is invalid.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_TOKENPAIRINGBUNDLE_VERSION      _CHIP_ERROR(120)
+#define CHIP_ERROR_UNSUPPORTED_TOKENPAIRINGBUNDLE_VERSION      CHIP_CORE_ERROR(120)
 
 /**
  *  @def CHIP_ERROR_NO_TAKE_AUTH_DELEGATE
@@ -1166,7 +1164,7 @@
  *    No TAKE authentication delegate is set.
  *
  */
-#define CHIP_ERROR_NO_TAKE_AUTH_DELEGATE                       _CHIP_ERROR(121)
+#define CHIP_ERROR_NO_TAKE_AUTH_DELEGATE                       CHIP_CORE_ERROR(121)
 
 /**
  *  @def CHIP_ERROR_TAKE_RECONFIGURE_REQUIRED
@@ -1175,7 +1173,7 @@
  *    TAKE requires a reconfigure.
  *
  */
-#define CHIP_ERROR_TAKE_RECONFIGURE_REQUIRED                   _CHIP_ERROR(122)
+#define CHIP_ERROR_TAKE_RECONFIGURE_REQUIRED                   CHIP_CORE_ERROR(122)
 
 /**
  *  @def CHIP_ERROR_TAKE_REAUTH_POSSIBLE
@@ -1184,7 +1182,7 @@
  *    TAKE can do a reauthentication.
  *
  */
-#define CHIP_ERROR_TAKE_REAUTH_POSSIBLE                        _CHIP_ERROR(123)
+#define CHIP_ERROR_TAKE_REAUTH_POSSIBLE                        CHIP_CORE_ERROR(123)
 
 /**
  *  @def CHIP_ERROR_INVALID_TAKE_PARAMETER
@@ -1193,7 +1191,7 @@
  *    Received an invalid TAKE paramter.
  *
  */
-#define CHIP_ERROR_INVALID_TAKE_PARAMETER                      _CHIP_ERROR(124)
+#define CHIP_ERROR_INVALID_TAKE_PARAMETER                      CHIP_CORE_ERROR(124)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_TAKE_CONFIGURATION
@@ -1202,7 +1200,7 @@
  *    This configuration is not supported by TAKE.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_TAKE_CONFIGURATION              _CHIP_ERROR(125)
+#define CHIP_ERROR_UNSUPPORTED_TAKE_CONFIGURATION              CHIP_CORE_ERROR(125)
 
 /**
  *  @def CHIP_ERROR_TAKE_TOKEN_IDENTIFICATION_FAILED
@@ -1211,7 +1209,7 @@
  *    The TAKE Token Identification failed.
  *
  */
-#define CHIP_ERROR_TAKE_TOKEN_IDENTIFICATION_FAILED            _CHIP_ERROR(126)
+#define CHIP_ERROR_TAKE_TOKEN_IDENTIFICATION_FAILED            CHIP_CORE_ERROR(126)
 
 /**
  *  @def CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER
@@ -1220,7 +1218,7 @@
  *    The encryption key is not found error received from a peer node.
  *
  */
-#define CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER                     _CHIP_ERROR(127)
+#define CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER                     CHIP_CORE_ERROR(127)
 
 /**
  *  @def CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER
@@ -1229,7 +1227,7 @@
  *    The wrong encryption type error received from a peer node.
  *
  */
-#define CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER             _CHIP_ERROR(128)
+#define CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER             CHIP_CORE_ERROR(128)
 
 /**
  *  @def CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER
@@ -1238,7 +1236,7 @@
  *    The unknown key type error received from a peer node.
  *
  */
-#define CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER                  _CHIP_ERROR(129)
+#define CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER                  CHIP_CORE_ERROR(129)
 
 /**
  *  @def CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER
@@ -1247,7 +1245,7 @@
  *    The invalid use of session key error received from a peer node.
  *
  */
-#define CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER        _CHIP_ERROR(130)
+#define CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER        CHIP_CORE_ERROR(130)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER
@@ -1256,7 +1254,7 @@
  *    An unsupported encryption type error received from a peer node.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER       _CHIP_ERROR(131)
+#define CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER       CHIP_CORE_ERROR(131)
 
 /**
  *  @def CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER
@@ -1265,7 +1263,7 @@
  *    The internal key error received from a peer node.
  *
  */
-#define CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER                _CHIP_ERROR(132)
+#define CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER                CHIP_CORE_ERROR(132)
 
 /**
  *  @def CHIP_ERROR_INVALID_KEY_ID
@@ -1274,7 +1272,7 @@
  *    A key id is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_KEY_ID                              _CHIP_ERROR(133)
+#define CHIP_ERROR_INVALID_KEY_ID                              CHIP_CORE_ERROR(133)
 
 /**
  *  @def CHIP_ERROR_INVALID_TIME
@@ -1283,7 +1281,7 @@
  *    Time has invalid value.
  *
  */
-#define CHIP_ERROR_INVALID_TIME                                _CHIP_ERROR(134)
+#define CHIP_ERROR_INVALID_TIME                                CHIP_CORE_ERROR(134)
 
 /**
  *  @def CHIP_ERROR_LOCKING_FAILURE
@@ -1292,7 +1290,7 @@
  *    Failure to acquire or release an OS provided mutex.
  *
  */
-#define CHIP_ERROR_LOCKING_FAILURE                             _CHIP_ERROR(135)
+#define CHIP_ERROR_LOCKING_FAILURE                             CHIP_CORE_ERROR(135)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG
@@ -1301,7 +1299,7 @@
  *    A passcode encryption configuration is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG                 _CHIP_ERROR(136)
+#define CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG                 CHIP_CORE_ERROR(136)
 
 /**
  *  @def CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED
@@ -1310,7 +1308,7 @@
  *    The CHIP passcode authentication failed.
  *
  */
-#define CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED              _CHIP_ERROR(137)
+#define CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED              CHIP_CORE_ERROR(137)
 
 /**
  *  @def CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED
@@ -1319,7 +1317,7 @@
  *    The CHIP passcode fingerprint failed.
  *
  */
-#define CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED                 _CHIP_ERROR(138)
+#define CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED                 CHIP_CORE_ERROR(138)
 
 /**
  *  @def CHIP_ERROR_SERIALIZATION_ELEMENT_NULL
@@ -1328,7 +1326,7 @@
  *      The element of the struct is null.
  *
  */
-#define CHIP_ERROR_SERIALIZATION_ELEMENT_NULL                  _CHIP_ERROR(139)
+#define CHIP_ERROR_SERIALIZATION_ELEMENT_NULL                  CHIP_CORE_ERROR(139)
 
 /**
  *  @def CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM
@@ -1337,7 +1335,7 @@
  *    The certificate was not signed using the required signature algorithm.
  *
  */
-#define CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM              _CHIP_ERROR(140)
+#define CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM              CHIP_CORE_ERROR(140)
 
 /**
  *  @def CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM
@@ -1346,7 +1344,7 @@
  *    The CHIP signature was not signed using the required signature algorithm.
  *
  */
-#define CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM             _CHIP_ERROR(141)
+#define CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM              CHIP_CORE_ERROR(141)
 
 /**
  *  @def CHIP_ERROR_SCHEMA_MISMATCH
@@ -1355,7 +1353,7 @@
  *    A mismatch in schema was encountered.
  *
  */
-#define CHIP_ERROR_SCHEMA_MISMATCH                            _CHIP_ERROR(142)
+#define CHIP_ERROR_SCHEMA_MISMATCH                             CHIP_CORE_ERROR(142)
 
 /**
  *  @def CHIP_ERROR_INVALID_INTEGER_VALUE
@@ -1364,7 +1362,7 @@
  *    An integer does not have the kind of value we expect.
  *
  */
-#define CHIP_ERROR_INVALID_INTEGER_VALUE                       _CHIP_ERROR(143)
+#define CHIP_ERROR_INVALID_INTEGER_VALUE                       CHIP_CORE_ERROR(143)
 
 /**
  *  @def CHIP_ERROR_CASE_RECONFIG_REQUIRED
@@ -1373,7 +1371,7 @@
  *    CASE is required to reconfigure.
  *
  */
-#define CHIP_ERROR_CASE_RECONFIG_REQUIRED                      _CHIP_ERROR(144)
+#define CHIP_ERROR_CASE_RECONFIG_REQUIRED                      CHIP_CORE_ERROR(144)
 
 /**
  *  @def CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS
@@ -1382,7 +1380,7 @@
  *    Too many CASE reconfigurations were received.
  *
  */
-#define CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS              _CHIP_ERROR(145)
+#define CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS              CHIP_CORE_ERROR(145)
 
 /**
  *  @def CHIP_ERROR_BAD_REQUEST
@@ -1391,7 +1389,7 @@
  *    The request cannot be processed or fulfilled
  *
  */
-#define CHIP_ERROR_BAD_REQUEST                                 _CHIP_ERROR(146)
+#define CHIP_ERROR_BAD_REQUEST                                 CHIP_CORE_ERROR(146)
 
 /**
  *  @def CHIP_ERROR_INVALID_MESSAGE_FLAG
@@ -1400,7 +1398,7 @@
  *    One or more message flags have invalid value.
  *
  */
-#define CHIP_ERROR_INVALID_MESSAGE_FLAG                        _CHIP_ERROR(147)
+#define CHIP_ERROR_INVALID_MESSAGE_FLAG                        CHIP_CORE_ERROR(147)
 
 /**
  *  @def CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED
@@ -1409,7 +1407,7 @@
  *    Key export protocol required to reconfigure.
  *
  */
-#define CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED             _CHIP_ERROR(148)
+#define CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED             CHIP_CORE_ERROR(148)
 
 /**
  *  @def CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION
@@ -1418,7 +1416,7 @@
  *    A key export protocol configuration is invalid.
  *
  */
-#define CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION            _CHIP_ERROR(149)
+#define CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION            CHIP_CORE_ERROR(149)
 
 /**
  *  @def CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS
@@ -1427,7 +1425,7 @@
  *    No key export protocol configuration is in common.
  *
  */
-#define CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS         _CHIP_ERROR(150)
+#define CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS         CHIP_CORE_ERROR(150)
 
 /**
  *  @def CHIP_ERROR_NO_KEY_EXPORT_DELEGATE
@@ -1436,7 +1434,7 @@
  *    No key export delegate is set.
  *
  */
-#define CHIP_ERROR_NO_KEY_EXPORT_DELEGATE                      _CHIP_ERROR(151)
+#define CHIP_ERROR_NO_KEY_EXPORT_DELEGATE                      CHIP_CORE_ERROR(151)
 
 /**
  *  @def CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST
@@ -1445,7 +1443,7 @@
  *    Unauthorized key export request.
  *
  */
-#define CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST             _CHIP_ERROR(152)
+#define CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST             CHIP_CORE_ERROR(152)
 
 /**
  *  @def CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE
@@ -1454,7 +1452,7 @@
  *    Unauthorized key export response.
  *
  */
-#define CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE            _CHIP_ERROR(153)
+#define CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE            CHIP_CORE_ERROR(153)
 
 /**
  *  @def CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED
@@ -1463,7 +1461,7 @@
  *    The CHIP exported encrypted key authentication failed.
  *
  */
-#define CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED          _CHIP_ERROR(154)
+#define CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED          CHIP_CORE_ERROR(154)
 
 /**
  *  @def CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES
@@ -1473,7 +1471,7 @@
  *    the maximum limit.
  *
  */
-#define CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES           _CHIP_ERROR(155)
+#define CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES           CHIP_CORE_ERROR(155)
 
 /**
  * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_ELEMENT
@@ -1482,7 +1480,7 @@
  *   The Attribute DataElement is malformed: it either does not contain
  *   the required elements
  */
-#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_ELEMENT         _CHIP_ERROR(156)
+#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_ELEMENT         CHIP_CORE_ERROR(156)
 
 /**
  * @def CHIP_ERROR_WRONG_CERT_TYPE
@@ -1490,7 +1488,7 @@
  * @brief
  *   The presented certificate was of the wrong type.
  */
-#define CHIP_ERROR_WRONG_CERT_TYPE                             _CHIP_ERROR(157)
+#define CHIP_ERROR_WRONG_CERT_TYPE                             CHIP_CORE_ERROR(157)
 
 /**
  * @def CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED
@@ -1499,7 +1497,7 @@
  *   The application's event handler failed to call the default event handler function
  *   when presented with an unknown event.
  */
-#define CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED            _CHIP_ERROR(158)
+#define CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED            CHIP_CORE_ERROR(158)
 
 /**
  *  @def CHIP_ERROR_PERSISTED_STORAGE_FAILED
@@ -1508,7 +1506,7 @@
  *    Persisted storage memory read/write failure.
  *
  */
-#define CHIP_ERROR_PERSISTED_STORAGE_FAILED                    _CHIP_ERROR(159)
+#define CHIP_ERROR_PERSISTED_STORAGE_FAILED                    CHIP_CORE_ERROR(159)
 
 /**
  *  @def CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND
@@ -1517,7 +1515,7 @@
  *    The specific value is not found in the persisted storage.
  *
  */
-#define CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND           _CHIP_ERROR(160)
+#define CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND           CHIP_CORE_ERROR(160)
 
 /**
  *  @def CHIP_ERROR_PROFILE_STRING_CONTEXT_ALREADY_REGISTERED
@@ -1526,7 +1524,7 @@
  *    The specified profile string support context is already registered.
  *
  */
-#define CHIP_ERROR_PROFILE_STRING_CONTEXT_ALREADY_REGISTERED   _CHIP_ERROR(161)
+#define CHIP_ERROR_PROFILE_STRING_CONTEXT_ALREADY_REGISTERED   CHIP_CORE_ERROR(161)
 
 /**
  *  @def CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED
@@ -1535,7 +1533,7 @@
  *    The specified profile string support context is not registered.
  *
  */
-#define CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED       _CHIP_ERROR(162)
+#define CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED       CHIP_CORE_ERROR(162)
 
 /**
  *  @def CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION
@@ -1543,7 +1541,7 @@
  *  @brief
  *    Encountered a mismatch in compatibility w.r.t to IDL schema version
  */
-#define CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION                 _CHIP_ERROR(163)
+#define CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION                 CHIP_CORE_ERROR(163)
 
 /**
  *  @def CHIP_ERROR_MISMATCH_UPDATE_REQUIRED_VERSION
@@ -1551,8 +1549,7 @@
  *  @brief
  *    Encountered a mismatch between update required version and current version
  */
-#define CHIP_ERROR_MISMATCH_UPDATE_REQUIRED_VERSION            _CHIP_ERROR(164)
-
+#define CHIP_ERROR_MISMATCH_UPDATE_REQUIRED_VERSION            CHIP_CORE_ERROR(164)
 
 /**
  *  @def CHIP_ERROR_ACCESS_DENIED
@@ -1560,7 +1557,7 @@
  *  @brief
  *    The CHIP message is not granted access for further processing.
  */
-#define CHIP_ERROR_ACCESS_DENIED                               _CHIP_ERROR(165)
+#define CHIP_ERROR_ACCESS_DENIED                               CHIP_CORE_ERROR(165)
 
 /**
  *  @def CHIP_ERROR_UNKNOWN_RESOURCE_ID
@@ -1569,7 +1566,7 @@
  *    Unknown resource ID
  *
  */
-#define CHIP_ERROR_UNKNOWN_RESOURCE_ID                         _CHIP_ERROR(166)
+#define CHIP_ERROR_UNKNOWN_RESOURCE_ID                         CHIP_CORE_ERROR(166)
 
 /**
  * @def CHIP_ERROR_VERSION_MISMATCH
@@ -1579,7 +1576,7 @@
  *   because the local changes are based on an obsolete version of the
  *   data.
  */
-#define CHIP_ERROR_VERSION_MISMATCH                            _CHIP_ERROR(167)
+#define CHIP_ERROR_VERSION_MISMATCH                            CHIP_CORE_ERROR(167)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE
@@ -1590,7 +1587,7 @@
  *    together with CHIP Fabric using CrateFabric() message.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE           _CHIP_ERROR(168)
+#define CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE           CHIP_CORE_ERROR(168)
 
 /**
  *  @def CHIP_ERROR_INCONSISTENT_CONDITIONALITY
@@ -1601,7 +1598,7 @@
  *    same Trait Instance.
  *
  */
-#define CHIP_ERROR_INCONSISTENT_CONDITIONALITY                 _CHIP_ERROR(169)
+#define CHIP_ERROR_INCONSISTENT_CONDITIONALITY                 CHIP_CORE_ERROR(169)
 
 /**
  *  @def CHIP_ERROR_LOCAL_DATA_INCONSISTENT
@@ -1611,7 +1608,7 @@
  *    Trait Instance and cannot support the operation requested.
  *
  */
-#define CHIP_ERROR_LOCAL_DATA_INCONSISTENT                     _CHIP_ERROR(170)
+#define CHIP_ERROR_LOCAL_DATA_INCONSISTENT                     CHIP_CORE_ERROR(170)
 
 /**
  * @def CHIP_EVENT_ID_FOUND
@@ -1619,7 +1616,8 @@
  * @brief
  *   Event ID matching the criteria was found
  */
-#define CHIP_EVENT_ID_FOUND                                    _CHIP_ERROR(171)
+#define CHIP_ERROR_EVENT_ID_FOUND                              CHIP_CORE_ERROR(171)
+#define CHIP_EVENT_ID_FOUND CHIP_ERROR_EVENT_ID_FOUND
 
 /**
  * @def CHIP_ERROR_INTERNAL
@@ -1627,7 +1625,7 @@
  * @brief
  *   Internal error
  */
-#define CHIP_ERROR_INTERNAL                                    _CHIP_ERROR(172)
+#define CHIP_ERROR_INTERNAL                                    CHIP_CORE_ERROR(172)
 
 /**
  * @def CHIP_ERROR_OPEN_FAILED
@@ -1635,7 +1633,7 @@
  * @brief
  *   Open file failed
  */
-#define CHIP_ERROR_OPEN_FAILED                                 _CHIP_ERROR(173)
+#define CHIP_ERROR_OPEN_FAILED                                 CHIP_CORE_ERROR(173)
 
 /**
  * @def CHIP_ERROR_READ_FAILED
@@ -1643,7 +1641,7 @@
  * @brief
  *   Read from file failed
  */
-#define CHIP_ERROR_READ_FAILED                                 _CHIP_ERROR(174)
+#define CHIP_ERROR_READ_FAILED                                 CHIP_CORE_ERROR(174)
 
 /**
  * @def CHIP_ERROR_WRITE_FAILED
@@ -1651,7 +1649,7 @@
  * @brief
  *   Write to file failed
  */
-#define CHIP_ERROR_WRITE_FAILED                                _CHIP_ERROR(175)
+#define CHIP_ERROR_WRITE_FAILED                                CHIP_CORE_ERROR(175)
 
 /**
  * @def CHIP_ERROR_DECODE_FAILED
@@ -1659,8 +1657,7 @@
  * @brief
  *   Decoding failed
  */
-#define CHIP_ERROR_DECODE_FAILED                               _CHIP_ERROR(176)
-
+#define CHIP_ERROR_DECODE_FAILED                               CHIP_CORE_ERROR(176)
 
 /**
  *  @def CHIP_ERROR_SESSION_KEY_SUSPENDED
@@ -1669,7 +1666,7 @@
  *    Use of the identified session key is suspended.
  *
  */
-#define CHIP_ERROR_SESSION_KEY_SUSPENDED                       _CHIP_ERROR(177)
+#define CHIP_ERROR_SESSION_KEY_SUSPENDED                       CHIP_CORE_ERROR(177)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN
@@ -1678,7 +1675,7 @@
  *    The specified wireless regulatory domain is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN      _CHIP_ERROR(178)
+#define CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN      CHIP_CORE_ERROR(178)
 
 /**
  *  @def CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION
@@ -1687,7 +1684,7 @@
  *    The specified wireless operating location is unsupported.
  *
  */
-#define CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION     _CHIP_ERROR(179)
+#define CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION     CHIP_CORE_ERROR(179)
 
 /**
  *  @def CHIP_ERROR_MDNS_COLLISSION
@@ -1696,7 +1693,7 @@
  *    The registered service name has collision on the LAN.
  *
  */
-#define CHIP_ERROR_MDNS_COLLISSION _CHIP_ERROR(180)
+#define CHIP_ERROR_MDNS_COLLISSION                             CHIP_CORE_ERROR(180)
 
 /**
  * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH
@@ -1705,7 +1702,7 @@
  *   The Attribute path is malformed: it either does not contain
  *   the required path
  */
-#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH                      _CHIP_ERROR(181)
+#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH                 CHIP_CORE_ERROR(181)
 
 /**
  * @def CHIP_ERROR_IM_MALFORMED_EVENT_PATH
@@ -1714,7 +1711,7 @@
  *   The Attribute Path is malformed: it either does not contain
  *   the required elements
  */
-#define CHIP_ERROR_IM_MALFORMED_EVENT_PATH                         _CHIP_ERROR(182)
+#define CHIP_ERROR_IM_MALFORMED_EVENT_PATH                     CHIP_CORE_ERROR(182)
 
 /**
  * @def CHIP_ERROR_IM_MALFORMED_COMMAND_PATH
@@ -1723,7 +1720,7 @@
  *   The Attribute DataElement is malformed: it either does not contain
  *   the required elements
  */
-#define CHIP_ERROR_IM_MALFORMED_COMMAND_PATH                     _CHIP_ERROR(183)
+#define CHIP_ERROR_IM_MALFORMED_COMMAND_PATH                   CHIP_CORE_ERROR(183)
 
 /**
  * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_ELEMENT
@@ -1732,7 +1729,7 @@
  *   The Attribute DataElement is malformed: it either does not contain
  *   the required elements
  */
-#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_ELEMENT                      _CHIP_ERROR(184)
+#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_ELEMENT       CHIP_CORE_ERROR(184)
 
 /**
  * @def CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT
@@ -1741,7 +1738,7 @@
  *   The Attribute DataElement is malformed: it either does not contain
  *   the required elements
  */
-#define CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT                      _CHIP_ERROR(185)
+#define CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT           CHIP_CORE_ERROR(185)
 
 /**
  * @def CHIP_ERROR_IM_MALFORMED_EVENT_DATA_ELEMENT
@@ -1750,7 +1747,7 @@
  *   The Event DataElement is malformed: it either does not contain
  *   the required elements
  */
-#define CHIP_ERROR_IM_MALFORMED_EVENT_DATA_ELEMENT                       _CHIP_ERROR(186)
+#define CHIP_ERROR_IM_MALFORMED_EVENT_DATA_ELEMENT             CHIP_CORE_ERROR(186)
 
 /**
  * @def CHIP_ERROR_IM_MALFORMED_STATUS_CODE
@@ -1759,7 +1756,7 @@
  *   The Attribute DataElement is malformed: it either does not contain
  *   the required elements
  */
-#define CHIP_ERROR_IM_MALFORMED_STATUS_CODE                      _CHIP_ERROR(187)
+#define CHIP_ERROR_IM_MALFORMED_STATUS_CODE                    CHIP_CORE_ERROR(187)
 
 /**
  * @def CHIP_ERROR_PEER_NODE_NOT_FOUND
@@ -1767,7 +1764,7 @@
  * @brief
  *   Unable to find the peer node
  */
-#define CHIP_ERROR_PEER_NODE_NOT_FOUND                           _CHIP_ERROR(188)
+#define CHIP_ERROR_PEER_NODE_NOT_FOUND                         CHIP_CORE_ERROR(188)
 
 /**
  * @def CHIP_ERROR_HSM
@@ -1775,7 +1772,7 @@
  * @brief
  *   Error in Hardware security module. Used for software fallback option.
  */
-#define CHIP_ERROR_HSM                      					_CHIP_ERROR(189)
+#define CHIP_ERROR_HSM                                         CHIP_CORE_ERROR(189)
 
 /**
  * @def CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED
@@ -1783,7 +1780,50 @@
  * @brief
  *   The commissioner doesn't require an intermediate CA to sign the operational certificates.
  */
-#define CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED                      _CHIP_ERROR(190)
+#define CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED                CHIP_CORE_ERROR(190)
+
+/**
+ *  @def CHIP_ERROR_REAL_TIME_NOT_SYNCED
+ *
+ *  @brief
+ *      The system's real time clock is not synchronized to an accurate time source.
+ */
+#define CHIP_ERROR_REAL_TIME_NOT_SYNCED                        CHIP_CORE_ERROR(191)
+
+/**
+ *  @def CHIP_ERROR_UNEXPECTED_EVENT
+ *
+ *  @brief
+ *      An unexpected event was encountered.
+ */
+#define CHIP_ERROR_UNEXPECTED_EVENT                            CHIP_CORE_ERROR(192)
+
+/**
+ *  @def CHIP_ERROR_ENDPOINT_POOL_FULL
+ *
+ *  @brief
+ *    No endpoint pool entry is available.
+ *
+ */
+#define CHIP_ERROR_ENDPOINT_POOL_FULL                          CHIP_CORE_ERROR(193)
+
+/**
+ *  @def CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG
+ *
+ *  @brief
+ *    More inbound message data is pending than available buffer space available to copy it.
+ *
+ */
+#define CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG                     CHIP_CORE_ERROR(194)
+
+/**
+ *  @def CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG
+ *
+ *  @brief
+ *    More outbound message data is pending than available buffer space available to copy it.
+ *
+ */
+#define CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG                    CHIP_CORE_ERROR(195)
 
 /**
  * @def CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED
@@ -1791,7 +1831,7 @@
  * @brief
  *   The received message is a duplicate of a previously received message.
  */
-#define CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED                      _CHIP_ERROR(191)
+#define CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED                  CHIP_CORE_ERROR(196)
 
 /**
  *  @}
@@ -1806,6 +1846,6 @@
 namespace chip {
 
 extern void RegisterCHIPLayerErrorFormatter();
-extern bool FormatCHIPError(char * buf, uint16_t bufSize, int32_t err);
+extern bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err);
 
 } // namespace chip
diff --git a/src/lib/core/CHIPTLVUtilities.cpp b/src/lib/core/CHIPTLVUtilities.cpp
index 32d428f..f0f9691 100644
--- a/src/lib/core/CHIPTLVUtilities.cpp
+++ b/src/lib/core/CHIPTLVUtilities.cpp
@@ -54,7 +54,7 @@
  *                              any encountered arrays or structures should be
  *                              descended into.
  *
- *  @retval  #CHIP_END_OF_TLV  On a successful iteration to the end of a TLV encoding,
+ *  @retval  #CHIP_END_OF_TLV   On a successful iteration to the end of a TLV encoding,
  *                              or to the end of a TLV container.
  *
  *  @retval  The last value returned by @a aHandler, if different than #CHIP_NO_ERROR
@@ -239,7 +239,7 @@
  *
  *  @retval  #CHIP_ERROR_INVALID_ARGUMENT  If @a aContext is NULL.
  *
- *  @retval  #CHIP_ERROR_MAX               If the specified tag is found.
+ *  @retval  #CHIP_ERROR_SENTINEL          If the specified tag is found.
  *
  */
 static CHIP_ERROR FindHandler(const TLVReader & aReader, size_t aDepth, void * aContext)
@@ -251,7 +251,7 @@
     {
         theContext->mReader.Init(aReader);
         // terminate the iteration when the specified tag is found
-        return CHIP_ERROR_MAX;
+        return CHIP_ERROR_SENTINEL;
     }
 
     return CHIP_NO_ERROR;
@@ -302,7 +302,7 @@
     FindContext theContext = { aTag, aResult };
     CHIP_ERROR retval      = Iterate(aReader, FindHandler, &theContext, aRecurse);
 
-    if (retval == CHIP_ERROR_MAX)
+    if (retval == CHIP_ERROR_SENTINEL)
         retval = CHIP_NO_ERROR;
     else
         retval = CHIP_ERROR_TLV_TAG_NOT_FOUND;
@@ -329,7 +329,7 @@
 
     err = theContext->mHandler(aReader, aDepth, theContext->mContext);
 
-    if (err == CHIP_ERROR_MAX)
+    if (err == CHIP_ERROR_SENTINEL)
         theContext->mResult.Init(aReader);
 
     return err;
@@ -338,7 +338,7 @@
 /**
  *  Search for the first element matching the predicate within the TLV reader
  *  descending into arrays or structures. The @a aPredicate is applied
- *  to each visited TLV element; the @a aPredicate shall return #CHIP_ERROR_MAX
+ *  to each visited TLV element; the @a aPredicate shall return #CHIP_ERROR_SENTINEL
  *  for the matching elements, #CHIP_NO_ERROR for non-matching elements, and any
  *  other value to terminate the search.
  *
@@ -347,10 +347,10 @@
  *  @param[in] aPredicate  A predicate to be applied to each TLV element.  To
  *                         support the code reuse, aPredicate has the
  *                         IterateHandler type.  The return value of aPredicate
- *                         controls the search: a #CHIP_ERROR_MAX signals that
+ *                         controls the search: a #CHIP_ERROR_SENTINEL signals that
  *                         desired element has been found, #CHIP_NO_ERROR
  *                         signals that the desired element has not been found,
- *                         and all other values signal that the saerch should be
+ *                         and all other values signal that the search should be
  *                         terminated.
  *  @param[in] aContext    An optional pointer to caller-provided context data.
  *
@@ -371,7 +371,7 @@
 /**
  *  Search for the first element matching the predicate within the TLV reader
  *  optionally descending into arrays or structures. The @a aPredicate is applied
- *  to each visited TLV element; the @a aPredicate shall return #CHIP_ERROR_MAX
+ *  to each visited TLV element; the @a aPredicate shall return #CHIP_ERROR_SENTINEL
  *  for the matching elements, #CHIP_NO_ERROR for non-matching elements, and any
  *  other value to terminate the search.
  *
@@ -380,7 +380,7 @@
  *  @param[in] aPredicate  A predicate to be applied to each TLV element.  To
  *                         support the code reuse, aPredicate has the
  *                         @a IterateHandler type.  The return value of aPredicate
- *                         controls the search: a #CHIP_ERROR_MAX signals that
+ *                         controls the search: a #CHIP_ERROR_SENTINEL signals that
  *                         desired element has been found, #CHIP_NO_ERROR
  *                         signals that the desired element has not been found,
  *                         and all other values signal that the saerch should be
@@ -405,7 +405,7 @@
 
     retval = Iterate(aReader, FindPredicateHandler, &theContext, aRecurse);
 
-    if (retval == CHIP_ERROR_MAX)
+    if (retval == CHIP_ERROR_SENTINEL)
         retval = CHIP_NO_ERROR;
     else
         retval = CHIP_ERROR_TLV_TAG_NOT_FOUND;
diff --git a/src/lib/core/tests/TestCHIPErrorStr.cpp b/src/lib/core/tests/TestCHIPErrorStr.cpp
index 8d6d950..93b1fde 100644
--- a/src/lib/core/tests/TestCHIPErrorStr.cpp
+++ b/src/lib/core/tests/TestCHIPErrorStr.cpp
@@ -47,7 +47,7 @@
 // Test input data.
 
 // clang-format off
-static int32_t sContext[] =
+static CHIP_ERROR sContext[] =
 {
     CHIP_ERROR_TOO_MANY_CONNECTIONS,
     CHIP_ERROR_SENDING_BLOCKED,
@@ -236,7 +236,7 @@
     RegisterCHIPLayerErrorFormatter();
 
     // For each defined error...
-    for (int err : sContext)
+    for (CHIP_ERROR err : sContext)
     {
         const char * errStr = ErrorStr(err);
         char expectedText[9];
diff --git a/src/lib/core/tests/TestCHIPTLV.cpp b/src/lib/core/tests/TestCHIPTLV.cpp
index 3c43c26..6047cfd 100644
--- a/src/lib/core/tests/TestCHIPTLV.cpp
+++ b/src/lib/core/tests/TestCHIPTLV.cpp
@@ -1468,7 +1468,7 @@
         // Map a successful find (CHIP_NO_ERROR) onto a signal that the element has been found.
         if (err == CHIP_NO_ERROR)
         {
-            err = CHIP_ERROR_MAX;
+            err = CHIP_ERROR_SENTINEL;
         }
         // Map a failed find attempt to NO_ERROR
         else if (err == CHIP_ERROR_TLV_TAG_NOT_FOUND)
diff --git a/src/lib/shell/Engine.cpp b/src/lib/shell/Engine.cpp
index 2f2fcd5..d57252a 100644
--- a/src/lib/shell/Engine.cpp
+++ b/src/lib/shell/Engine.cpp
@@ -71,9 +71,9 @@
     ++_commandSetCount;
 }
 
-int Engine::ExecCommand(int argc, char * argv[])
+CHIP_ERROR Engine::ExecCommand(int argc, char * argv[])
 {
-    int retval = CHIP_ERROR_INVALID_ARGUMENT;
+    CHIP_ERROR retval = CHIP_ERROR_INVALID_ARGUMENT;
 
     VerifyOrReturnError(argc > 0, retval);
     // Find the command
diff --git a/src/lib/shell/Engine.h b/src/lib/shell/Engine.h
index 15a3be4..da3163a 100644
--- a/src/lib/shell/Engine.h
+++ b/src/lib/shell/Engine.h
@@ -25,6 +25,8 @@
 
 #include "streamer.h"
 
+#include <core/CHIPError.h>
+
 #include <stdarg.h>
 #include <stddef.h>
 
@@ -55,7 +57,7 @@
  *
  * @return                      0 on success; CHIP_ERROR[...] on failure.
  */
-typedef int shell_command_fn(int argc, char * argv[]);
+typedef CHIP_ERROR shell_command_fn(int argc, char * argv[]);
 
 /**
  * Descriptor structure for a single command.
@@ -87,9 +89,9 @@
  * @param command               The shell command being iterated.
  * @param arg                   A context variable passed to the iterator function.
  *
- * @return                      0 continue iteration; 1 break iteration.
+ * @return                      CHIP_NO_ERROR to continue iteration; anything else to break iteration.
  */
-typedef int shell_command_iterator_t(shell_command_t * command, void * arg);
+typedef CHIP_ERROR shell_command_iterator_t(shell_command_t * command, void * arg);
 
 class Engine
 {
@@ -130,9 +132,9 @@
      * @param argc                  Number of arguments in argv.
      * @param argv                  Array of arguments in the tokenized command line to execute.
      *
-     * @return                      0 on success; CHIP_ERROR[...] on failure.
+     * @return                      CHIP_NO_ERROR on success; CHIP_ERROR[...] on failure.
      */
-    int ExecCommand(int argc, char * argv[]);
+    CHIP_ERROR ExecCommand(int argc, char * argv[]);
 
     /**
      * Registers a command set, or array of commands with the shell.
diff --git a/src/lib/shell/MainLoopDefault.cpp b/src/lib/shell/MainLoopDefault.cpp
index 9266d45..22351e2 100644
--- a/src/lib/shell/MainLoopDefault.cpp
+++ b/src/lib/shell/MainLoopDefault.cpp
@@ -145,7 +145,6 @@
 
 void ProcessShellLine(intptr_t args)
 {
-    int retval;
     int argc;
     char * argv[CHIP_SHELL_MAX_TOKENS];
 
@@ -154,7 +153,7 @@
 
     if (argc > 0)
     {
-        retval = Engine::Root().ExecCommand(argc, argv);
+        CHIP_ERROR retval = Engine::Root().ExecCommand(argc, argv);
 
         if (retval)
         {
diff --git a/src/lib/shell/commands/BLE.cpp b/src/lib/shell/commands/BLE.cpp
index b652638..3e991ae 100644
--- a/src/lib/shell/commands/BLE.cpp
+++ b/src/lib/shell/commands/BLE.cpp
@@ -33,13 +33,13 @@
 
 static chip::Shell::Engine sShellDeviceSubcommands;
 
-int BLEHelpHandler(int argc, char ** argv)
+CHIP_ERROR BLEHelpHandler(int argc, char ** argv)
 {
     sShellDeviceSubcommands.ForEachCommand(PrintCommandHelp, nullptr);
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
-int BLEAdvertiseHandler(int argc, char ** argv)
+CHIP_ERROR BLEAdvertiseHandler(int argc, char ** argv)
 {
     CHIP_ERROR error  = CHIP_NO_ERROR;
     streamer_t * sout = streamer_get();
@@ -91,7 +91,7 @@
     return error;
 }
 
-int BLEDispatch(int argc, char ** argv)
+CHIP_ERROR BLEDispatch(int argc, char ** argv)
 {
     if (argc == 0)
     {
diff --git a/src/lib/shell/commands/Base64.cpp b/src/lib/shell/commands/Base64.cpp
index f2518a3..52db733 100644
--- a/src/lib/shell/commands/Base64.cpp
+++ b/src/lib/shell/commands/Base64.cpp
@@ -35,13 +35,13 @@
 namespace chip {
 namespace Shell {
 
-static int Base64HelpHandler(int argc, char ** argv)
+static CHIP_ERROR Base64HelpHandler(int argc, char ** argv)
 {
     sShellBase64Commands.ForEachCommand(PrintCommandHelp, nullptr);
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
-static int Base64DecodeHandler(int argc, char ** argv)
+static CHIP_ERROR Base64DecodeHandler(int argc, char ** argv)
 {
     streamer_t * sout = streamer_get();
     uint32_t binarySize;
@@ -54,7 +54,7 @@
     return CHIP_NO_ERROR;
 }
 
-static int Base64EncodeHandler(int argc, char ** argv)
+static CHIP_ERROR Base64EncodeHandler(int argc, char ** argv)
 {
     streamer_t * sout = streamer_get();
     char base64[256];
@@ -68,17 +68,13 @@
     return CHIP_NO_ERROR;
 }
 
-static int Base64Dispatch(int argc, char ** argv)
+static CHIP_ERROR Base64Dispatch(int argc, char ** argv)
 {
-    CHIP_ERROR error = CHIP_NO_ERROR;
-
     if (argc == 0)
     {
-        Base64HelpHandler(argc, argv);
-        return error;
+        return Base64HelpHandler(argc, argv);
     }
-    error = sShellBase64Commands.ExecCommand(argc, argv);
-    return error;
+    return sShellBase64Commands.ExecCommand(argc, argv);
 }
 
 void RegisterBase64Commands()
diff --git a/src/lib/shell/commands/Config.cpp b/src/lib/shell/commands/Config.cpp
index 1bc778d..d486e6c 100644
--- a/src/lib/shell/commands/Config.cpp
+++ b/src/lib/shell/commands/Config.cpp
@@ -128,7 +128,7 @@
     return CHIP_NO_ERROR;
 }
 
-static int PrintAllConfigs()
+static CHIP_ERROR PrintAllConfigs()
 {
     CHIP_ERROR error = CHIP_NO_ERROR;
 
@@ -145,10 +145,8 @@
     return (error) ? CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND : CHIP_NO_ERROR;
 }
 
-static int ConfigHandler(int argc, char ** argv)
+static CHIP_ERROR ConfigHandler(int argc, char ** argv)
 {
-    CHIP_ERROR error = CHIP_NO_ERROR;
-
     if (argc == 0)
     {
         return PrintAllConfigs();
@@ -160,27 +158,27 @@
     }
     else if (strcmp(argv[0], "productid") == 0)
     {
-        return error = ConfigGetProductId(false);
+        return ConfigGetProductId(false);
     }
     else if (strcmp(argv[0], "productrev") == 0)
     {
-        return error = ConfigGetProductRevision(false);
+        return ConfigGetProductRevision(false);
     }
     else if (strcmp(argv[0], "deviceid") == 0)
     {
-        return error = ConfigGetDeviceId(false);
+        return ConfigGetDeviceId(false);
     }
     else if (strcmp(argv[0], "pincode") == 0)
     {
-        return error = ConfigGetSetupPinCode(false);
+        return ConfigGetSetupPinCode(false);
     }
     else if (strcmp(argv[0], "discriminator") == 0)
     {
-        return error = ConfigGetSetupDiscriminator(false);
+        return ConfigGetSetupDiscriminator(false);
     }
     else if (strcmp(argv[0], "fabricid") == 0)
     {
-        return error = ConfigGetFabricId(false);
+        return ConfigGetFabricId(false);
     }
     else
     {
diff --git a/src/lib/shell/commands/Device.cpp b/src/lib/shell/commands/Device.cpp
index 6b17629..b0c3562 100644
--- a/src/lib/shell/commands/Device.cpp
+++ b/src/lib/shell/commands/Device.cpp
@@ -39,14 +39,14 @@
     return 0;
 }
 
-static int FactoryResetHandler(int argc, char ** argv)
+static CHIP_ERROR FactoryResetHandler(int argc, char ** argv)
 {
     streamer_printf(streamer_get(), "Performing factory reset ... \r\n");
     DeviceLayer::ConfigurationMgr().InitiateFactoryReset();
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
-static int DeviceHandler(int argc, char ** argv)
+static CHIP_ERROR DeviceHandler(int argc, char ** argv)
 {
     if (argc == 0)
     {
diff --git a/src/lib/shell/commands/Help.cpp b/src/lib/shell/commands/Help.cpp
index 76f4244..7fdbc4c 100644
--- a/src/lib/shell/commands/Help.cpp
+++ b/src/lib/shell/commands/Help.cpp
@@ -27,10 +27,10 @@
 namespace chip {
 namespace Shell {
 
-int PrintCommandHelp(shell_command_t * command, void * arg)
+CHIP_ERROR PrintCommandHelp(shell_command_t * command, void * arg)
 {
     streamer_printf(streamer_get(), "  %-15s %s\r\n", command->cmd_name, command->cmd_help);
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
 } // namespace Shell
diff --git a/src/lib/shell/commands/Help.h b/src/lib/shell/commands/Help.h
index 2a72bb5..4577d91 100644
--- a/src/lib/shell/commands/Help.h
+++ b/src/lib/shell/commands/Help.h
@@ -27,7 +27,7 @@
 namespace chip {
 namespace Shell {
 
-int PrintCommandHelp(shell_command_t * command, void * arg);
+CHIP_ERROR PrintCommandHelp(shell_command_t * command, void * arg);
 
 } // namespace Shell
 } // namespace chip
diff --git a/src/lib/shell/commands/Meta.cpp b/src/lib/shell/commands/Meta.cpp
index 2e95e8f..eef589a 100644
--- a/src/lib/shell/commands/Meta.cpp
+++ b/src/lib/shell/commands/Meta.cpp
@@ -36,20 +36,20 @@
 namespace chip {
 namespace Shell {
 
-static int ExitHandler(int argc, char ** argv)
+static CHIP_ERROR ExitHandler(int argc, char ** argv)
 {
     streamer_printf(streamer_get(), "Goodbye\r\n");
     exit(0);
     return 0;
 }
 
-static int HelpHandler(int argc, char ** argv)
+static CHIP_ERROR HelpHandler(int argc, char ** argv)
 {
     Engine::Root().ForEachCommand(PrintCommandHelp, nullptr);
     return 0;
 }
 
-static int VersionHandler(int argc, char ** argv)
+static CHIP_ERROR VersionHandler(int argc, char ** argv)
 {
     streamer_printf(streamer_get(), "CHIP %s\r\n", CHIP_VERSION_STRING);
     return 0;
diff --git a/src/lib/shell/commands/OnboardingCodes.cpp b/src/lib/shell/commands/OnboardingCodes.cpp
index 2d7d82a..5b9bf90 100644
--- a/src/lib/shell/commands/OnboardingCodes.cpp
+++ b/src/lib/shell/commands/OnboardingCodes.cpp
@@ -91,10 +91,8 @@
     return error;
 }
 
-static int OnboardingHandler(int argc, char ** argv)
+static CHIP_ERROR OnboardingHandler(int argc, char ** argv)
 {
-    CHIP_ERROR error = CHIP_NO_ERROR;
-
     if (argc == 0)
     {
         return PrintAllOnboardingCodes();
@@ -106,11 +104,11 @@
     }
     else if (strcmp(argv[0], "qrcodeurl") == 0)
     {
-        return error = GetOnboardingQRCodeUrl(false);
+        return GetOnboardingQRCodeUrl(false);
     }
     else if (strcmp(argv[0], "manualpairingcode") == 0)
     {
-        return error = GetOnboardingManualPairingCode(false);
+        return GetOnboardingManualPairingCode(false);
     }
     else
     {
diff --git a/src/lib/shell/commands/WiFi.cpp b/src/lib/shell/commands/WiFi.cpp
index e282b9f..a25d63f 100644
--- a/src/lib/shell/commands/WiFi.cpp
+++ b/src/lib/shell/commands/WiFi.cpp
@@ -37,10 +37,10 @@
 
 static chip::Shell::Engine sShellWifiSubCommands;
 
-static int WiFiHelpHandler(int argc, char ** argv)
+static CHIP_ERROR WiFiHelpHandler(int argc, char ** argv)
 {
     sShellWifiSubCommands.ForEachCommand(PrintCommandHelp, nullptr);
-    return 0;
+    return CHIP_NO_ERROR;
 }
 
 static int PrintWifiMode()
@@ -96,7 +96,7 @@
     return 0;
 }
 
-static int WiFiModeHandler(int argc, char ** argv)
+static CHIP_ERROR WiFiModeHandler(int argc, char ** argv)
 {
     if (argc == 0)
     {
@@ -109,7 +109,7 @@
     return SetWifiMode(argv[0]);
 }
 
-static int WiFiConnectHandler(int argc, char ** argv)
+static CHIP_ERROR WiFiConnectHandler(int argc, char ** argv)
 {
     if (argc != 2)
     {
@@ -119,7 +119,7 @@
     return deviceDelegate.ProvisionWiFi(argv[0], argv[1]);
 }
 
-static int WiFiDispatch(int argc, char ** argv)
+static CHIP_ERROR WiFiDispatch(int argc, char ** argv)
 {
     if (argc == 0)
     {
diff --git a/src/lib/support/ErrorStr.cpp b/src/lib/support/ErrorStr.cpp
index f6cee46..bea328d 100644
--- a/src/lib/support/ErrorStr.cpp
+++ b/src/lib/support/ErrorStr.cpp
@@ -54,7 +54,7 @@
  * @return A pointer to a NULL-terminated C string describing the
  *         provided error.
  */
-DLL_EXPORT const char * ErrorStr(int32_t err)
+DLL_EXPORT const char * ErrorStr(CHIP_ERROR err)
 {
     if (err == 0)
     {
@@ -137,7 +137,7 @@
  * @param[in] desc                  A string describing the cause or meaning of the error,
  *                                  or NULL if no such information is available.
  */
-DLL_EXPORT void FormatError(char * buf, uint16_t bufSize, const char * subsys, int32_t err, const char * desc)
+DLL_EXPORT void FormatError(char * buf, uint16_t bufSize, const char * subsys, CHIP_ERROR err, const char * desc)
 {
 #if CHIP_CONFIG_SHORT_ERROR_STR
 
@@ -166,8 +166,8 @@
         descSep = "";
     }
 
-    (void) snprintf(buf, bufSize, "%s%sError %" PRId32 " (0x%08" PRIX32 ")%s%s", subsys, subsysSep, err, static_cast<uint32_t>(err),
-                    descSep, desc);
+    (void) snprintf(buf, bufSize, "%s%sError %" CHIP_ERROR_FORMAT " (0x%08" PRIX32 ")%s%s", subsys, subsysSep, err,
+                    static_cast<uint32_t>(err), descSep, desc);
 
 #endif // CHIP_CONFIG_SHORT_ERROR_STR
 }
diff --git a/src/lib/support/ErrorStr.h b/src/lib/support/ErrorStr.h
index 676ff93..b5fe66a 100644
--- a/src/lib/support/ErrorStr.h
+++ b/src/lib/support/ErrorStr.h
@@ -27,22 +27,23 @@
 
 #include <stdint.h>
 
+#include <core/CHIPError.h>
 #include <support/DLLUtil.h>
 
 namespace chip {
 
 struct ErrorFormatter
 {
-    typedef bool (*FormatFunct)(char * buf, uint16_t bufSize, int32_t err);
+    typedef bool (*FormatFunct)(char * buf, uint16_t bufSize, CHIP_ERROR err);
 
     FormatFunct FormatError;
     ErrorFormatter * Next;
 };
 
-extern const char * ErrorStr(int32_t err);
+extern const char * ErrorStr(CHIP_ERROR err);
 extern void RegisterErrorFormatter(ErrorFormatter * errFormatter);
 extern void DeregisterErrorFormatter(ErrorFormatter * errFormatter);
-extern void FormatError(char * buf, uint16_t bufSize, const char * subsys, int32_t err, const char * desc);
+extern void FormatError(char * buf, uint16_t bufSize, const char * subsys, CHIP_ERROR err, const char * desc);
 
 extern const char * StatusReportStr(uint32_t profileId, uint16_t statusCode);
 
diff --git a/src/lib/support/tests/TestErrorStr.cpp b/src/lib/support/tests/TestErrorStr.cpp
index 95c9819..c04b7c6 100644
--- a/src/lib/support/tests/TestErrorStr.cpp
+++ b/src/lib/support/tests/TestErrorStr.cpp
@@ -34,19 +34,19 @@
         : (fprintf(stderr, "%s:%d: error: CHECK_EQ_STR(\"%s\", \"%s\") failed\n", __FUNCTION__, __LINE__, (a), (b)), false)
 
 static int falseFormatCalled = 0;
-static bool falseFormat(char * buf, uint16_t bufSize, int32_t err)
+static bool falseFormat(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
     falseFormatCalled += 1;
     return false; // means keep going
 }
 static int falseFormat2Called = 0;
-static bool falseFormat2(char * buf, uint16_t bufSize, int32_t err)
+static bool falseFormat2(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
     falseFormat2Called += 1;
     return false; // means keep going
 }
 static int trueFormatCalled = 0;
-static bool trueFormat(char * buf, uint16_t bufSize, int32_t err)
+static bool trueFormat(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
     trueFormatCalled += 1;
     return true; // means I handled it
@@ -154,7 +154,7 @@
     ret &= CHECK_EQ_STR(buf, "Error 1 (0x00000001)");
 
     // negative
-    FormatError(buf, kBufSize, nullptr, -1, nullptr);
+    FormatError(buf, kBufSize, nullptr, static_cast<CHIP_ERROR>(-1), nullptr);
     ret &= CHECK_EQ_STR(buf, "Error -1 (0xFFFFFFFF)");
 #endif
 
diff --git a/src/messaging/ErrorCategory.cpp b/src/messaging/ErrorCategory.cpp
index 331d702..d213cf7 100644
--- a/src/messaging/ErrorCategory.cpp
+++ b/src/messaging/ErrorCategory.cpp
@@ -77,8 +77,8 @@
  */
 bool IsSendErrorNonCritical(CHIP_ERROR err)
 {
-    return (err == INET_ERROR_NOT_IMPLEMENTED || err == INET_ERROR_OUTBOUND_MESSAGE_TRUNCATED ||
-            err == INET_ERROR_MESSAGE_TOO_LONG || err == INET_ERROR_NO_MEMORY || CHIP_CONFIG_IsPlatformErrorNonCritical(err));
+    return (err == CHIP_ERROR_NOT_IMPLEMENTED || err == CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG || err == CHIP_ERROR_MESSAGE_TOO_LONG ||
+            err == CHIP_ERROR_NO_MEMORY || CHIP_CONFIG_IsPlatformErrorNonCritical(err));
 }
 
 } // namespace Messaging
diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp
index 2dfa925..4cdbc17 100644
--- a/src/messaging/ExchangeContext.cpp
+++ b/src/messaging/ExchangeContext.cpp
@@ -344,7 +344,7 @@
     lSystemLayer->CancelTimer(HandleResponseTimeout, this);
 }
 
-void ExchangeContext::HandleResponseTimeout(System::Layer * aSystemLayer, void * aAppState, System::Error aError)
+void ExchangeContext::HandleResponseTimeout(System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError)
 {
     ExchangeContext * ec = reinterpret_cast<ExchangeContext *>(aAppState);
 
diff --git a/src/messaging/ExchangeContext.h b/src/messaging/ExchangeContext.h
index 8c8c603..5a83e66 100644
--- a/src/messaging/ExchangeContext.h
+++ b/src/messaging/ExchangeContext.h
@@ -226,7 +226,7 @@
     CHIP_ERROR StartResponseTimer();
 
     void CancelResponseTimer();
-    static void HandleResponseTimeout(System::Layer * aSystemLayer, void * aAppState, System::Error aError);
+    static void HandleResponseTimeout(System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError);
 
     void DoClose(bool clearRetransTable);
 };
diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp
index 54e0ea8..6b143c9 100644
--- a/src/messaging/ReliableMessageMgr.cpp
+++ b/src/messaging/ReliableMessageMgr.cpp
@@ -234,7 +234,7 @@
 #endif
 }
 
-void ReliableMessageMgr::Timeout(System::Layer * aSystemLayer, void * aAppState, System::Error aError)
+void ReliableMessageMgr::Timeout(System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError)
 {
     ReliableMessageMgr * manager = reinterpret_cast<ReliableMessageMgr *>(aAppState);
 
diff --git a/src/messaging/ReliableMessageMgr.h b/src/messaging/ReliableMessageMgr.h
index 29dde3d..ea105de 100644
--- a/src/messaging/ReliableMessageMgr.h
+++ b/src/messaging/ReliableMessageMgr.h
@@ -102,7 +102,7 @@
      * Handle physical wakeup of system due to ReliableMessageProtocol wakeup.
      *
      */
-    static void Timeout(System::Layer * aSystemLayer, void * aAppState, System::Error aError);
+    static void Timeout(System::Layer * aSystemLayer, void * aAppState, CHIP_ERROR aError);
 
     /**
      *  Add a CHIP message into the retransmission table to be subsequently resent if a corresponding acknowledgment
diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp
index 8e09873..b25b1a7 100644
--- a/src/messaging/tests/TestReliableMessageProtocol.cpp
+++ b/src/messaging/tests/TestReliableMessageProtocol.cpp
@@ -305,7 +305,7 @@
 
     // 1 tick is 64 ms, sleep 65 ms to trigger first re-transmit
     test_os_sleep_ms(65);
-    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_NO_ERROR);
 
     // Ensure the retransmit message was dropped, and is still there in the retransmit table
     NL_TEST_ASSERT(inSuite, gLoopback.mSendMessageCount == 2);
@@ -315,7 +315,7 @@
 
     // sleep another 65 ms to trigger second re-transmit
     test_os_sleep_ms(65);
-    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_NO_ERROR);
 
     // Ensure the retransmit message was NOT dropped, and the retransmit table is empty, as we should have gotten an ack
     NL_TEST_ASSERT(inSuite, gLoopback.mSendMessageCount >= 3);
@@ -371,7 +371,7 @@
 
     // 1 tick is 64 ms, sleep 65 ms to trigger first re-transmit
     test_os_sleep_ms(65);
-    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_NO_ERROR);
 
     // Ensure the retransmit message was dropped, and is still there in the retransmit table
     NL_TEST_ASSERT(inSuite, gLoopback.mSendMessageCount == 2);
@@ -381,7 +381,7 @@
 
     // sleep another 65 ms to trigger second re-transmit
     test_os_sleep_ms(65);
-    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_NO_ERROR);
 
     // Ensure the retransmit message was NOT dropped, and the retransmit table is empty, as we should have gotten an ack
     NL_TEST_ASSERT(inSuite, gLoopback.mSendMessageCount >= 3);
@@ -436,7 +436,7 @@
 
     // 1 tick is 64 ms, sleep 65 ms to trigger first re-transmit
     test_os_sleep_ms(65);
-    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_NO_ERROR);
 
     // Ensure the retransmit table is empty, as we did not provide a message to retain
     NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 0);
@@ -497,7 +497,7 @@
 
     // 1 tick is 64 ms, sleep 65 ms to trigger first re-transmit
     test_os_sleep_ms(65);
-    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_NO_ERROR);
 
     // Ensure the retransmit message was not dropped, and is no longer in the retransmit table
     NL_TEST_ASSERT(inSuite, gLoopback.mSendMessageCount >= 2);
@@ -574,7 +574,7 @@
 
     // 1 tick is 64 ms, sleep 65 ms to trigger first re-transmit
     test_os_sleep_ms(65);
-    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_NO_ERROR);
 
     // Ensure the retransmit message was sent and the ack was sent
     // and retransmit table was cleared
@@ -647,7 +647,7 @@
 
     // 1 tick is 64 ms, sleep 65 ms to trigger first re-transmit
     test_os_sleep_ms(65);
-    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+    ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), rm, CHIP_NO_ERROR);
 
     // Ensure the retransmit message was not dropped, and is no longer in the retransmit table
     NL_TEST_ASSERT(inSuite, gLoopback.mSendMessageCount >= 2);
diff --git a/src/platform/Darwin/BleConnectionDelegate.h b/src/platform/Darwin/BleConnectionDelegate.h
index 45135a5..a86171b 100644
--- a/src/platform/Darwin/BleConnectionDelegate.h
+++ b/src/platform/Darwin/BleConnectionDelegate.h
@@ -27,7 +27,7 @@
 {
 public:
     virtual void NewConnection(Ble::BleLayer * bleLayer, void * appState, const uint16_t connDiscriminator);
-    virtual BLE_ERROR CancelConnection();
+    virtual CHIP_ERROR CancelConnection();
 };
 
 } // namespace Internal
diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm
index 1664d40..bdb8071 100644
--- a/src/platform/Darwin/BleConnectionDelegateImpl.mm
+++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm
@@ -77,12 +77,12 @@
             ble.centralManager = [ble.centralManager initWithDelegate:ble queue:ble.workQueue];
         }
 
-        BLE_ERROR BleConnectionDelegateImpl::CancelConnection()
+        CHIP_ERROR BleConnectionDelegateImpl::CancelConnection()
         {
             ChipLogProgress(Ble, "%s", __FUNCTION__);
             [ble stop];
             ble = nil;
-            return BLE_NO_ERROR;
+            return CHIP_NO_ERROR;
         }
     } // namespace Internal
 } // namespace DeviceLayer
@@ -218,7 +218,7 @@
 
     if (!found || error != nil) {
         ChipLogError(Ble, "Service not found on the device.");
-        _onConnectionError(_appState, BLE_ERROR_INCORRECT_STATE);
+        _onConnectionError(_appState, CHIP_ERROR_INCORRECT_STATE);
     }
 }
 
@@ -310,7 +310,7 @@
         } else {
             ChipLogError(Ble, "Failed at allocating buffer for incoming BLE data");
             dispatch_async(_chipWorkQueue, ^{
-                _mBleLayer->HandleConnectionError((__bridge void *) peripheral, BLE_ERROR_NO_MEMORY);
+                _mBleLayer->HandleConnectionError((__bridge void *) peripheral, CHIP_ERROR_NO_MEMORY);
             });
         }
     } else {
diff --git a/src/platform/Darwin/CHIPPlatformConfig.h b/src/platform/Darwin/CHIPPlatformConfig.h
index b803bed..0c00b75 100644
--- a/src/platform/Darwin/CHIPPlatformConfig.h
+++ b/src/platform/Darwin/CHIPPlatformConfig.h
@@ -25,6 +25,9 @@
 
 // ==================== General Platform Adaptations ====================
 
+#define CHIP_CONFIG_ERROR_TYPE int32_t
+#define CHIP_CONFIG_ERROR_FORMAT PRId32
+
 #define ChipDie() abort()
 
 // TODO:(#756) Add FabricState support
diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp
index e7434b0..cce976d 100644
--- a/src/platform/Darwin/PlatformManagerImpl.cpp
+++ b/src/platform/Darwin/PlatformManagerImpl.cpp
@@ -111,7 +111,7 @@
 CHIP_ERROR PlatformManagerImpl::_Shutdown()
 {
     // Call up to the base class _Shutdown() to perform the bulk of the shutdown.
-    return System::MapErrorPOSIX(GenericPlatformManagerImpl<ImplClass>::_Shutdown());
+    return GenericPlatformManagerImpl<ImplClass>::_Shutdown();
 }
 
 void PlatformManagerImpl::_PostEvent(const ChipDeviceEvent * event)
diff --git a/src/platform/DeviceControlServer.cpp b/src/platform/DeviceControlServer.cpp
index 60bf9cd..41b4df2 100644
--- a/src/platform/DeviceControlServer.cpp
+++ b/src/platform/DeviceControlServer.cpp
@@ -28,7 +28,7 @@
 namespace DeviceLayer {
 namespace Internal {
 
-void CommissioningTimerFunction(System::Layer * layer, void * aAppState, System::Error aError)
+void CommissioningTimerFunction(System::Layer * layer, void * aAppState, CHIP_ERROR aError)
 {
     DeviceControlServer * server = reinterpret_cast<DeviceControlServer *>(aAppState);
     server->CommissioningFailedTimerComplete(aError);
@@ -41,7 +41,7 @@
     return sInstance;
 }
 
-void DeviceControlServer::CommissioningFailedTimerComplete(System::Error aError)
+void DeviceControlServer::CommissioningFailedTimerComplete(CHIP_ERROR aError)
 {
     ChipDeviceEvent event;
     event.Type                         = DeviceEventType::kCommissioningComplete;
diff --git a/src/platform/EFR32/BLEManagerImpl.cpp b/src/platform/EFR32/BLEManagerImpl.cpp
index 1dd53c1..0241882 100644
--- a/src/platform/EFR32/BLEManagerImpl.cpp
+++ b/src/platform/EFR32/BLEManagerImpl.cpp
@@ -550,7 +550,7 @@
     case SL_STATUS_INVALID_PARAMETER:
         return CHIP_ERROR_INVALID_ARGUMENT;
     default:
-        return (CHIP_ERROR) bleErr + CHIP_DEVICE_CONFIG_EFR32_BLE_ERROR_MIN;
+        return static_cast<CHIP_ERROR>(bleErr + CHIP_DEVICE_CONFIG_EFR32_BLE_ERROR_MIN);
     }
 }
 
diff --git a/src/platform/EFR32/BlePlatformConfig.h b/src/platform/EFR32/BlePlatformConfig.h
index 3804f1c..92a1690 100644
--- a/src/platform/EFR32/BlePlatformConfig.h
+++ b/src/platform/EFR32/BlePlatformConfig.h
@@ -33,12 +33,8 @@
 #define BLE_CONNECTION_UNINITIALIZED ((uint8_t) -1)
 #define BLE_MAX_RECEIVE_WINDOW_SIZE 5
 
-#define BLE_CONFIG_ERROR_TYPE int32_t
-#define BLE_CONFIG_ERROR_FORMAT PRId32
-#define BLE_CONFIG_NO_ERROR 0
 #define BLE_CONFIG_ERROR_MIN 6000000
 #define BLE_CONFIG_ERROR_MAX 6000999
-#define _BLE_CONFIG_ERROR(e) (BLE_CONFIG_ERROR_MIN + (e))
 
 // ========== Platform-specific Configuration Overrides =========
 
diff --git a/src/platform/EFR32/CHIPPlatformConfig.h b/src/platform/EFR32/CHIPPlatformConfig.h
index a3206d1..5304e91 100644
--- a/src/platform/EFR32/CHIPPlatformConfig.h
+++ b/src/platform/EFR32/CHIPPlatformConfig.h
@@ -29,12 +29,10 @@
 // ==================== General Platform Adaptations ====================
 
 #define CHIP_CONFIG_ERROR_TYPE int32_t
-#define CHIP_CONFIG_NO_ERROR 0
-#define CHIP_CONFIG_ERROR_MIN 4000000
-#define CHIP_CONFIG_ERROR_MAX 4000999
+#define CHIP_CONFIG_ERROR_FORMAT PRId32
+#define CHIP_CONFIG_CORE_ERROR_MIN 4000000
+#define CHIP_CONFIG_CORE_ERROR_MAX 4000999
 
-#define ASN1_CONFIG_ERROR_TYPE int32_t
-#define ASN1_CONFIG_NO_ERROR 0
 #define ASN1_CONFIG_ERROR_MIN 5000000
 #define ASN1_CONFIG_ERROR_MAX 5000999
 
diff --git a/src/platform/EFR32/EFR32Config.cpp b/src/platform/EFR32/EFR32Config.cpp
index 0e4164d..27f5b9d 100644
--- a/src/platform/EFR32/EFR32Config.cpp
+++ b/src/platform/EFR32/EFR32Config.cpp
@@ -566,7 +566,7 @@
         err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;
         break;
     default:
-        err = (nvm3Res & 0xFF) + CHIP_DEVICE_CONFIG_EFR32_NVM3_ERROR_MIN;
+        err = static_cast<CHIP_ERROR>((nvm3Res & 0xFF) + CHIP_DEVICE_CONFIG_EFR32_NVM3_ERROR_MIN);
         break;
     }
 
diff --git a/src/platform/EFR32/InetPlatformConfig.h b/src/platform/EFR32/InetPlatformConfig.h
index 2f4a01b..a5cc4eb 100644
--- a/src/platform/EFR32/InetPlatformConfig.h
+++ b/src/platform/EFR32/InetPlatformConfig.h
@@ -29,8 +29,6 @@
 
 // ==================== Platform Adaptations ====================
 
-#define INET_CONFIG_ERROR_TYPE int32_t
-#define INET_CONFIG_NO_ERROR 0
 #define INET_CONFIG_ERROR_MIN 1000000
 #define INET_CONFIG_ERROR_MAX 1000999
 
diff --git a/src/platform/EFR32/SystemPlatformConfig.h b/src/platform/EFR32/SystemPlatformConfig.h
index 33df2b3..1995824 100644
--- a/src/platform/EFR32/SystemPlatformConfig.h
+++ b/src/platform/EFR32/SystemPlatformConfig.h
@@ -39,11 +39,6 @@
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_TYPE int
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent *
 
-#define CHIP_SYSTEM_CONFIG_ERROR_TYPE int32_t
-#define CHIP_SYSTEM_CONFIG_NO_ERROR 0
-#define CHIP_SYSTEM_CONFIG_ERROR_MIN 7000000
-#define CHIP_SYSTEM_CONFIG_ERROR_MAX 7000999
-#define _CHIP_SYSTEM_CONFIG_ERROR(e) (CHIP_SYSTEM_CONFIG_ERROR_MIN + (e))
 #define CHIP_SYSTEM_LWIP_ERROR_MIN 3000000
 #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128
 
diff --git a/src/platform/ESP32/BlePlatformConfig.h b/src/platform/ESP32/BlePlatformConfig.h
index 7daddf3..495a1d0 100644
--- a/src/platform/ESP32/BlePlatformConfig.h
+++ b/src/platform/ESP32/BlePlatformConfig.h
@@ -34,9 +34,5 @@
 #define BLE_CONNECTION_UNINITIALIZED ((uint16_t) 0xFFFF)
 #define BLE_MAX_RECEIVE_WINDOW_SIZE 5
 
-#define BLE_CONFIG_ERROR_TYPE esp_err_t
-#define BLE_CONFIG_ERROR_FORMAT "d"
-#define BLE_CONFIG_NO_ERROR ESP_OK
 #define BLE_CONFIG_ERROR_MIN 6000000
 #define BLE_CONFIG_ERROR_MAX 6000999
-#define _BLE_CONFIG_ERROR(e) (BLE_CONFIG_ERROR_MIN + (e))
diff --git a/src/platform/ESP32/CHIPPlatformConfig.h b/src/platform/ESP32/CHIPPlatformConfig.h
index 39d542d..ef27857 100644
--- a/src/platform/ESP32/CHIPPlatformConfig.h
+++ b/src/platform/ESP32/CHIPPlatformConfig.h
@@ -42,12 +42,10 @@
 #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 15
 
 #define CHIP_CONFIG_ERROR_TYPE esp_err_t
-#define CHIP_CONFIG_NO_ERROR ESP_OK
-#define CHIP_CONFIG_ERROR_MIN 4000000
-#define CHIP_CONFIG_ERROR_MAX 4000999
+#define CHIP_CONFIG_ERROR_FORMAT PRId32
+#define CHIP_CONFIG_CORE_ERROR_MIN 4000000
+#define CHIP_CONFIG_CORE_ERROR_MAX 4000999
 
-#define ASN1_CONFIG_ERROR_TYPE esp_err_t
-#define ASN1_CONFIG_NO_ERROR ESP_OK
 #define ASN1_CONFIG_ERROR_MIN 5000000
 #define ASN1_CONFIG_ERROR_MAX 5000999
 
diff --git a/src/platform/ESP32/ConnectivityManagerImpl.cpp b/src/platform/ESP32/ConnectivityManagerImpl.cpp
index 2f3e97c..db1daf4 100644
--- a/src/platform/ESP32/ConnectivityManagerImpl.cpp
+++ b/src/platform/ESP32/ConnectivityManagerImpl.cpp
@@ -714,7 +714,7 @@
     }
 }
 
-void ConnectivityManagerImpl::DriveStationState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError)
+void ConnectivityManagerImpl::DriveStationState(::chip::System::Layer * aLayer, void * aAppState, ::CHIP_ERROR aError)
 {
     sInstance.DriveStationState();
 }
@@ -894,7 +894,7 @@
     }
 }
 
-void ConnectivityManagerImpl::DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError)
+void ConnectivityManagerImpl::DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::CHIP_ERROR aError)
 {
     sInstance.DriveAPState();
 }
diff --git a/src/platform/ESP32/ConnectivityManagerImpl.h b/src/platform/ESP32/ConnectivityManagerImpl.h
index 9e41eb9..8629c66 100644
--- a/src/platform/ESP32/ConnectivityManagerImpl.h
+++ b/src/platform/ESP32/ConnectivityManagerImpl.h
@@ -114,12 +114,12 @@
     void OnStationConnected(void);
     void OnStationDisconnected(void);
     void ChangeWiFiStationState(WiFiStationState newState);
-    static void DriveStationState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError);
+    static void DriveStationState(::chip::System::Layer * aLayer, void * aAppState, ::CHIP_ERROR aError);
 
     void DriveAPState(void);
     CHIP_ERROR ConfigureWiFiAP(void);
     void ChangeWiFiAPState(WiFiAPState newState);
-    static void DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError);
+    static void DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::CHIP_ERROR aError);
 
     void UpdateInternetConnectivityState(void);
     void OnStationIPv4AddressAvailable(const ip_event_got_ip_t & got_ip);
diff --git a/src/platform/ESP32/InetPlatformConfig.h b/src/platform/ESP32/InetPlatformConfig.h
index 0053c23..a1d6865 100644
--- a/src/platform/ESP32/InetPlatformConfig.h
+++ b/src/platform/ESP32/InetPlatformConfig.h
@@ -30,8 +30,6 @@
 
 // ==================== Platform Adaptations ====================
 
-#define INET_CONFIG_ERROR_TYPE esp_err_t
-#define INET_CONFIG_NO_ERROR ESP_OK
 #define INET_CONFIG_ERROR_MIN 1000000
 #define INET_CONFIG_ERROR_MAX 1000999
 
diff --git a/src/platform/ESP32/SystemPlatformConfig.h b/src/platform/ESP32/SystemPlatformConfig.h
index 2253ec4..93e957e 100644
--- a/src/platform/ESP32/SystemPlatformConfig.h
+++ b/src/platform/ESP32/SystemPlatformConfig.h
@@ -42,11 +42,6 @@
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_TYPE int
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent *
 
-#define CHIP_SYSTEM_CONFIG_ERROR_TYPE esp_err_t
-#define CHIP_SYSTEM_CONFIG_NO_ERROR ESP_OK
-#define CHIP_SYSTEM_CONFIG_ERROR_MIN 7000000
-#define CHIP_SYSTEM_CONFIG_ERROR_MAX 7000999
-#define _CHIP_SYSTEM_CONFIG_ERROR(e) (CHIP_SYSTEM_CONFIG_ERROR_MIN + (e))
 #define CHIP_SYSTEM_LWIP_ERROR_MIN 3000000
 #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128
 
diff --git a/src/platform/ESP32/SystemTimeSupport.cpp b/src/platform/ESP32/SystemTimeSupport.cpp
index 5ba9612..ab28d2b 100644
--- a/src/platform/ESP32/SystemTimeSupport.cpp
+++ b/src/platform/ESP32/SystemTimeSupport.cpp
@@ -50,7 +50,7 @@
     return (uint64_t)::esp_timer_get_time();
 }
 
-Error GetClock_RealTime(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTime(uint64_t & curTime)
 {
     struct timeval tv;
     int res = gettimeofday(&tv, NULL);
@@ -60,13 +60,13 @@
     }
     if (tv.tv_sec < CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     curTime = (tv.tv_sec * UINT64_C(1000000)) + tv.tv_usec;
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error GetClock_RealTimeMS(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTimeMS(uint64_t & curTime)
 {
     struct timeval tv;
     int res = gettimeofday(&tv, NULL);
@@ -76,13 +76,13 @@
     }
     if (tv.tv_sec < CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     curTime = (tv.tv_sec * UINT64_C(1000)) + (tv.tv_usec / 1000);
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error SetClock_RealTime(uint64_t newCurTime)
+CHIP_ERROR SetClock_RealTime(uint64_t newCurTime)
 {
     struct timeval tv;
     tv.tv_sec  = static_cast<time_t>(newCurTime / UINT64_C(1000000));
@@ -90,7 +90,7 @@
     int res    = settimeofday(&tv, NULL);
     if (res != 0)
     {
-        return (errno == EPERM) ? CHIP_SYSTEM_ERROR_ACCESS_DENIED : MapErrorPOSIX(errno);
+        return (errno == EPERM) ? CHIP_ERROR_ACCESS_DENIED : MapErrorPOSIX(errno);
     }
 #if CHIP_PROGRESS_LOGGING
     {
@@ -103,7 +103,7 @@
                         tv.tv_sec, year, month, dayOfMonth, hour, minute, second);
     }
 #endif // CHIP_PROGRESS_LOGGING
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 } // namespace Layer
diff --git a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp
index a1f1a66..316c045 100644
--- a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp
+++ b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp
@@ -443,7 +443,7 @@
     case ESP_ERR_NO_MEM:
         return CHIP_ERROR_NO_MEMORY;
     default:
-        return CHIP_DEVICE_CONFIG_ESP32_BLE_ERROR_MIN + (CHIP_ERROR) bleErr;
+        return CHIP_DEVICE_CONFIG_ESP32_BLE_ERROR_MIN + static_cast<CHIP_ERROR>(bleErr);
     }
 }
 
@@ -725,7 +725,7 @@
         ExitNow();
     }
 
-    VerifyOrExit(index + sizeof(deviceIdInfo) <= sizeof(advData), err = BLE_ERROR_OUTBOUND_MESSAGE_TOO_BIG);
+    VerifyOrExit(index + sizeof(deviceIdInfo) <= sizeof(advData), err = CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG);
     memcpy(&advData[index], &deviceIdInfo, sizeof(deviceIdInfo));
     index = static_cast<uint8_t>(index + sizeof(deviceIdInfo));
 
diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp
index 2e36743..3d473af 100644
--- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp
+++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp
@@ -452,7 +452,7 @@
     case ESP_ERR_INVALID_ARG:
         return CHIP_ERROR_INVALID_ARGUMENT;
     default:
-        return CHIP_DEVICE_CONFIG_ESP32_BLE_ERROR_MIN + (CHIP_ERROR) bleErr;
+        return CHIP_DEVICE_CONFIG_ESP32_BLE_ERROR_MIN + static_cast<CHIP_ERROR>(bleErr);
     }
 }
 void BLEManagerImpl::DriveBLEState(void)
@@ -705,7 +705,7 @@
         ExitNow();
     }
 
-    VerifyOrExit(index + sizeof(deviceIdInfo) <= sizeof(advData), err = BLE_ERROR_OUTBOUND_MESSAGE_TOO_BIG);
+    VerifyOrExit(index + sizeof(deviceIdInfo) <= sizeof(advData), err = CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG);
     memcpy(&advData[index], &deviceIdInfo, sizeof(deviceIdInfo));
     index = static_cast<uint8_t>(index + sizeof(deviceIdInfo));
 
diff --git a/src/platform/FreeRTOS/SystemTimeSupport.cpp b/src/platform/FreeRTOS/SystemTimeSupport.cpp
index 5f753ef..23e195c 100644
--- a/src/platform/FreeRTOS/SystemTimeSupport.cpp
+++ b/src/platform/FreeRTOS/SystemTimeSupport.cpp
@@ -104,27 +104,27 @@
     return GetClock_Monotonic();
 }
 
-Error GetClock_RealTime(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTime(uint64_t & curTime)
 {
     if (sBootTimeUS == 0)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     curTime = sBootTimeUS + GetClock_Monotonic();
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error GetClock_RealTimeMS(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTimeMS(uint64_t & curTime)
 {
     if (sBootTimeUS == 0)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     curTime = (sBootTimeUS + GetClock_Monotonic()) / 1000;
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error SetClock_RealTime(uint64_t newCurTime)
+CHIP_ERROR SetClock_RealTime(uint64_t newCurTime)
 {
     uint64_t timeSinceBootUS = GetClock_Monotonic();
     if (newCurTime > timeSinceBootUS)
@@ -135,7 +135,7 @@
     {
         sBootTimeUS = 0;
     }
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 } // namespace Layer
diff --git a/src/platform/GeneralUtils.cpp b/src/platform/GeneralUtils.cpp
index 56e1103..140a329 100644
--- a/src/platform/GeneralUtils.cpp
+++ b/src/platform/GeneralUtils.cpp
@@ -111,7 +111,7 @@
  * @return false                    If the supplied error was not a Device Layer error.
  *
  */
-bool FormatDeviceLayerError(char * buf, uint16_t bufSize, int32_t err)
+bool FormatDeviceLayerError(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
     const char * desc = nullptr;
 
diff --git a/src/platform/K32W/CHIPPlatformConfig.h b/src/platform/K32W/CHIPPlatformConfig.h
index 9270eca..1305a7e 100644
--- a/src/platform/K32W/CHIPPlatformConfig.h
+++ b/src/platform/K32W/CHIPPlatformConfig.h
@@ -30,12 +30,10 @@
 // ==================== General Platform Adaptations ====================
 
 #define CHIP_CONFIG_ERROR_TYPE int32_t
-#define CHIP_CONFIG_NO_ERROR 0
-#define CHIP_CONFIG_ERROR_MIN 4000000
-#define CHIP_CONFIG_ERROR_MAX 4000999
+#define CHIP_CONFIG_ERROR_FORMAT PRId32
+#define CHIP_CONFIG_CORE_ERROR_MIN 4000000
+#define CHIP_CONFIG_CORE_ERROR_MAX 4000999
 
-#define ASN1_CONFIG_ERROR_TYPE int32_t
-#define ASN1_CONFIG_NO_ERROR 0
 #define ASN1_CONFIG_ERROR_MIN 5000000
 #define ASN1_CONFIG_ERROR_MAX 5000999
 
diff --git a/src/platform/K32W/InetPlatformConfig.h b/src/platform/K32W/InetPlatformConfig.h
index ebac09e..ad1757d 100644
--- a/src/platform/K32W/InetPlatformConfig.h
+++ b/src/platform/K32W/InetPlatformConfig.h
@@ -30,8 +30,6 @@
 
 // ==================== Platform Adaptations ====================
 
-#define INET_CONFIG_ERROR_TYPE int32_t
-#define INET_CONFIG_NO_ERROR 0
 #define INET_CONFIG_ERROR_MIN 1000000
 #define INET_CONFIG_ERROR_MAX 1000999
 
diff --git a/src/platform/K32W/K32WConfig.cpp b/src/platform/K32W/K32WConfig.cpp
index e1dea80..cba0a20 100644
--- a/src/platform/K32W/K32WConfig.cpp
+++ b/src/platform/K32W/K32WConfig.cpp
@@ -411,7 +411,7 @@
         err = CHIP_NO_ERROR;
         break;
     default:
-        err = CHIP_CONFIG_ERROR_MIN + pdmStatus;
+        err = CHIP_CONFIG_CORE_ERROR_MIN + pdmStatus;
         break;
     }
 
@@ -420,7 +420,7 @@
 
 CHIP_ERROR K32WConfig::MapPdmInitStatus(int pdmStatus)
 {
-    return (pdmStatus == 0) ? CHIP_NO_ERROR : CHIP_CONFIG_ERROR_MIN + pdmStatus;
+    return (pdmStatus == 0) ? CHIP_NO_ERROR : CHIP_CONFIG_CORE_ERROR_MIN + pdmStatus;
 }
 
 bool K32WConfig::ValidConfigKey(Key key)
diff --git a/src/platform/K32W/SystemPlatformConfig.h b/src/platform/K32W/SystemPlatformConfig.h
index 059d2c7..44138dd 100644
--- a/src/platform/K32W/SystemPlatformConfig.h
+++ b/src/platform/K32W/SystemPlatformConfig.h
@@ -40,11 +40,6 @@
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_TYPE int
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent *
 
-#define CHIP_SYSTEM_CONFIG_ERROR_TYPE int32_t
-#define CHIP_SYSTEM_CONFIG_NO_ERROR 0
-#define CHIP_SYSTEM_CONFIG_ERROR_MIN 7000000
-#define CHIP_SYSTEM_CONFIG_ERROR_MAX 7000999
-#define _CHIP_SYSTEM_CONFIG_ERROR(e) (CHIP_SYSTEM_CONFIG_ERROR_MIN + (e))
 #define CHIP_SYSTEM_LWIP_ERROR_MIN 3000000
 #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128
 
diff --git a/src/platform/Linux/BLEManagerImpl.cpp b/src/platform/Linux/BLEManagerImpl.cpp
index 6593ea7..74658c6 100644
--- a/src/platform/Linux/BLEManagerImpl.cpp
+++ b/src/platform/Linux/BLEManagerImpl.cpp
@@ -54,7 +54,7 @@
 const ChipBleUUID ChipUUID_CHIPoBLEChar_TX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F,
                                                  0x9D, 0x12 } };
 
-void HandleConnectTimeout(chip::System::Layer *, void * apEndpoint, chip::System::Error)
+void HandleConnectTimeout(chip::System::Layer *, void * apEndpoint, CHIP_ERROR)
 {
     assert(apEndpoint != nullptr);
 
@@ -734,9 +734,9 @@
     PlatformMgr().ScheduleWork(InitiateScan, static_cast<intptr_t>(BleScanState::kScanForDiscriminator));
 }
 
-BLE_ERROR BLEManagerImpl::CancelConnection()
+CHIP_ERROR BLEManagerImpl::CancelConnection()
 {
-    return BLE_ERROR_NOT_IMPLEMENTED;
+    return CHIP_ERROR_NOT_IMPLEMENTED;
 }
 
 void BLEManagerImpl::NotifyBLEPeripheralRegisterAppComplete(bool aIsSuccess, void * apAppstate)
diff --git a/src/platform/Linux/BLEManagerImpl.h b/src/platform/Linux/BLEManagerImpl.h
index 72705ba..c8b0072 100644
--- a/src/platform/Linux/BLEManagerImpl.h
+++ b/src/platform/Linux/BLEManagerImpl.h
@@ -150,7 +150,7 @@
     // ===== Members that implement virtual methods on BleConnectionDelegate.
 
     void NewConnection(BleLayer * bleLayer, void * appState, uint16_t connDiscriminator) override;
-    BLE_ERROR CancelConnection() override;
+    CHIP_ERROR CancelConnection() override;
 
     // ===== Members that implement virtual methods on ChipDeviceScannerDelegate
     void OnDeviceScanned(BluezDevice1 * device, const chip::Ble::ChipBLEDeviceIdentificationInfo & info) override;
diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp
index f73e0dc..5ed6c5f 100644
--- a/src/platform/Linux/ConnectivityManagerImpl.cpp
+++ b/src/platform/Linux/ConnectivityManagerImpl.cpp
@@ -831,7 +831,7 @@
     }
 }
 
-void ConnectivityManagerImpl::DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError)
+void ConnectivityManagerImpl::DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::CHIP_ERROR aError)
 {
     sInstance.DriveAPState();
 }
diff --git a/src/platform/Linux/ConnectivityManagerImpl.h b/src/platform/Linux/ConnectivityManagerImpl.h
index f381470..57d7ef7 100644
--- a/src/platform/Linux/ConnectivityManagerImpl.h
+++ b/src/platform/Linux/ConnectivityManagerImpl.h
@@ -158,7 +158,7 @@
     void DriveAPState();
     CHIP_ERROR ConfigureWiFiAP();
     void ChangeWiFiAPState(WiFiAPState newState);
-    static void DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError);
+    static void DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::CHIP_ERROR aError);
 #endif
 
     // ===== Members for internal use by the following friends.
diff --git a/src/platform/Linux/SystemTimeSupport.cpp b/src/platform/Linux/SystemTimeSupport.cpp
index c2fdc91..c5d536d 100644
--- a/src/platform/Linux/SystemTimeSupport.cpp
+++ b/src/platform/Linux/SystemTimeSupport.cpp
@@ -64,7 +64,7 @@
     return static_cast<uint64_t>(epoch.count());
 }
 
-System::Error GetClock_RealTime(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTime(uint64_t & curTime)
 {
     struct timeval tv;
     int res = gettimeofday(&tv, nullptr);
@@ -74,18 +74,18 @@
     }
     if (tv.tv_sec < CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     if (tv.tv_usec < 0)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     static_assert(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD >= 0, "We might be letting through negative tv_sec values!");
     curTime = (static_cast<uint64_t>(tv.tv_sec) * UINT64_C(1000000)) + static_cast<uint64_t>(tv.tv_usec);
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-System::Error GetClock_RealTimeMS(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTimeMS(uint64_t & curTime)
 {
     struct timeval tv;
     int res = gettimeofday(&tv, nullptr);
@@ -95,18 +95,18 @@
     }
     if (tv.tv_sec < CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     if (tv.tv_usec < 0)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     static_assert(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD >= 0, "We might be letting through negative tv_sec values!");
     curTime = (static_cast<uint64_t>(tv.tv_sec) * UINT64_C(1000)) + (static_cast<uint64_t>(tv.tv_usec) / 1000);
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-System::Error SetClock_RealTime(uint64_t newCurTime)
+CHIP_ERROR SetClock_RealTime(uint64_t newCurTime)
 {
     struct timeval tv;
     tv.tv_sec  = static_cast<time_t>(newCurTime / UINT64_C(1000000));
@@ -114,7 +114,7 @@
     int res    = settimeofday(&tv, nullptr);
     if (res != 0)
     {
-        return (errno == EPERM) ? CHIP_SYSTEM_ERROR_ACCESS_DENIED : MapErrorPOSIX(errno);
+        return (errno == EPERM) ? CHIP_ERROR_ACCESS_DENIED : MapErrorPOSIX(errno);
     }
 #if CHIP_PROGRESS_LOGGING
     {
@@ -127,7 +127,7 @@
             tv.tv_sec, calendar.tm_year, calendar.tm_mon, calendar.tm_mday, calendar.tm_hour, calendar.tm_min, calendar.tm_sec);
     }
 #endif // CHIP_PROGRESS_LOGGING
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 } // namespace Layer
diff --git a/src/platform/Linux/ThreadStackManagerImpl.cpp b/src/platform/Linux/ThreadStackManagerImpl.cpp
index 7c7a080..f7c6fcc 100644
--- a/src/platform/Linux/ThreadStackManagerImpl.cpp
+++ b/src/platform/Linux/ThreadStackManagerImpl.cpp
@@ -38,7 +38,8 @@
 #endif
 
 #define OTBR_TO_CHIP_ERROR(x)                                                                                                      \
-    (x == ClientError::ERROR_NONE ? CHIP_NO_ERROR : _CHIP_ERROR(CHIP_CONFIG_OTBR_CLIENT_ERROR_MIN + static_cast<int>(x)))
+    (x == ClientError::ERROR_NONE ? CHIP_NO_ERROR                                                                                  \
+                                  : static_cast<CHIP_ERROR>(CHIP_CONFIG_OTBR_CLIENT_ERROR_MIN + static_cast<int>(x)))
 
 #define LogClientError(error)                                                                                                      \
     do                                                                                                                             \
diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.cpp b/src/platform/Linux/bluez/ChipDeviceScanner.cpp
index c7c492f..339a848 100644
--- a/src/platform/Linux/bluez/ChipDeviceScanner.cpp
+++ b/src/platform/Linux/bluez/ChipDeviceScanner.cpp
@@ -143,7 +143,7 @@
     return CHIP_NO_ERROR;
 }
 
-void ChipDeviceScanner::TimerExpiredCallback(chip::System::Layer * layer, void * appState, chip::System::Error error)
+void ChipDeviceScanner::TimerExpiredCallback(chip::System::Layer * layer, void * appState, CHIP_ERROR error)
 {
     static_cast<ChipDeviceScanner *>(appState)->StopScan();
 }
diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.h b/src/platform/Linux/bluez/ChipDeviceScanner.h
index 431be2a..8f825f1 100644
--- a/src/platform/Linux/bluez/ChipDeviceScanner.h
+++ b/src/platform/Linux/bluez/ChipDeviceScanner.h
@@ -75,7 +75,7 @@
     static std::unique_ptr<ChipDeviceScanner> Create(BluezAdapter1 * adapter, ChipDeviceScannerDelegate * delegate);
 
 private:
-    static void TimerExpiredCallback(chip::System::Layer * layer, void * appState, chip::System::Error error);
+    static void TimerExpiredCallback(chip::System::Layer * layer, void * appState, CHIP_ERROR error);
     static int MainLoopStartScan(ChipDeviceScanner * self);
     static int MainLoopStopScan(ChipDeviceScanner * self);
     static void SignalObjectAdded(GDBusObjectManager * manager, GDBusObject * object, ChipDeviceScanner * self);
diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp
index 2082f5a..122015c 100644
--- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp
+++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp
@@ -586,7 +586,7 @@
 exit:
     if (err != CHIP_NO_ERROR)
     {
-        ChipLogError(DeviceLayer, "GetAndLogThreadTopologyMinimul failed: %" PRId32, err);
+        ChipLogError(DeviceLayer, "GetAndLogThreadTopologyMinimul failed: %" CHIP_ERROR_FORMAT, err);
     }
 
     return err;
diff --git a/src/platform/OpenThread/OpenThreadUtils.cpp b/src/platform/OpenThread/OpenThreadUtils.cpp
index b8925f3..6a8a673 100644
--- a/src/platform/OpenThread/OpenThreadUtils.cpp
+++ b/src/platform/OpenThread/OpenThreadUtils.cpp
@@ -42,7 +42,7 @@
  */
 CHIP_ERROR MapOpenThreadError(otError otErr)
 {
-    return (otErr == OT_ERROR_NONE) ? CHIP_NO_ERROR : CHIP_CONFIG_OPENTHREAD_ERROR_MIN + (CHIP_ERROR) otErr;
+    return (otErr == OT_ERROR_NONE) ? CHIP_NO_ERROR : CHIP_CONFIG_OPENTHREAD_ERROR_MIN + static_cast<CHIP_ERROR>(otErr);
 }
 
 /**
@@ -57,7 +57,7 @@
  * @return false                    If the supplied error was not an OpenThread error.
  *
  */
-bool FormatOpenThreadError(char * buf, uint16_t bufSize, int32_t err)
+bool FormatOpenThreadError(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
     if (err < CHIP_CONFIG_OPENTHREAD_ERROR_MIN || err > CHIP_CONFIG_OPENTHREAD_ERROR_MAX)
     {
diff --git a/src/platform/SystemEventSupport.cpp b/src/platform/SystemEventSupport.cpp
index 3d7c027..f29a30d 100644
--- a/src/platform/SystemEventSupport.cpp
+++ b/src/platform/SystemEventSupport.cpp
@@ -34,8 +34,8 @@
 
 using namespace ::chip::DeviceLayer;
 
-System::Error PostEvent(System::Layer & aLayer, void * aContext, System::Object & aTarget, System::EventType aType,
-                        uintptr_t aArgument)
+CHIP_ERROR PostEvent(System::Layer & aLayer, void * aContext, System::Object & aTarget, System::EventType aType,
+                     uintptr_t aArgument)
 {
     ChipDeviceEvent event;
     event.Type                          = DeviceEventType::kChipSystemLayerEvent;
@@ -45,21 +45,21 @@
 
     PlatformMgr().PostEvent(&event);
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-System::Error DispatchEvents(Layer & aLayer, void * aContext)
+CHIP_ERROR DispatchEvents(Layer & aLayer, void * aContext)
 {
     PlatformMgr().RunEventLoop();
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-System::Error DispatchEvent(System::Layer & aLayer, void * aContext, const ChipDeviceEvent * aEvent)
+CHIP_ERROR DispatchEvent(System::Layer & aLayer, void * aContext, const ChipDeviceEvent * aEvent)
 {
     PlatformMgr().DispatchEvent(aEvent);
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 } // namespace Layer
diff --git a/src/platform/SystemTimerSupport.cpp b/src/platform/SystemTimerSupport.cpp
index 3657113..8e90c72 100644
--- a/src/platform/SystemTimerSupport.cpp
+++ b/src/platform/SystemTimerSupport.cpp
@@ -34,7 +34,7 @@
 
 using namespace ::chip::DeviceLayer;
 
-System::Error StartTimer(System::Layer & aLayer, void * aContext, uint32_t aMilliseconds)
+CHIP_ERROR StartTimer(System::Layer & aLayer, void * aContext, uint32_t aMilliseconds)
 {
     return PlatformMgr().StartChipTimer(aMilliseconds);
 }
diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp
index 14b2d92..a017e72 100644
--- a/src/platform/Zephyr/BLEManagerImpl.cpp
+++ b/src/platform/Zephyr/BLEManagerImpl.cpp
@@ -524,13 +524,13 @@
     return CHIP_NO_ERROR;
 }
 
-void BLEManagerImpl::HandleBLEAdvertisementTimeout(System::Layer * layer, void * param, System::Error error)
+void BLEManagerImpl::HandleBLEAdvertisementTimeout(System::Layer * layer, void * param, CHIP_ERROR error)
 {
     BLEMgr().SetAdvertisingEnabled(false);
     ChipLogProgress(DeviceLayer, "CHIPoBLE advertising disabled because of timeout expired");
 }
 
-void BLEManagerImpl::HandleBLEAdvertisementIntervalChange(System::Layer * layer, void * param, System::Error error)
+void BLEManagerImpl::HandleBLEAdvertisementIntervalChange(System::Layer * layer, void * param, CHIP_ERROR error)
 {
     BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising);
     ChipLogProgress(DeviceLayer, "CHIPoBLE advertising mode changed to slow");
diff --git a/src/platform/Zephyr/BLEManagerImpl.h b/src/platform/Zephyr/BLEManagerImpl.h
index 9a8fcda..0e4cca0 100644
--- a/src/platform/Zephyr/BLEManagerImpl.h
+++ b/src/platform/Zephyr/BLEManagerImpl.h
@@ -122,8 +122,8 @@
     static void HandleTXCompleted(bt_conn * conn, void * param);
     static void HandleConnect(bt_conn * conn, uint8_t err);
     static void HandleDisconnect(bt_conn * conn, uint8_t reason);
-    static void HandleBLEAdvertisementTimeout(System::Layer * layer, void * param, System::Error error);
-    static void HandleBLEAdvertisementIntervalChange(System::Layer * layer, void * param, System::Error error);
+    static void HandleBLEAdvertisementTimeout(System::Layer * layer, void * param, CHIP_ERROR error);
+    static void HandleBLEAdvertisementIntervalChange(System::Layer * layer, void * param, CHIP_ERROR error);
 
     // ===== Members for internal use by the following friends.
 
diff --git a/src/platform/Zephyr/SystemTimeSupport.cpp b/src/platform/Zephyr/SystemTimeSupport.cpp
index faf562c..25a9061 100644
--- a/src/platform/Zephyr/SystemTimeSupport.cpp
+++ b/src/platform/Zephyr/SystemTimeSupport.cpp
@@ -52,27 +52,27 @@
     return GetClock_Monotonic();
 }
 
-Error GetClock_RealTime(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTime(uint64_t & curTime)
 {
     if (sBootTimeUS == 0)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     curTime = sBootTimeUS + GetClock_Monotonic();
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error GetClock_RealTimeMS(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTimeMS(uint64_t & curTime)
 {
     if (sBootTimeUS == 0)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     curTime = (sBootTimeUS + GetClock_Monotonic()) / 1000;
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error SetClock_RealTime(uint64_t newCurTime)
+CHIP_ERROR SetClock_RealTime(uint64_t newCurTime)
 {
     // FIXME: make thread-safe or update comment in SystemClock.h
     uint64_t timeSinceBootUS = GetClock_Monotonic();
@@ -84,7 +84,7 @@
     {
         sBootTimeUS = 0;
     }
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 } // namespace Layer
diff --git a/src/platform/cc13x2_26x2/BlePlatformConfig.h b/src/platform/cc13x2_26x2/BlePlatformConfig.h
index ae611aa..a4745eb 100644
--- a/src/platform/cc13x2_26x2/BlePlatformConfig.h
+++ b/src/platform/cc13x2_26x2/BlePlatformConfig.h
@@ -26,6 +26,3 @@
  */
 
 #pragma once
-
-#define BLE_CONFIG_ERROR_TYPE int32_t
-#define BLE_CONFIG_ERROR_FORMAT PRId32
diff --git a/src/platform/cc13x2_26x2/CHIPPlatformConfig.h b/src/platform/cc13x2_26x2/CHIPPlatformConfig.h
index 5444e51..f9abcb8 100644
--- a/src/platform/cc13x2_26x2/CHIPPlatformConfig.h
+++ b/src/platform/cc13x2_26x2/CHIPPlatformConfig.h
@@ -31,10 +31,7 @@
 // ==================== General Platform Adaptations ====================
 
 #define CHIP_CONFIG_ERROR_TYPE uint32_t
-#define CHIP_CONFIG_NO_ERROR (0)
-
-#define ASN1_CONFIG_ERROR_TYPE uint32_t
-#define ASN1_CONFIG_NO_ERROR (0)
+#define CHIP_CONFIG_ERROR_FORMAT PRIu32
 
 #define ChipDie() assert()
 
diff --git a/src/platform/cc13x2_26x2/InetPlatformConfig.h b/src/platform/cc13x2_26x2/InetPlatformConfig.h
index a90834c..eb6d4ca 100644
--- a/src/platform/cc13x2_26x2/InetPlatformConfig.h
+++ b/src/platform/cc13x2_26x2/InetPlatformConfig.h
@@ -27,9 +27,6 @@
 
 // ==================== Platform Adaptations ====================
 
-#define INET_CONFIG_ERROR_TYPE uint32_t
-#define INET_CONFIG_NO_ERROR (0)
-
 #define INET_CONFIG_ERROR_MIN 1000000
 #define INET_CONFIG_ERROR_MAX 1000999
 
diff --git a/src/platform/cc13x2_26x2/SystemPlatformConfig.h b/src/platform/cc13x2_26x2/SystemPlatformConfig.h
index c1dc8bc..7cd34b8 100644
--- a/src/platform/cc13x2_26x2/SystemPlatformConfig.h
+++ b/src/platform/cc13x2_26x2/SystemPlatformConfig.h
@@ -39,13 +39,6 @@
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_TYPE int
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent *
 
-#define CHIP_SYSTEM_CONFIG_ERROR_TYPE uint32_t
-#define CHIP_SYSTEM_CONFIG_NO_ERROR (0)
-
-#define CHIP_SYSTEM_CONFIG_ERROR_MIN 0
-#define CHIP_SYSTEM_CONFIG_ERROR_MAX 999
-#define _CHIP_SYSTEM_CONFIG_ERROR(e) (CHIP_SYSTEM_CONFIG_ERROR_MIN + (e))
-
 // ========== Platform-specific Configuration Overrides =========
 
 /* none yet */
diff --git a/src/platform/mbed/CHIPPlatformConfig.h b/src/platform/mbed/CHIPPlatformConfig.h
index 91f96be..5083cd3 100644
--- a/src/platform/mbed/CHIPPlatformConfig.h
+++ b/src/platform/mbed/CHIPPlatformConfig.h
@@ -29,15 +29,11 @@
 // ==================== General Platform Adaptations ====================
 
 #define CHIP_CONFIG_ERROR_TYPE int32_t
-#define CHIP_CONFIG_NO_ERROR 0
+#define CHIP_CONFIG_ERROR_FORMAT PRId32
+
 #define CHIP_CONFIG_ERROR_MIN 4000000
 #define CHIP_CONFIG_ERROR_MAX 4000999
 
-#define ASN1_CONFIG_ERROR_TYPE int32_t
-#define ASN1_CONFIG_NO_ERROR 0
-#define ASN1_CONFIG_ERROR_MIN 5000000
-#define ASN1_CONFIG_ERROR_MAX 5000999
-
 #define ChipDie() abort()
 
 #define CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE const char *
diff --git a/src/platform/qpg6100/BlePlatformConfig.h b/src/platform/qpg6100/BlePlatformConfig.h
index 896d3df..4e7fd64 100644
--- a/src/platform/qpg6100/BlePlatformConfig.h
+++ b/src/platform/qpg6100/BlePlatformConfig.h
@@ -30,12 +30,8 @@
 #define BLE_CONNECTION_UNINITIALIZED (0xFFFF)
 #define BLE_MAX_RECEIVE_WINDOW_SIZE 5
 
-#define BLE_CONFIG_ERROR_TYPE int32_t
-#define BLE_CONFIG_ERROR_FORMAT PRId32
-#define BLE_CONFIG_NO_ERROR 0
 #define BLE_CONFIG_ERROR_MIN 6000000
 #define BLE_CONFIG_ERROR_MAX 6000999
-#define _BLE_CONFIG_ERROR(e) (BLE_CONFIG_ERROR_MIN + (e))
 
 // ========== Platform-specific Configuration Overrides =========
 
diff --git a/src/platform/qpg6100/CHIPPlatformConfig.h b/src/platform/qpg6100/CHIPPlatformConfig.h
index 15e894c..9b3f9d4 100644
--- a/src/platform/qpg6100/CHIPPlatformConfig.h
+++ b/src/platform/qpg6100/CHIPPlatformConfig.h
@@ -26,12 +26,10 @@
 // ==================== General Platform Adaptations ====================
 
 #define CHIP_CONFIG_ERROR_TYPE int32_t
-#define CHIP_CONFIG_NO_ERROR 0
-#define CHIP_CONFIG_ERROR_MIN 4000000
-#define CHIP_CONFIG_ERROR_MAX 4000999
+#define CHIP_CONFIG_ERROR_FORMAT PRId32
+#define CHIP_CONFIG_CORE_ERROR_MIN 4000000
+#define CHIP_CONFIG_CORE_ERROR_MAX 4000999
 
-#define ASN1_CONFIG_ERROR_TYPE int32_t
-#define ASN1_CONFIG_NO_ERROR 0
 #define ASN1_CONFIG_ERROR_MIN 5000000
 #define ASN1_CONFIG_ERROR_MAX 5000999
 
diff --git a/src/platform/qpg6100/InetPlatformConfig.h b/src/platform/qpg6100/InetPlatformConfig.h
index 63b8717..037aebb 100644
--- a/src/platform/qpg6100/InetPlatformConfig.h
+++ b/src/platform/qpg6100/InetPlatformConfig.h
@@ -26,8 +26,6 @@
 
 // ==================== Platform Adaptations ====================
 
-#define INET_CONFIG_ERROR_TYPE int32_t
-#define INET_CONFIG_NO_ERROR 0
 #define INET_CONFIG_ERROR_MIN 1000000
 #define INET_CONFIG_ERROR_MAX 1000999
 
diff --git a/src/platform/qpg6100/SystemPlatformConfig.h b/src/platform/qpg6100/SystemPlatformConfig.h
index 4842bb0..2e12c72 100644
--- a/src/platform/qpg6100/SystemPlatformConfig.h
+++ b/src/platform/qpg6100/SystemPlatformConfig.h
@@ -38,11 +38,6 @@
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_TYPE int
 #define CHIP_SYSTEM_CONFIG_LWIP_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent *
 
-#define CHIP_SYSTEM_CONFIG_ERROR_TYPE int32_t
-#define CHIP_SYSTEM_CONFIG_NO_ERROR 0
-#define CHIP_SYSTEM_CONFIG_ERROR_MIN 7000000
-#define CHIP_SYSTEM_CONFIG_ERROR_MAX 7000999
-#define _CHIP_SYSTEM_CONFIG_ERROR(e) (CHIP_SYSTEM_CONFIG_ERROR_MIN + (e))
 #define CHIP_SYSTEM_LWIP_ERROR_MIN 3000000
 #define CHIP_SYSTEM_LWIP_ERROR_MAX 3000128
 
diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp
index eb9a411..6a99d92 100644
--- a/src/protocols/secure_channel/CASESession.cpp
+++ b/src/protocols/secure_channel/CASESession.cpp
@@ -310,7 +310,7 @@
     uint8_t * msg = nullptr;
 
     msg_R1 = System::PacketBufferHandle::New(data_len);
-    VerifyOrReturnError(!msg_R1.IsNull(), CHIP_SYSTEM_ERROR_NO_MEMORY);
+    VerifyOrReturnError(!msg_R1.IsNull(), CHIP_ERROR_NO_MEMORY);
 
     msg = msg_R1->Start();
 
@@ -519,7 +519,7 @@
                                      msg_r2_signed_enc_len + sizeof(tag));
 
     msg_R2 = System::PacketBufferHandle::New(data_len);
-    VerifyOrExit(!msg_R2.IsNull(), err = CHIP_SYSTEM_ERROR_NO_MEMORY);
+    VerifyOrExit(!msg_R2.IsNull(), err = CHIP_ERROR_NO_MEMORY);
 
     // Step 10
     // now construct sigmaR2
@@ -783,7 +783,7 @@
     data_len = static_cast<uint16_t>(sizeof(tag) + msg_r3_encrypted_len);
 
     msg_R3 = System::PacketBufferHandle::New(data_len);
-    VerifyOrExit(!msg_R3.IsNull(), err = CHIP_SYSTEM_ERROR_NO_MEMORY);
+    VerifyOrExit(!msg_R3.IsNull(), err = CHIP_ERROR_NO_MEMORY);
 
     {
         Encoding::LittleEndian::BufferWriter bbuf(msg_R3->Start(), data_len);
diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp
index 8676bb9..bb935e2 100644
--- a/src/protocols/secure_channel/PASESession.cpp
+++ b/src/protocols/secure_channel/PASESession.cpp
@@ -345,7 +345,7 @@
 CHIP_ERROR PASESession::SendPBKDFParamRequest()
 {
     System::PacketBufferHandle req = System::PacketBufferHandle::New(kPBKDFParamRandomNumberSize);
-    VerifyOrReturnError(!req.IsNull(), CHIP_SYSTEM_ERROR_NO_MEMORY);
+    VerifyOrReturnError(!req.IsNull(), CHIP_ERROR_NO_MEMORY);
 
     ReturnErrorOnFailure(DRBG_get_bytes(req->Start(), kPBKDFParamRandomNumberSize));
 
@@ -404,7 +404,7 @@
     uint8_t * msg = nullptr;
 
     resp = System::PacketBufferHandle::New(resplen);
-    VerifyOrReturnError(!resp.IsNull(), CHIP_SYSTEM_ERROR_NO_MEMORY);
+    VerifyOrReturnError(!resp.IsNull(), CHIP_ERROR_NO_MEMORY);
 
     msg = resp->Start();
 
@@ -496,7 +496,7 @@
     ReturnErrorOnFailure(mSpake2p.ComputeRoundOne(NULL, 0, X, &X_len));
 
     Encoding::LittleEndian::PacketBufferWriter bbuf(System::PacketBufferHandle::New(sizeof(uint16_t) + X_len));
-    VerifyOrReturnError(!bbuf.IsNull(), CHIP_SYSTEM_ERROR_NO_MEMORY);
+    VerifyOrReturnError(!bbuf.IsNull(), CHIP_ERROR_NO_MEMORY);
     bbuf.Put16(mConnectionState.GetLocalKeyID());
     bbuf.Put(&X[0], X_len);
     VerifyOrReturnError(bbuf.Fit(), CHIP_ERROR_NO_MEMORY);
@@ -556,7 +556,7 @@
 
     {
         Encoding::LittleEndian::PacketBufferWriter bbuf(System::PacketBufferHandle::New(data_len));
-        VerifyOrExit(!bbuf.IsNull(), err = CHIP_SYSTEM_ERROR_NO_MEMORY);
+        VerifyOrExit(!bbuf.IsNull(), err = CHIP_ERROR_NO_MEMORY);
         bbuf.Put16(mConnectionState.GetLocalKeyID());
         bbuf.Put(&Y[0], Y_len);
         bbuf.Put(verifier, verifier_len);
@@ -632,7 +632,7 @@
 
     {
         Encoding::PacketBufferWriter bbuf(System::PacketBufferHandle::New(verifier_len));
-        VerifyOrExit(!bbuf.IsNull(), err = CHIP_SYSTEM_ERROR_NO_MEMORY);
+        VerifyOrExit(!bbuf.IsNull(), err = CHIP_ERROR_NO_MEMORY);
 
         bbuf.Put(verifier, verifier_len);
         VerifyOrExit(bbuf.Fit(), err = CHIP_ERROR_NO_MEMORY);
diff --git a/src/protocols/secure_channel/tests/TestCASESession.cpp b/src/protocols/secure_channel/tests/TestCASESession.cpp
index a0968de..9458c12 100644
--- a/src/protocols/secure_channel/tests/TestCASESession.cpp
+++ b/src/protocols/secure_channel/tests/TestCASESession.cpp
@@ -489,10 +489,11 @@
 
 static TestContext sContext;
 
-/**
+namespace {
+/*
  *  Set up the test suite.
  */
-int CASE_TestSecurePairing_Setup(void * inContext)
+CHIP_ERROR CASETestSecurePairingSetup(void * inContext)
 {
     TestContext & ctx = *reinterpret_cast<TestContext *>(inContext);
 
@@ -512,6 +513,15 @@
 
     return InitCredentialSets();
 }
+} // anonymous namespace
+
+/**
+ *  Set up the test suite.
+ */
+int CASE_TestSecurePairing_Setup(void * inContext)
+{
+    return CASETestSecurePairingSetup(inContext) == CHIP_NO_ERROR ? SUCCESS : FAILURE;
+}
 
 /**
  *  Tear down the test suite.
diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp
index 67a5295..98c16b3 100644
--- a/src/protocols/secure_channel/tests/TestPASESession.cpp
+++ b/src/protocols/secure_channel/tests/TestPASESession.cpp
@@ -78,7 +78,7 @@
             {
                 test_os_sleep_ms(65);
                 ReliableMessageMgr * rm = mContext->GetExchangeManager().GetReliableMessageMgr();
-                ReliableMessageMgr::Timeout(&mContext->GetSystemLayer(), rm, CHIP_SYSTEM_NO_ERROR);
+                ReliableMessageMgr::Timeout(&mContext->GetSystemLayer(), rm, CHIP_NO_ERROR);
             }
         }
 
diff --git a/src/system/SystemClock.cpp b/src/system/SystemClock.cpp
index a4b45b2..4fc082e 100644
--- a/src/system/SystemClock.cpp
+++ b/src/system/SystemClock.cpp
@@ -116,7 +116,7 @@
 #endif // HAVE_CLOCK_GETTIME
 }
 
-Error GetClock_RealTime(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTime(uint64_t & curTime)
 {
 #if HAVE_CLOCK_GETTIME
     struct timespec ts;
@@ -127,10 +127,10 @@
     }
     if (ts.tv_sec < CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     curTime = (static_cast<uint64_t>(ts.tv_sec) * UINT64_C(1000000)) + (static_cast<uint64_t>(ts.tv_nsec) / 1000);
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 #else  // HAVE_CLOCK_GETTIME
     struct timeval tv;
     int res = gettimeofday(&tv, NULL);
@@ -140,23 +140,23 @@
     }
     if (tv.tv_sec < CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD)
     {
-        return CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED;
+        return CHIP_ERROR_REAL_TIME_NOT_SYNCED;
     }
     curTime = (tv.tv_sec * UINT64_C(1000000)) + tv.tv_usec;
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 #endif // HAVE_CLOCK_GETTIME
 }
 
-Error GetClock_RealTimeMS(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTimeMS(uint64_t & curTime)
 {
-    Error err = GetClock_RealTime(curTime);
-    curTime   = curTime / 1000;
+    CHIP_ERROR err = GetClock_RealTime(curTime);
+    curTime        = curTime / 1000;
     return err;
 }
 
 #if HAVE_CLOCK_SETTIME || HAVE_SETTIMEOFDAY
 
-Error SetClock_RealTime(uint64_t newCurTime)
+CHIP_ERROR SetClock_RealTime(uint64_t newCurTime)
 {
 #if HAVE_CLOCK_SETTIME
     struct timespec ts;
@@ -165,9 +165,9 @@
     int res    = clock_settime(CLOCK_REALTIME, &ts);
     if (res != 0)
     {
-        return (errno == EPERM) ? CHIP_SYSTEM_ERROR_ACCESS_DENIED : MapErrorPOSIX(errno);
+        return (errno == EPERM) ? CHIP_ERROR_ACCESS_DENIED : MapErrorPOSIX(errno);
     }
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 #else  // HAVE_CLOCK_SETTIME
     struct timeval tv;
     tv.tv_sec  = static_cast<time_t>(newCurTime / UINT64_C(1000000));
@@ -175,17 +175,17 @@
     int res    = settimeofday(&tv, NULL);
     if (res != 0)
     {
-        return (errno == EPERM) ? CHIP_SYSTEM_ERROR_ACCESS_DENIED : MapErrorPOSIX(errno);
+        return (errno == EPERM) ? CHIP_ERROR_ACCESS_DENIED : MapErrorPOSIX(errno);
     }
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 #endif // HAVE_CLOCK_SETTIME
 }
 
 #else // !HAVE_CLOCK_SETTTIME
 
-Error SetClock_RealTime(uint64_t newCurTime)
+CHIP_ERROR SetClock_RealTime(uint64_t newCurTime)
 {
-    return CHIP_SYSTEM_ERROR_NOT_SUPPORTED;
+    return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 }
 
 #endif // HAVE_CLOCK_SETTIME || HAVE_SETTIMEOFDAY
@@ -246,19 +246,19 @@
     return GetClock_MonotonicMS();
 }
 
-Error GetClock_RealTime(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTime(uint64_t & curTime)
 {
-    return CHIP_SYSTEM_ERROR_NOT_SUPPORTED;
+    return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 }
 
-Error GetClock_RealTimeMS(uint64_t & curTime)
+CHIP_ERROR GetClock_RealTimeMS(uint64_t & curTime)
 {
-    return CHIP_SYSTEM_ERROR_NOT_SUPPORTED;
+    return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 }
 
-Error SetClock_RealTime(uint64_t newCurTime)
+CHIP_ERROR SetClock_RealTime(uint64_t newCurTime)
 {
-    return CHIP_SYSTEM_ERROR_NOT_SUPPORTED;
+    return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 }
 
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP_MONOTONIC_TIME
diff --git a/src/system/SystemClock.h b/src/system/SystemClock.h
index ea8e6fc..9686006 100644
--- a/src/system/SystemClock.h
+++ b/src/system/SystemClock.h
@@ -128,12 +128,12 @@
  * rate of least at whole seconds (values of 1,000,000), but may tick faster.
  *
  * On those platforms that are capable of tracking real time, GetClock_RealTime() must return the
- * error CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED whenever the system is unsynchronized with real time.
+ * error CHIP_ERROR_REAL_TIME_NOT_SYNCED whenever the system is unsynchronized with real time.
  *
  * Platforms that are incapable of tracking real time should not implement the GetClock_RealTime()
  * function, thereby forcing link-time failures of features that depend on access to real time.
  * Alternatively, such platforms may supply an implementation of GetClock_RealTime() that returns
- * the error CHIP_SYSTEM_ERROR_NOT_SUPPORTED.
+ * the error CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE.
  *
  * This function is expected to be thread-safe on any platform that employs threading.
  *
@@ -143,14 +143,14 @@
  *
  * @param[out] curTime                  The current time, expressed as Unix time scaled to microseconds.
  *
- * @retval #CHIP_SYSTEM_NO_ERROR       If the method succeeded.
- * @retval #CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED
+ * @retval #CHIP_NO_ERROR       If the method succeeded.
+ * @retval #CHIP_ERROR_REAL_TIME_NOT_SYNCED
  *                                      If the platform is capable of tracking real time, but is
  *                                      is currently unsynchronized.
- * @retval #CHIP_SYSTEM_ERROR_NOT_SUPPORTED
+ * @retval #CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *                                      If the platform is incapable of tracking real time.
  */
-extern Error GetClock_RealTime(uint64_t & curTime);
+extern CHIP_ERROR GetClock_RealTime(uint64_t & curTime);
 
 /**
  * @brief
@@ -168,14 +168,14 @@
  *
  * @param[out] curTimeMS               The current time, expressed as Unix time scaled to milliseconds.
  *
- * @retval #CHIP_SYSTEM_NO_ERROR       If the method succeeded.
- * @retval #CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED
+ * @retval #CHIP_NO_ERROR       If the method succeeded.
+ * @retval #CHIP_ERROR_REAL_TIME_NOT_SYNCED
  *                                      If the platform is capable of tracking real time, but is
  *                                      is currently unsynchronized.
- * @retval #CHIP_SYSTEM_ERROR_NOT_SUPPORTED
+ * @retval #CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *                                      If the platform is incapable of tracking real time.
  */
-extern Error GetClock_RealTimeMS(uint64_t & curTimeMS);
+extern CHIP_ERROR GetClock_RealTimeMS(uint64_t & curTimeMS);
 
 /**
  * @brief
@@ -188,13 +188,13 @@
  * seconds.
  *
  * On platforms that support tracking real time, the SetClock_RealTime() function must return the error
- * CHIP_SYSTEM_ERROR_ACCESS_DENIED if the calling application does not have the privilege to set the
+ * CHIP_ERROR_ACCESS_DENIED if the calling application does not have the privilege to set the
  * current time.
  *
  * Platforms that are incapable of tracking real time, or do not offer the ability to set real time,
  * should not implement the SetClock_RealTime() function, thereby forcing link-time failures of features
  * that depend on setting real time.  Alternatively, such platforms may supply an implementation of
- * SetClock_RealTime() that returns the error CHIP_SYSTEM_ERROR_NOT_SUPPORTED.
+ * SetClock_RealTime() that returns the error CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE.
  *
  * This function is expected to be thread-safe on any platform that employs threading.
  *
@@ -204,14 +204,14 @@
  *
  * @param[in] newCurTime                The new current time, expressed as Unix time scaled to microseconds.
  *
- * @retval #CHIP_SYSTEM_NO_ERROR       If the method succeeded.
- * @retval #CHIP_SYSTEM_ERROR_NOT_SUPPORTED
+ * @retval #CHIP_NO_ERROR       If the method succeeded.
+ * @retval #CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *                                      If the platform is incapable of tracking real time.
- * @retval #CHIP_SYSTEM_ERROR_ACCESS_DENIED
+ * @retval #CHIP_ERROR_ACCESS_DENIED
  *                                      If the calling application does not have the privilege to set the
  *                                      current time.
  */
-extern Error SetClock_RealTime(uint64_t newCurTime);
+extern CHIP_ERROR SetClock_RealTime(uint64_t newCurTime);
 
 } // namespace Layer
 } // namespace Platform
diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h
index d6038dc..5487148 100644
--- a/src/system/SystemConfig.h
+++ b/src/system/SystemConfig.h
@@ -157,11 +157,6 @@
 
 #endif // CHIP_SYSTEM_CONFIG_TRANSFER_INETLAYER_PROJECT_CONFIGURATION
 
-/* Standard include headers */
-#ifndef CHIP_SYSTEM_CONFIG_ERROR_TYPE
-#include <stdint.h>
-#endif /* CHIP_SYSTEM_CONFIG_ERROR_TYPE */
-
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 #ifdef TARGET_MCU_STM32L4
 // [ MBED HACK ]
@@ -260,59 +255,6 @@
 #error "FORBIDDEN: CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && CHIP_SYSTEM_CONFIG_MBED_LOCKING"
 #endif // CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING && CHIP_SYSTEM_CONFIG_MBED_LOCKING
 
-#ifndef CHIP_SYSTEM_CONFIG_ERROR_TYPE
-
-/**
- *  @def CHIP_SYSTEM_CONFIG_ERROR_TYPE
- *
- *  @brief
- *      This defines the data type used to represent errors for the CHIP System Layer subsystem.
- */
-#define CHIP_SYSTEM_CONFIG_ERROR_TYPE int32_t
-
-/**
- *  @def CHIP_SYSTEM_CONFIG_NO_ERROR
- *
- *  @brief
- *      This defines the CHIP System Layer error code for no error or success.
- */
-#ifndef CHIP_SYSTEM_CONFIG_NO_ERROR
-#define CHIP_SYSTEM_CONFIG_NO_ERROR 0
-#endif /* CHIP_SYSTEM_CONFIG_NO_ERROR */
-
-/**
- *  @def CHIP_SYSTEM_CONFIG_ERROR_MIN
- *
- *  @brief
- *      This defines the base or minimum CHIP System Layer error number range.
- */
-#ifndef CHIP_SYSTEM_CONFIG_ERROR_MIN
-#define CHIP_SYSTEM_CONFIG_ERROR_MIN 7000
-#endif /* CHIP_SYSTEM_CONFIG_ERROR_MIN */
-
-/**
- *  @def CHIP_SYSTEM_CONFIG_ERROR_MAX
- *
- *  @brief
- *      This defines the top or maximum CHIP System Layer error number range.
- */
-#ifndef CHIP_SYSTEM_CONFIG_ERROR_MAX
-#define CHIP_SYSTEM_CONFIG_ERROR_MAX 7999
-#endif /* CHIP_SYSTEM_CONFIG_ERROR_MAX */
-
-/**
- *  @def _CHIP_SYSTEM_CONFIG_ERROR
- *
- *  @brief
- *      This defines a mapping function for CHIP System Layer errors that allows mapping such errors into a platform- or
- *      system-specific range.
- */
-#ifndef _CHIP_SYSTEM_CONFIG_ERROR
-#define _CHIP_SYSTEM_CONFIG_ERROR(e) (CHIP_SYSTEM_CONFIG_ERROR_MIN + (e))
-#endif /* _CHIP_SYSTEM_CONFIG_ERROR */
-
-#endif /* CHIP_SYSTEM_CONFIG_ERROR_TYPE */
-
 /**
  *  @def CHIP_SYSTEM_HEADER_RESERVE_SIZE
  *
diff --git a/src/system/SystemError.cpp b/src/system/SystemError.cpp
index 0dd361c..112be57 100644
--- a/src/system/SystemError.cpp
+++ b/src/system/SystemError.cpp
@@ -101,72 +101,6 @@
 namespace chip {
 namespace System {
 
-/**
- * Register a text error formatter for System Layer errors.
- */
-void RegisterLayerErrorFormatter()
-{
-    static ErrorFormatter sSystemLayerErrorFormatter = { FormatLayerError, nullptr };
-
-    RegisterErrorFormatter(&sSystemLayerErrorFormatter);
-}
-
-/**
- * Given a System Layer error, returns a human-readable NULL-terminated C string
- * describing the error.
- *
- * @param[in] buf                   Buffer into which the error string will be placed.
- * @param[in] bufSize               Size of the supplied buffer in bytes.
- * @param[in] err                   The error to be described.
- *
- * @return true                     If a description string was written into the supplied buffer.
- * @return false                    If the supplied error was not a System Layer error.
- *
- */
-bool FormatLayerError(char * buf, uint16_t bufSize, int32_t err)
-{
-    const char * desc = nullptr;
-
-    if (err < CHIP_SYSTEM_ERROR_MIN || err > CHIP_SYSTEM_ERROR_MAX)
-    {
-        return false;
-    }
-
-#if !CHIP_CONFIG_SHORT_ERROR_STR
-    switch (err)
-    {
-    case CHIP_SYSTEM_ERROR_NOT_IMPLEMENTED:
-        desc = "Not implemented";
-        break;
-    case CHIP_SYSTEM_ERROR_NOT_SUPPORTED:
-        desc = "Not supported";
-        break;
-    case CHIP_SYSTEM_ERROR_BAD_ARGS:
-        desc = "Bad arguments";
-        break;
-    case CHIP_SYSTEM_ERROR_UNEXPECTED_STATE:
-        desc = "Unexpected state";
-        break;
-    case CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT:
-        desc = "Unexpected event";
-        break;
-    case CHIP_SYSTEM_ERROR_NO_MEMORY:
-        desc = "No memory";
-        break;
-    case CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED:
-        desc = "Real time not synchronized";
-        break;
-    case CHIP_SYSTEM_ERROR_ACCESS_DENIED:
-        desc = "Access denied";
-        break;
-    }
-#endif // !CHIP_CONFIG_SHORT_ERROR_STR
-
-    chip::FormatError(buf, bufSize, "Sys", err, desc);
-
-    return true;
-}
-
 #if !CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_POSIX_ERROR_FUNCTIONS
 /**
  * This implements a mapping function for CHIP System Layer errors that allows mapping integers in the number space of the
@@ -177,9 +111,9 @@
  *
  *  @return The mapped POSIX network or OS error.
  */
-DLL_EXPORT Error MapErrorPOSIX(int aError)
+DLL_EXPORT CHIP_ERROR MapErrorPOSIX(int aError)
 {
-    return (aError == 0 ? CHIP_SYSTEM_NO_ERROR : CHIP_SYSTEM_POSIX_ERROR_MIN + aError);
+    return (aError == 0 ? CHIP_NO_ERROR : static_cast<CHIP_ERROR>(CHIP_SYSTEM_POSIX_ERROR_MIN + aError));
 }
 
 /**
@@ -190,9 +124,9 @@
  *
  *  @return A NULL-terminated, OS-specific descriptive C string describing the error.
  */
-DLL_EXPORT const char * DescribeErrorPOSIX(Error aError)
+DLL_EXPORT const char * DescribeErrorPOSIX(CHIP_ERROR aError)
 {
-    const int lError = (aError - CHIP_SYSTEM_POSIX_ERROR_MIN);
+    const int lError = (static_cast<int>(aError) - CHIP_SYSTEM_POSIX_ERROR_MIN);
     return strerror(lError);
 }
 
@@ -204,7 +138,7 @@
  *
  *  @return True if the specified error is an OS error; otherwise, false.
  */
-DLL_EXPORT bool IsErrorPOSIX(Error aError)
+DLL_EXPORT bool IsErrorPOSIX(CHIP_ERROR aError)
 {
     return (aError >= CHIP_SYSTEM_POSIX_ERROR_MIN && aError <= CHIP_SYSTEM_POSIX_ERROR_MAX);
 }
@@ -233,9 +167,9 @@
  * @return false                    If the supplied error was not a POSIX error.
  *
  */
-bool FormatPOSIXError(char * buf, uint16_t bufSize, int32_t err)
+bool FormatPOSIXError(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
-    const Error sysErr = static_cast<Error>(err);
+    const CHIP_ERROR sysErr = static_cast<CHIP_ERROR>(err);
 
     if (IsErrorPOSIX(sysErr))
     {
@@ -260,7 +194,7 @@
  *
  *  @return The mapped POSIX error.
  */
-DLL_EXPORT Error MapErrorZephyr(int aError)
+DLL_EXPORT CHIP_ERROR MapErrorZephyr(int aError)
 {
     return MapErrorPOSIX(-aError);
 }
@@ -277,11 +211,11 @@
  *  @return The mapped LwIP network or OS error.
  *
  */
-DLL_EXPORT Error MapErrorLwIP(err_t aError)
+DLL_EXPORT CHIP_ERROR MapErrorLwIP(err_t aError)
 {
     static_assert(std::numeric_limits<err_t>::min() == CHIP_SYSTEM_LWIP_ERROR_MIN - CHIP_SYSTEM_LWIP_ERROR_MAX,
                   "Can't represent all LWIP errors");
-    return (aError == ERR_OK ? CHIP_SYSTEM_NO_ERROR : CHIP_SYSTEM_LWIP_ERROR_MIN - aError);
+    return (aError == ERR_OK ? CHIP_NO_ERROR : CHIP_SYSTEM_LWIP_ERROR_MIN - aError);
 }
 
 /**
@@ -293,7 +227,7 @@
  *  @return A NULL-terminated, LwIP-specific descriptive C string describing the error.
  *
  */
-DLL_EXPORT const char * DescribeErrorLwIP(Error aError)
+DLL_EXPORT const char * DescribeErrorLwIP(CHIP_ERROR aError)
 {
     if (!IsErrorLwIP(aError))
     {
@@ -328,7 +262,7 @@
  *  @return True if the specified error is a LwIP error; otherwise, false.
  *
  */
-DLL_EXPORT bool IsErrorLwIP(Error aError)
+DLL_EXPORT bool IsErrorLwIP(CHIP_ERROR aError)
 {
     return (aError >= CHIP_SYSTEM_LWIP_ERROR_MIN && aError <= CHIP_SYSTEM_LWIP_ERROR_MAX);
 }
@@ -357,9 +291,9 @@
  * @return false                    If the supplied error was not an LwIP error.
  *
  */
-bool FormatLwIPError(char * buf, uint16_t bufSize, int32_t err)
+bool FormatLwIPError(char * buf, uint16_t bufSize, CHIP_ERROR err)
 {
-    const chip::System::Error sysErr = static_cast<chip::System::Error>(err);
+    const CHIP_ERROR sysErr = static_cast<CHIP_ERROR>(err);
 
     if (IsErrorLwIP(sysErr))
     {
diff --git a/src/system/SystemError.h b/src/system/SystemError.h
index 3f8e5f1..bc1667c 100644
--- a/src/system/SystemError.h
+++ b/src/system/SystemError.h
@@ -32,167 +32,55 @@
 #pragma once
 
 // Include headers
+#include <core/CHIPError.h>
 #include <system/SystemConfig.h>
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 #include <lwip/err.h>
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
-/**
- *  @def CHIP_SYSTEM_NO_ERROR
- *
- *  @brief
- *      This macro expands to a constant expression representing the error code for success or no error. Its definition may be
- *      configured via the #CHIP_SYSTEM_CONFIG_NO_ERROR configuration variable.
- */
-#define CHIP_SYSTEM_NO_ERROR CHIP_SYSTEM_CONFIG_NO_ERROR
-
-/**
- *  @def CHIP_SYSTEM_CONFIG_ERROR_MIN
- *
- *  @brief
- *      This macro expands to a constant expression representing the minimum code number for error conditions in the CHIP System
- *      Layer. This value may be configured via #CHIP_SYSTEM_CONFIG_ERROR_MIN.
- */
-#ifdef CHIP_SYSTEM_CONFIG_ERROR_MIN
-#define CHIP_SYSTEM_ERROR_MIN CHIP_SYSTEM_CONFIG_ERROR_MIN
-#endif // CHIP_SYSTEM_CONFIG_ERROR_MIN
-
-/**
- *  @def CHIP_SYSTEM_CONFIG_ERROR_MAX
- *
- *  @brief
- *      This macro expands to a constant expression representing the maximum code number for error conditions in the CHIP System
- *      Layer. This value may be configured via #CHIP_SYSTEM_CONFIG_ERROR_MAX.
- */
-#ifdef CHIP_SYSTEM_CONFIG_ERROR_MAX
-#define CHIP_SYSTEM_ERROR_MAX CHIP_SYSTEM_CONFIG_ERROR_MAX
-#endif // CHIP_SYSTEM_CONFIG_ERROR_MAX
-
-/**
- *  @def _CHIP_SYSTEM_ERROR(e)
- *
- *  @brief
- *      This defines a mapping function for CHIP System Layer errors that allows mapping such errors into a platform- or
- *      system-specific range. This function may be configured via #_CHIP_SYSTEM_CONFIG_ERROR(e).
- *
- *  @param[in]  e  The CHIP System Layer error to map.
- *
- *  @return The mapped CHIP System Layer error.
- */
-#define _CHIP_SYSTEM_ERROR(e) _CHIP_SYSTEM_CONFIG_ERROR(e)
-
-/**
- *  @name Error Definitions
- *
- *  @{
- */
-
-/**
- *  @def CHIP_SYSTEM_ERROR_NOT_IMPLEMENTED
- *
- *  @brief
- *      A requested function has not been implemented.
- */
-#define CHIP_SYSTEM_ERROR_NOT_IMPLEMENTED _CHIP_SYSTEM_ERROR(0)
-
-/**
- *  @def CHIP_SYSTEM_ERROR_NOT_SUPPORTED
- *
- *  @brief
- *      A requested function or feature is not supported.
- */
-#define CHIP_SYSTEM_ERROR_NOT_SUPPORTED _CHIP_SYSTEM_ERROR(1)
-
-/**
- *  @def CHIP_SYSTEM_ERROR_BAD_ARGS
- *
- *  @brief
- *      An invalid argument or arguments were supplied.
- */
-#define CHIP_SYSTEM_ERROR_BAD_ARGS _CHIP_SYSTEM_ERROR(2)
-
-/**
- *  @def CHIP_SYSTEM_ERROR_UNEXPECTED_STATE
- *
- *  @brief
- *      An unexpected state was encountered.
- */
-#define CHIP_SYSTEM_ERROR_UNEXPECTED_STATE _CHIP_SYSTEM_ERROR(3)
-
-/**
- *  @def CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT
- *
- *  @brief
- *      An unexpected event was encountered.
- */
-#define CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT _CHIP_SYSTEM_ERROR(4)
-
-/**
- *  @def CHIP_SYSTEM_ERROR_NO_MEMORY
- *
- *  @brief
- *      A request for memory could not be fulfilled.
- */
-#define CHIP_SYSTEM_ERROR_NO_MEMORY _CHIP_SYSTEM_ERROR(5)
-
-/**
- *  @def CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED
- *
- *  @brief
- *      The system's real time clock is not synchronized to an accurate time source.
- */
-#define CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED _CHIP_SYSTEM_ERROR(6)
-
-/**
- *  @def CHIP_SYSTEM_ERROR_ACCESS_DENIED
- *
- *  @brief
- *      The requestor is not privileged to perform the requested operation.
- */
-#define CHIP_SYSTEM_ERROR_ACCESS_DENIED _CHIP_SYSTEM_ERROR(7)
-
-//                        !!!!! IMPORTANT !!!!!
-//
-// If you add new CHIP System Layer errors, please update the translation of error
-// codes to strings in SystemError.cpp, and add them to unittest in test-apps/TestErrorStr.cpp
-
-/**
- *  @}
- */
-
 #ifdef __cplusplus
 
 namespace chip {
 namespace System {
 
-/**
- *  The basic type for all chip::System errors.
- *
- *  This is defined to a platform- or system-specific type.
- */
-typedef CHIP_SYSTEM_CONFIG_ERROR_TYPE Error;
-
 extern void RegisterLayerErrorFormatter();
-extern bool FormatLayerError(char * buf, uint16_t bufSize, int32_t err);
+extern bool FormatLayerError(char * buf, uint16_t bufSize, CHIP_ERROR err);
 
-extern Error MapErrorPOSIX(int code);
-extern const char * DescribeErrorPOSIX(Error code);
-extern bool IsErrorPOSIX(Error code);
+extern CHIP_ERROR MapErrorPOSIX(int code);
+extern const char * DescribeErrorPOSIX(CHIP_ERROR code);
+extern bool IsErrorPOSIX(CHIP_ERROR code);
 extern void RegisterPOSIXErrorFormatter();
-extern bool FormatPOSIXError(char * buf, uint16_t bufSize, int32_t err);
-extern Error MapErrorZephyr(int code);
+extern bool FormatPOSIXError(char * buf, uint16_t bufSize, CHIP_ERROR err);
+extern CHIP_ERROR MapErrorZephyr(int code);
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 
-extern Error MapErrorLwIP(err_t code);
-extern const char * DescribeErrorLwIP(Error code);
-extern bool IsErrorLwIP(Error code);
+extern CHIP_ERROR MapErrorLwIP(err_t code);
+extern const char * DescribeErrorLwIP(CHIP_ERROR code);
+extern bool IsErrorLwIP(CHIP_ERROR code);
 extern void RegisterLwIPErrorFormatter(void);
-extern bool FormatLwIPError(char * buf, uint16_t bufSize, int32_t err);
+extern bool FormatLwIPError(char * buf, uint16_t bufSize, CHIP_ERROR err);
 
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
+// clang-format off
+
+// !!!!! IMPORTANT !!!!!
+// These definitions are present temporarily in order to reduce breakage for PRs in flight.
+// TODO: remove compatibility definitions
+using Error = CHIP_ERROR;
+#define CHIP_SYSTEM_NO_ERROR                    CHIP_NO_ERROR
+#define CHIP_SYSTEM_ERROR_ACCESS_DENIED         CHIP_ERROR_ACCESS_DENIED
+#define CHIP_SYSTEM_ERROR_BAD_ARGS              CHIP_ERROR_INVALID_ARGUMENT
+#define CHIP_SYSTEM_ERROR_NOT_SUPPORTED         CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
+#define CHIP_SYSTEM_ERROR_NO_MEMORY             CHIP_ERROR_NO_MEMORY
+#define CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED  CHIP_ERROR_REAL_TIME_NOT_SYNCED
+#define CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT      CHIP_ERROR_UNEXPECTED_EVENT
+#define CHIP_SYSTEM_ERROR_UNEXPECTED_STATE      CHIP_ERROR_INCORRECT_STATE
+
+// clang-format on
+
 } // namespace System
 } // namespace chip
 
diff --git a/src/system/SystemLayer.cpp b/src/system/SystemLayer.cpp
index 203aa46..3af4332 100644
--- a/src/system/SystemLayer.cpp
+++ b/src/system/SystemLayer.cpp
@@ -125,11 +125,10 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
 }
 
-Error Layer::Init(void * aContext)
+CHIP_ERROR Layer::Init(void * aContext)
 {
-    Error lReturn;
+    CHIP_ERROR lReturn;
 
-    RegisterLayerErrorFormatter();
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
     RegisterPOSIXErrorFormatter();
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
@@ -138,7 +137,7 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
     if (this->mLayerState != kLayerState_NotInitialized)
-        return CHIP_SYSTEM_ERROR_UNEXPECTED_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
     lReturn = Platform::Layer::WillInit(*this, aContext);
     SuccessOrExit(lReturn);
@@ -164,13 +163,13 @@
     return lReturn;
 }
 
-Error Layer::Shutdown()
+CHIP_ERROR Layer::Shutdown()
 {
-    Error lReturn;
+    CHIP_ERROR lReturn;
     void * lContext;
 
     if (this->mLayerState == kLayerState_NotInitialized)
-        return CHIP_SYSTEM_ERROR_UNEXPECTED_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
     lContext = this->mContext;
     lReturn  = Platform::Layer::WillShutdown(*this, lContext);
@@ -225,12 +224,12 @@
     this->mPlatformData = aPlatformData;
 }
 
-Error Layer::NewTimer(Timer *& aTimerPtr)
+CHIP_ERROR Layer::NewTimer(Timer *& aTimerPtr)
 {
     Timer * lTimer = nullptr;
 
     if (this->State() != kLayerState_Initialized)
-        return CHIP_SYSTEM_ERROR_UNEXPECTED_STATE;
+        return CHIP_ERROR_INCORRECT_STATE;
 
     lTimer    = Timer::sPool.TryCreate(*this);
     aTimerPtr = lTimer;
@@ -238,10 +237,10 @@
     if (lTimer == nullptr)
     {
         ChipLogError(chipSystemLayer, "Timer pool EMPTY");
-        return CHIP_SYSTEM_ERROR_NO_MEMORY;
+        return CHIP_ERROR_NO_MEMORY;
     }
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 static bool TimerReady(const Timer::Epoch epoch, const Cancelable * timer)
@@ -271,7 +270,7 @@
  *   @param[in]  aMilliseconds Expiration time in milliseconds.
  *   @param[in]  aCallback     A pointer to the Callback that fires when the timer expires
  *
- *   @return CHIP_SYSTEM_NO_ERROR On success.
+ *   @return CHIP_NO_ERROR On success.
  *   @return Other Value indicating timer failed to start.
  *
  */
@@ -320,14 +319,14 @@
  *   @param[in]  aComplete     A pointer to the function called when timer expires.
  *   @param[in]  aAppState     A pointer to the application state object used when timer expires.
  *
- *   @return CHIP_SYSTEM_NO_ERROR On success.
- *   @return CHIP_SYSTEM_ERROR_NO_MEMORY If a timer cannot be allocated.
+ *   @return CHIP_NO_ERROR On success.
+ *   @return CHIP_ERROR_NO_MEMORY If a timer cannot be allocated.
  *   @return Other Value indicating timer failed to start.
  *
  */
-Error Layer::StartTimer(uint32_t aMilliseconds, TimerCompleteFunct aComplete, void * aAppState)
+CHIP_ERROR Layer::StartTimer(uint32_t aMilliseconds, TimerCompleteFunct aComplete, void * aAppState)
 {
-    Error lReturn;
+    CHIP_ERROR lReturn;
     Timer * lTimer;
 
     this->CancelTimer(aComplete, aAppState);
@@ -335,7 +334,7 @@
     SuccessOrExit(lReturn);
 
     lReturn = lTimer->Start(aMilliseconds, aComplete, aAppState);
-    if (lReturn != CHIP_SYSTEM_NO_ERROR)
+    if (lReturn != CHIP_NO_ERROR)
     {
         lTimer->Release();
     }
@@ -398,26 +397,26 @@
  * @param[in] aAppState A pointer to an application state object to be
  *                      passed to the callback function as argument.
  *
- * @retval CHIP_SYSTEM_ERROR_UNEXPECTED_STATE If the SystemLayer has
+ * @retval CHIP_ERROR_INCORRECT_STATE If the SystemLayer has
  *                      not been initialized.
  *
- * @retval CHIP_SYSTEM_ERROR_NO_MEMORY If the SystemLayer cannot
+ * @retval CHIP_ERROR_NO_MEMORY If the SystemLayer cannot
  *                      allocate a new timer.
  *
- * @retval CHIP_SYSTEM_NO_ERROR On success.
+ * @retval CHIP_NO_ERROR On success.
  */
-Error Layer::ScheduleWork(TimerCompleteFunct aComplete, void * aAppState)
+CHIP_ERROR Layer::ScheduleWork(TimerCompleteFunct aComplete, void * aAppState)
 {
     assertChipStackLockedByCurrentThread();
 
-    Error lReturn;
+    CHIP_ERROR lReturn;
     Timer * lTimer;
 
     lReturn = this->NewTimer(lTimer);
     SuccessOrExit(lReturn);
 
     lReturn = lTimer->ScheduleWork(aComplete, aAppState);
-    if (lReturn != CHIP_SYSTEM_NO_ERROR)
+    if (lReturn != CHIP_NO_ERROR)
     {
         lTimer->Release();
     }
@@ -510,24 +509,24 @@
  * whole seconds (values of 1,000,000), but on some platforms may tick faster.
  *
  * If the underlying platform is capable of tracking real time, but the system is currently
- * unsynchronized, GetClock_RealTime() will return the error CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED.
+ * unsynchronized, GetClock_RealTime() will return the error CHIP_ERROR_REAL_TIME_NOT_SYNCED.
  *
  * On platforms that are incapable of tracking real time, the GetClock_RealTime() method may be absent,
  * resulting a link error for any application that references it.  Alternatively, such platforms may
- * supply an implementation of GetClock_RealTime() that always returns the error CHIP_SYSTEM_ERROR_NOT_SUPPORTED.
+ * supply an implementation of GetClock_RealTime() that always returns the error CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE.
  *
  * This function is guaranteed to be thread-safe on any platform that employs threading.
  *
  * @param[out] curTime                  The current time, expressed as Unix time scaled to microseconds.
  *
- * @retval #CHIP_SYSTEM_NO_ERROR       If the method succeeded.
- * @retval #CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED
+ * @retval #CHIP_NO_ERROR       If the method succeeded.
+ * @retval #CHIP_ERROR_REAL_TIME_NOT_SYNCED
  *                                      If the platform is capable of tracking real time, but is
  *                                      is currently unsynchronized.
- * @retval #CHIP_SYSTEM_ERROR_NOT_SUPPORTED
+ * @retval #CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *                                      If the platform is incapable of tracking real time.
  */
-Error Layer::GetClock_RealTime(uint64_t & curTime)
+CHIP_ERROR Layer::GetClock_RealTime(uint64_t & curTime)
 {
     // Current implementation is a simple pass-through to the platform.
     return Platform::Layer::GetClock_RealTime(curTime);
@@ -542,24 +541,24 @@
  * whole seconds (values of 1,000,000), but on some platforms may tick faster.
  *
  * If the underlying platform is capable of tracking real time, but the system is currently
- * unsynchronized, GetClock_RealTimeMS() will return the error CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED.
+ * unsynchronized, GetClock_RealTimeMS() will return the error CHIP_ERROR_REAL_TIME_NOT_SYNCED.
  *
  * On platforms that are incapable of tracking real time, the GetClock_RealTimeMS() method may be absent,
  * resulting a link error for any application that references it.  Alternatively, such platforms may
- * supply an implementation of GetClock_RealTimeMS() that always returns the error CHIP_SYSTEM_ERROR_NOT_SUPPORTED.
+ * supply an implementation of GetClock_RealTimeMS() that always returns the error CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE.
  *
  * This function is guaranteed to be thread-safe on any platform that employs threading.
  *
  * @param[out] curTimeMS               The current time, expressed as Unix time scaled to milliseconds.
  *
- * @retval #CHIP_SYSTEM_NO_ERROR       If the method succeeded.
- * @retval #CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED
+ * @retval #CHIP_NO_ERROR       If the method succeeded.
+ * @retval #CHIP_ERROR_REAL_TIME_NOT_SYNCED
  *                                      If the platform is capable of tracking real time, but is
  *                                      is currently unsynchronized.
- * @retval #CHIP_SYSTEM_ERROR_NOT_SUPPORTED
+ * @retval #CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *                                      If the platform is incapable of tracking real time.
  */
-Error Layer::GetClock_RealTimeMS(uint64_t & curTimeMS)
+CHIP_ERROR Layer::GetClock_RealTimeMS(uint64_t & curTimeMS)
 {
     // Current implementation is a simple pass-through to the platform.
     return Platform::Layer::GetClock_RealTimeMS(curTimeMS);
@@ -577,25 +576,25 @@
  *
  * Some platforms may restrict which applications or processes can set real time.  If the caller is
  * not permitted to change real time, the SetClock_RealTime() function will return the error
- * CHIP_SYSTEM_ERROR_ACCESS_DENIED.
+ * CHIP_ERROR_ACCESS_DENIED.
  *
  * On platforms that are incapable of tracking real time, or do not offer the ability to set real time,
  * the SetClock_RealTime() function may be absent, resulting a link error for any application that
  * references it.  Alternatively, such platforms may supply an implementation of SetClock_RealTime()
- * that always returns the error CHIP_SYSTEM_ERROR_NOT_SUPPORTED.
+ * that always returns the error CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE.
  *
  * This function is guaranteed to be thread-safe on any platform that employs threading.
  *
  * @param[in] newCurTime                The new current time, expressed as Unix time scaled to microseconds.
  *
- * @retval #CHIP_SYSTEM_NO_ERROR       If the method succeeded.
- * @retval #CHIP_SYSTEM_ERROR_NOT_SUPPORTED
+ * @retval #CHIP_NO_ERROR               If the method succeeded.
+ * @retval #CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE
  *                                      If the platform is incapable of tracking real time.
- * @retval #CHIP_SYSTEM_ERROR_ACCESS_DENIED
+ * @retval #CHIP_ERROR_ACCESS_DENIED
  *                                      If the calling application does not have the privilege to set the
  *                                      current time.
  */
-Error Layer::SetClock_RealTime(uint64_t newCurTime)
+CHIP_ERROR Layer::SetClock_RealTime(uint64_t newCurTime)
 {
     // Current implementation is a simple pass-through to the platform.
     return Platform::Layer::SetClock_RealTime(newCurTime);
@@ -713,7 +712,7 @@
  */
 void Layer::WakeIOThread()
 {
-    Error lReturn;
+    CHIP_ERROR lReturn;
 
     if (this->State() != kLayerState_Initialized)
         return;
@@ -727,7 +726,7 @@
 
     // Send notification to wake up the select call.
     lReturn = this->mWakeEvent.Notify();
-    if (lReturn != CHIP_SYSTEM_NO_ERROR)
+    if (lReturn != CHIP_NO_ERROR)
     {
         ChipLogError(chipSystemLayer, "System wake event notify failed: %s", ErrorStr(lReturn));
     }
@@ -745,9 +744,9 @@
  *  @param[in]      aEventType  The type of event to post.
  *  @param[in,out]  aArgument   The argument associated with the event to post.
  */
-Error Layer::HandleSystemLayerEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument)
+CHIP_ERROR Layer::HandleSystemLayerEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument)
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
     ;
 
     // Dispatch logic specific to the event type
@@ -762,7 +761,7 @@
         break;
 
     default:
-        lReturn = CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT;
+        lReturn = CHIP_ERROR_UNEXPECTED_EVENT;
         break;
     }
 
@@ -774,16 +773,16 @@
  *
  *  @param[in]  aDelegate   An uninitialied LwIP event handler delegate structure
  *
- *  @retval     CHIP_SYSTEM_NO_ERROR          On success.
- *  @retval     CHIP_SYSTEM_ERROR_BAD_ARGS    If the function pointer contained in aDelegate is NULL
+ *  @retval     CHIP_NO_ERROR                 On success.
+ *  @retval     CHIP_ERROR_INVALID_ARGUMENT   If the function pointer contained in aDelegate is NULL
  */
-Error Layer::AddEventHandlerDelegate(LwIPEventHandlerDelegate & aDelegate)
+CHIP_ERROR Layer::AddEventHandlerDelegate(LwIPEventHandlerDelegate & aDelegate)
 {
-    Error lReturn;
+    CHIP_ERROR lReturn;
 
-    VerifyOrExit(aDelegate.mFunction != NULL, lReturn = CHIP_SYSTEM_ERROR_BAD_ARGS);
+    VerifyOrExit(aDelegate.mFunction != NULL, lReturn = CHIP_ERROR_INVALID_ARGUMENT);
     aDelegate.Prepend(this->mEventDelegateList);
-    lReturn = CHIP_SYSTEM_NO_ERROR;
+    lReturn = CHIP_NO_ERROR;
 
 exit:
     return lReturn;
@@ -797,22 +796,22 @@
  *  @param[in]      aEventType  The type of event to post.
  *  @param[in,out]  aArgument   The argument associated with the event to post.
  *
- *  @retval    CHIP_SYSTEM_NO_ERROR                   On success.
- *  @retval    CHIP_SYSTEM_ERROR_UNEXPECTED_STATE     If the state of the Layer object is incorrect.
- *  @retval    CHIP_SYSTEM_ERROR_NO_MEMORY            If the event queue is already full.
+ *  @retval    CHIP_NO_ERROR                  On success.
+ *  @retval    CHIP_ERROR_INCORRECT_STATE     If the state of the Layer object is incorrect.
+ *  @retval    CHIP_ERROR_NO_MEMORY           If the event queue is already full.
  *  @retval    other Platform-specific errors generated indicating the reason for failure.
  */
-Error Layer::PostEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument)
+CHIP_ERROR Layer::PostEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument)
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
-    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_SYSTEM_ERROR_UNEXPECTED_STATE);
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
+    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_ERROR_INCORRECT_STATE);
 
     // Sanity check that this instance and the target layer haven't been "crossed".
     VerifyOrDieWithMsg(aTarget.IsRetained(*this), chipSystemLayer, "wrong poster! [target %p != this %p]", &(aTarget.SystemLayer()),
                        this);
 
     lReturn = Platform::Layer::PostEvent(*this, this->mContext, aTarget, aEventType, aArgument);
-    if (lReturn != CHIP_SYSTEM_NO_ERROR)
+    if (lReturn != CHIP_NO_ERROR)
     {
         ChipLogError(chipSystemLayer, "Failed to queue CHIP System Layer event (type %d): %s", aEventType, ErrorStr(lReturn));
     }
@@ -826,12 +825,12 @@
  * This is a syntactic wrapper around a platform-specific hook that effects an event loop, waiting on a queue that services this
  * instance, pulling events off of that queue, and then dispatching them for handling.
  *
- *  @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
+ *  @return #CHIP_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
  */
-Error Layer::DispatchEvents()
+CHIP_ERROR Layer::DispatchEvents()
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
-    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_SYSTEM_ERROR_UNEXPECTED_STATE);
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
+    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_ERROR_INCORRECT_STATE);
 
     lReturn = Platform::Layer::DispatchEvents(*this, this->mContext);
     SuccessOrExit(lReturn);
@@ -848,12 +847,12 @@
  *
  *  @param[in]  aEvent  The platform-specific event object to dispatch for handling.
  *
- * @return CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
+ * @return CHIP_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
  */
-Error Layer::DispatchEvent(Event aEvent)
+CHIP_ERROR Layer::DispatchEvent(Event aEvent)
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
-    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_SYSTEM_ERROR_UNEXPECTED_STATE);
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
+    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_ERROR_INCORRECT_STATE);
 
     lReturn = Platform::Layer::DispatchEvent(*this, this->mContext, aEvent);
     SuccessOrExit(lReturn);
@@ -869,33 +868,33 @@
  *  @param[in]      aEventType  The event / message type to handle.
  *  @param[in]      aArgument   The argument associated with the event / message.
  *
- *  @retval   CHIP_SYSTEM_NO_ERROR                On success.
- *  @retval   CHIP_SYSTEM_ERROR_UNEXPECTED_STATE  If the state of the InetLayer object is incorrect.
- *  @retval   CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT  If the event type is unrecognized.
+ *  @retval   CHIP_NO_ERROR                 On success.
+ *  @retval   CHIP_ERROR_INCORRECT_STATE    If the state of the InetLayer object is incorrect.
+ *  @retval   CHIP_ERROR_UNEXPECTED_EVENT   If the event type is unrecognized.
  */
-Error Layer::HandleEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument)
+CHIP_ERROR Layer::HandleEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument)
 {
     const LwIPEventHandlerDelegate * lEventDelegate;
-    Error lReturn;
-    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_SYSTEM_ERROR_UNEXPECTED_STATE);
+    CHIP_ERROR lReturn;
+    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_ERROR_INCORRECT_STATE);
 
     // Sanity check that this instance and the target layer haven't been "crossed".
     VerifyOrDieWithMsg(aTarget.IsRetained(*this), chipSystemLayer, "wrong handler! [target %p != this %p]",
                        &(aTarget.SystemLayer()), this);
 
-    lReturn        = CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT;
+    lReturn        = CHIP_ERROR_UNEXPECTED_EVENT;
     lEventDelegate = this->mEventDelegateList;
 
     // Prevent the target object from being freed while dispatching the event.
     aTarget.Retain();
 
-    while (lReturn == CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT && lEventDelegate != NULL)
+    while (lReturn == CHIP_ERROR_UNEXPECTED_EVENT && lEventDelegate != NULL)
     {
         lReturn        = lEventDelegate->mFunction(aTarget, aEventType, aArgument);
         lEventDelegate = lEventDelegate->mNextDelegate;
     }
 
-    if (lReturn == CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT)
+    if (lReturn == CHIP_ERROR_UNEXPECTED_EVENT)
     {
         ChipLogError(chipSystemLayer, "Unexpected event type %d", aEventType);
     }
@@ -919,13 +918,13 @@
  *
  *  @param[in]  aDelayMilliseconds  The timer duration in milliseconds.
  *
- *  @return CHIP_SYSTEM_NO_ERROR on success, error code otherwise.
+ *  @return CHIP_NO_ERROR on success, error code otherwise.
  *
  */
-Error Layer::StartPlatformTimer(uint32_t aDelayMilliseconds)
+CHIP_ERROR Layer::StartPlatformTimer(uint32_t aDelayMilliseconds)
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
-    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_SYSTEM_ERROR_UNEXPECTED_STATE);
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
+    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_ERROR_INCORRECT_STATE);
 
     lReturn = Platform::Layer::StartTimer(*this, this->mContext, aDelayMilliseconds);
     SuccessOrExit(lReturn);
@@ -941,13 +940,13 @@
  *      Calls chip::System::Timer::HandleExpiredTimers to handle any expired timers.  It is assumed that this API is called
  *      only while on the thread which owns the CHIP System Layer object.
  *
- *  @return CHIP_SYSTEM_NO_ERROR on success, error code otherwise.
+ *  @return CHIP_NO_ERROR on success, error code otherwise.
  *
  */
-Error Layer::HandlePlatformTimer()
+CHIP_ERROR Layer::HandlePlatformTimer()
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
-    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_SYSTEM_ERROR_UNEXPECTED_STATE);
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
+    VerifyOrExit(this->State() == kLayerState_Initialized, lReturn = CHIP_ERROR_INCORRECT_STATE);
 
     lReturn = Timer::HandleExpiredTimers(*this);
 
@@ -987,15 +986,15 @@
  *
  *  @param[in,out] aContext  Platform-specific context data passed to the layer initialization method, \::Init.
  *
- *  @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
+ *  @return #CHIP_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
  *      Returning non-successful status will abort initialization.
  */
-DLL_EXPORT Error WillInit(Layer & aLayer, void * aContext)
+DLL_EXPORT CHIP_ERROR WillInit(Layer & aLayer, void * aContext)
 {
     static_cast<void>(aLayer);
     static_cast<void>(aContext);
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -1006,15 +1005,15 @@
  *
  *  @param[in,out] aContext  Platform-specific context data passed to the layer initialization method, \::Shutdown.
  *
- *  @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for shutdown failure. Returning
+ *  @return #CHIP_NO_ERROR on success; otherwise, a specific error indicating the reason for shutdown failure. Returning
  *      non-successful status will abort shutdown.
  */
-DLL_EXPORT Error WillShutdown(Layer & aLayer, void * aContext)
+DLL_EXPORT CHIP_ERROR WillShutdown(Layer & aLayer, void * aContext)
 {
     static_cast<void>(aLayer);
     static_cast<void>(aContext);
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -1027,7 +1026,7 @@
  *
  *  @param[in]     aStatus   The overall status being returned via the CHIP System Layer \::Init method.
  */
-DLL_EXPORT void DidInit(Layer & aLayer, void * aContext, Error aStatus)
+DLL_EXPORT void DidInit(Layer & aLayer, void * aContext, CHIP_ERROR aStatus)
 {
     static_cast<void>(aLayer);
     static_cast<void>(aContext);
@@ -1044,10 +1043,10 @@
  *
  *  @param[in]     aStatus   The overall status being returned via the CHIP System Layer \::Shutdown method.
  *
- *  @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for shutdown failure. Returning
+ *  @return #CHIP_NO_ERROR on success; otherwise, a specific error indicating the reason for shutdown failure. Returning
  *      non-successful status will abort shutdown.
  */
-DLL_EXPORT void DidShutdown(Layer & aLayer, void * aContext, Error aStatus)
+DLL_EXPORT void DidShutdown(Layer & aLayer, void * aContext, CHIP_ERROR aStatus)
 {
     static_cast<void>(aLayer);
     static_cast<void>(aContext);
@@ -1081,20 +1080,20 @@
  *
  *  @param[in,out] aArgument The argument associated with the event to post.
  *
- *  @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
+ *  @return #CHIP_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
  */
-DLL_EXPORT Error PostEvent(Layer & aLayer, void * aContext, Object & aTarget, EventType aType, uintptr_t aArgument)
+DLL_EXPORT CHIP_ERROR PostEvent(Layer & aLayer, void * aContext, Object & aTarget, EventType aType, uintptr_t aArgument)
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
     sys_mbox_t lSysMbox;
     LwIPEvent * ev;
     err_t lLwIPError;
 
-    VerifyOrExit(aContext != NULL, lReturn = CHIP_SYSTEM_ERROR_BAD_ARGS);
+    VerifyOrExit(aContext != NULL, lReturn = CHIP_ERROR_INVALID_ARGUMENT);
     lSysMbox = reinterpret_cast<sys_mbox_t>(aContext);
 
     ev = chip::Platform::New<LwIPEvent>();
-    VerifyOrExit(ev != nullptr, lReturn = CHIP_SYSTEM_ERROR_NO_MEMORY);
+    VerifyOrExit(ev != nullptr, lReturn = CHIP_ERROR_NO_MEMORY);
 
     ev->Type     = aType;
     ev->Target   = &aTarget;
@@ -1121,21 +1120,21 @@
  *
  *  @param[in,out] aContext  Platform-specific context data passed to the layer initialization method, \::Init.
  *
- *  @retval   #CHIP_SYSTEM_ERROR_BAD_ARGS          If aLayer or aContext is NULL.
- *  @retval   #CHIP_SYSTEM_ERROR_UNEXPECTED_STATE  If the state of the CHIP System Layer object is unexpected.
- *  @retval   #CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT  If an event type is unrecognized.
- *  @retval   #CHIP_SYSTEM_NO_ERROR                On success.
+ *  @retval   #CHIP_ERROR_INVALID_ARGUMENT      If aLayer or aContext is NULL.
+ *  @retval   #CHIP_ERROR_INCORRECT_STATE       If the state of the CHIP System Layer object is unexpected.
+ *  @retval   #CHIP_ERROR_UNEXPECTED_EVENT      If an event type is unrecognized.
+ *  @retval   #CHIP_NO_ERROR                    On success.
  */
-DLL_EXPORT Error DispatchEvents(Layer & aLayer, void * aContext)
+DLL_EXPORT CHIP_ERROR DispatchEvents(Layer & aLayer, void * aContext)
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
     err_t lLwIPError;
     sys_mbox_t lSysMbox;
     void * lVoidPointer;
     const LwIPEvent * lEvent;
 
     // Sanity check the context / queue.
-    VerifyOrExit(aContext != NULL, lReturn = CHIP_SYSTEM_ERROR_BAD_ARGS);
+    VerifyOrExit(aContext != NULL, lReturn = CHIP_ERROR_INVALID_ARGUMENT);
     lSysMbox = reinterpret_cast<sys_mbox_t>(aContext);
 
     while (true)
@@ -1144,7 +1143,7 @@
         VerifyOrExit(lLwIPError == ERR_OK, lReturn = chip::System::MapErrorLwIP(lLwIPError));
 
         lEvent = static_cast<const LwIPEvent *>(lVoidPointer);
-        VerifyOrExit(lEvent != NULL && lEvent->Target != NULL, lReturn = CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT);
+        VerifyOrExit(lEvent != NULL && lEvent->Target != NULL, lReturn = CHIP_ERROR_UNEXPECTED_EVENT);
 
         lReturn = aLayer.HandleEvent(*lEvent->Target, lEvent->Type, lEvent->Argument);
         chip::Platform::Delete(lEvent);
@@ -1170,20 +1169,20 @@
  *  @param[in,out] aContext  Platform-specific context data passed to the layer initialization method, \::Init.
  *  @param[in]     aEvent    The platform-specific event object to dispatch for handling.
  *
- *  @retval   #CHIP_SYSTEM_ERROR_BAD_ARGS          If aLayer or the event target is NULL.
- *  @retval   #CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT  If the event type is unrecognized.
- *  @retval   #CHIP_SYSTEM_ERROR_UNEXPECTED_STATE  If the state of the CHIP System Layer object is unexpected.
- *  @retval   #CHIP_SYSTEM_NO_ERROR                On success.
+ *  @retval   #CHIP_ERROR_INVALID_ARGUMENT      If aLayer or the event target is NULL.
+ *  @retval   #CHIP_ERROR_UNEXPECTED_EVENT      If the event type is unrecognized.
+ *  @retval   #CHIP_ERROR_INCORRECT_STATE       If the state of the CHIP System Layer object is unexpected.
+ *  @retval   #CHIP_NO_ERROR                    On success.
  */
-DLL_EXPORT Error DispatchEvent(Layer & aLayer, void * aContext, Event aEvent)
+DLL_EXPORT CHIP_ERROR DispatchEvent(Layer & aLayer, void * aContext, Event aEvent)
 {
     const EventType type = aEvent->Type;
     Object * target      = aEvent->Target;
     const uint32_t data  = aEvent->Argument;
-    Error lReturn        = CHIP_SYSTEM_NO_ERROR;
+    CHIP_ERROR lReturn   = CHIP_NO_ERROR;
 
     // Sanity check the target object.
-    VerifyOrExit(target != NULL, lReturn = CHIP_SYSTEM_ERROR_BAD_ARGS);
+    VerifyOrExit(target != NULL, lReturn = CHIP_ERROR_INVALID_ARGUMENT);
 
     // Handle the event.
     lReturn = aLayer.HandleEvent(*target, type, data);
@@ -1204,11 +1203,11 @@
  *  @param[in,out] aContext             Platform-specific context data passed to the layer initialization method, \::Init.
  *  @param[in]     aMilliseconds        The number of milliseconds to set for the timer.
  *
- *  @retval   #CHIP_SYSTEM_NO_ERROR    Always succeeds unless overridden.
+ *  @retval   #CHIP_NO_ERROR    Always succeeds unless overridden.
  */
-DLL_EXPORT Error StartTimer(Layer & aLayer, void * aContext, uint32_t aMilliseconds)
+DLL_EXPORT CHIP_ERROR StartTimer(Layer & aLayer, void * aContext, uint32_t aMilliseconds)
 {
-    Error lReturn = CHIP_SYSTEM_NO_ERROR;
+    CHIP_ERROR lReturn = CHIP_NO_ERROR;
 
     // At the moment there is no need to do anything for standalone CHIP + LWIP.
     // the Task will periodically call HandleTimer which will process any expired
diff --git a/src/system/SystemLayer.h b/src/system/SystemLayer.h
index 832a21c..8d8f9d4 100644
--- a/src/system/SystemLayer.h
+++ b/src/system/SystemLayer.h
@@ -62,24 +62,23 @@
 namespace Platform {
 namespace Layer {
 
-using ::chip::System::Error;
 using ::chip::System::Layer;
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
 using ::chip::System::Object;
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
-extern Error WillInit(Layer & aLayer, void * aContext);
-extern Error WillShutdown(Layer & aLayer, void * aContext);
+extern CHIP_ERROR WillInit(Layer & aLayer, void * aContext);
+extern CHIP_ERROR WillShutdown(Layer & aLayer, void * aContext);
 
-extern void DidInit(Layer & aLayer, void * aContext, Error aStatus);
-extern void DidShutdown(Layer & aLayer, void * aContext, Error aStatus);
+extern void DidInit(Layer & aLayer, void * aContext, CHIP_ERROR aStatus);
+extern void DidShutdown(Layer & aLayer, void * aContext, CHIP_ERROR aStatus);
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
-extern Error PostEvent(Layer & aLayer, void * aContext, Object & aTarget, EventType aType, uintptr_t aArgument);
-extern Error DispatchEvents(Layer & aLayer, void * aContext);
-extern Error DispatchEvent(Layer & aLayer, void * aContext, Event aEvent);
-extern Error StartTimer(Layer & aLayer, void * aContext, uint32_t aMilliseconds);
+extern CHIP_ERROR PostEvent(Layer & aLayer, void * aContext, Object & aTarget, EventType aType, uintptr_t aArgument);
+extern CHIP_ERROR DispatchEvents(Layer & aLayer, void * aContext);
+extern CHIP_ERROR DispatchEvent(Layer & aLayer, void * aContext, Event aEvent);
+extern CHIP_ERROR StartTimer(Layer & aLayer, void * aContext, uint32_t aMilliseconds);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 } // namespace Layer
@@ -97,7 +96,7 @@
 };
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
-typedef Error (*LwIPEventHandlerFunction)(Object & aTarget, EventType aEventType, uintptr_t aArgument);
+typedef CHIP_ERROR (*LwIPEventHandlerFunction)(Object & aTarget, EventType aEventType, uintptr_t aArgument);
 
 class LwIPEventHandlerDelegate
 {
@@ -130,27 +129,27 @@
 public:
     Layer();
 
-    Error Init(void * aContext);
+    CHIP_ERROR Init(void * aContext);
 
     // Some other layers hold pointers to System::Layer, so care must be taken
     // to ensure that they are not used after calling Shutdown().
-    Error Shutdown();
+    CHIP_ERROR Shutdown();
 
     void * GetPlatformData() const;
     void SetPlatformData(void * aPlatformData);
 
     LayerState State() const;
 
-    Error NewTimer(Timer *& aTimerPtr);
+    CHIP_ERROR NewTimer(Timer *& aTimerPtr);
 
     void StartTimer(uint32_t aMilliseconds, chip::Callback::Callback<> * aCallback);
     void DispatchTimerCallbacks(uint64_t kCurrentEpoch);
 
-    typedef void (*TimerCompleteFunct)(Layer * aLayer, void * aAppState, Error aError);
-    Error StartTimer(uint32_t aMilliseconds, TimerCompleteFunct aComplete, void * aAppState);
+    typedef void (*TimerCompleteFunct)(Layer * aLayer, void * aAppState, CHIP_ERROR aError);
+    CHIP_ERROR StartTimer(uint32_t aMilliseconds, TimerCompleteFunct aComplete, void * aAppState);
     void CancelTimer(TimerCompleteFunct aOnComplete, void * aAppState);
 
-    Error ScheduleWork(TimerCompleteFunct aComplete, void * aAppState);
+    CHIP_ERROR ScheduleWork(TimerCompleteFunct aComplete, void * aAppState);
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS
     WatchableEventManager & WatchableEvents() { return mWatchableEvents; }
@@ -162,17 +161,17 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_IO_THREAD
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
-    typedef Error (*EventHandler)(Object & aTarget, EventType aEventType, uintptr_t aArgument);
-    Error AddEventHandlerDelegate(LwIPEventHandlerDelegate & aDelegate);
+    typedef CHIP_ERROR (*EventHandler)(Object & aTarget, EventType aEventType, uintptr_t aArgument);
+    CHIP_ERROR AddEventHandlerDelegate(LwIPEventHandlerDelegate & aDelegate);
 
     // Event Handling
-    Error PostEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument);
-    Error DispatchEvents(void);
-    Error DispatchEvent(Event aEvent);
-    Error HandleEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument);
+    CHIP_ERROR PostEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument);
+    CHIP_ERROR DispatchEvents(void);
+    CHIP_ERROR DispatchEvent(Event aEvent);
+    CHIP_ERROR HandleEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument);
 
     // Timer Management
-    Error HandlePlatformTimer(void);
+    CHIP_ERROR HandlePlatformTimer(void);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_DISPATCH
@@ -183,9 +182,9 @@
     static uint64_t GetClock_Monotonic();
     static uint64_t GetClock_MonotonicMS();
     static uint64_t GetClock_MonotonicHiRes();
-    static Error GetClock_RealTime(uint64_t & curTime);
-    static Error GetClock_RealTimeMS(uint64_t & curTimeMS);
-    static Error SetClock_RealTime(uint64_t newCurTime);
+    static CHIP_ERROR GetClock_RealTime(uint64_t & curTime);
+    static CHIP_ERROR GetClock_RealTimeMS(uint64_t & curTimeMS);
+    static CHIP_ERROR SetClock_RealTime(uint64_t newCurTime);
 
 private:
     LayerState mLayerState;
@@ -210,15 +209,15 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
-    static Error HandleSystemLayerEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument);
+    static CHIP_ERROR HandleSystemLayerEvent(Object & aTarget, EventType aEventType, uintptr_t aArgument);
 
-    Error StartPlatformTimer(uint32_t aDelayMilliseconds);
+    CHIP_ERROR StartPlatformTimer(uint32_t aDelayMilliseconds);
 
-    friend Error Platform::Layer::PostEvent(Layer & aLayer, void * aContext, Object & aTarget, EventType aType,
-                                            uintptr_t aArgument);
-    friend Error Platform::Layer::DispatchEvents(Layer & aLayer, void * aContext);
-    friend Error Platform::Layer::DispatchEvent(Layer & aLayer, void * aContext, Event aEvent);
-    friend Error Platform::Layer::StartTimer(Layer & aLayer, void * aContext, uint32_t aMilliseconds);
+    friend CHIP_ERROR Platform::Layer::PostEvent(Layer & aLayer, void * aContext, Object & aTarget, EventType aType,
+                                                 uintptr_t aArgument);
+    friend CHIP_ERROR Platform::Layer::DispatchEvents(Layer & aLayer, void * aContext);
+    friend CHIP_ERROR Platform::Layer::DispatchEvent(Layer & aLayer, void * aContext, Event aEvent);
+    friend CHIP_ERROR Platform::Layer::StartTimer(Layer & aLayer, void * aContext, uint32_t aMilliseconds);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_DISPATCH
diff --git a/src/system/SystemMutex.cpp b/src/system/SystemMutex.cpp
index 4dfb351..abd0671 100644
--- a/src/system/SystemMutex.cpp
+++ b/src/system/SystemMutex.cpp
@@ -41,29 +41,29 @@
  *
  *  @param[in,out]  aThis   A zero-initialized object.
  *
- *  @retval         #CHIP_SYSTEM_NO_ERROR                  The mutual exclusion lock is ready to use.
- *  @retval         #CHIP_SYSTEM_ERROR_NO_MEMORY           Insufficient system memory to allocate the mutual exclusion lock.
- *  @retval         #CHIP_SYSTEM_ERROR_UNEXPECTED_STATE    An unexpected system error encountered during initialization.
+ *  @retval         #CHIP_NO_ERROR                  The mutual exclusion lock is ready to use.
+ *  @retval         #CHIP_ERROR_NO_MEMORY           Insufficient system memory to allocate the mutual exclusion lock.
+ *  @retval         #CHIP_ERROR_INCORRECT_STATE     An unexpected system error encountered during initialization.
  */
 
 #if CHIP_SYSTEM_CONFIG_POSIX_LOCKING
-DLL_EXPORT Error Mutex::Init(Mutex & aThis)
+DLL_EXPORT CHIP_ERROR Mutex::Init(Mutex & aThis)
 {
     int lSysError = pthread_mutex_init(&aThis.mPOSIXMutex, nullptr);
-    Error lError;
+    CHIP_ERROR lError;
 
     switch (lSysError)
     {
     case 0:
-        lError = CHIP_SYSTEM_NO_ERROR;
+        lError = CHIP_NO_ERROR;
         break;
 
     case ENOMEM:
-        lError = CHIP_SYSTEM_ERROR_NO_MEMORY;
+        lError = CHIP_ERROR_NO_MEMORY;
         break;
 
     default:
-        lError = CHIP_SYSTEM_ERROR_UNEXPECTED_STATE;
+        lError = CHIP_ERROR_INCORRECT_STATE;
         break;
     }
 
@@ -72,7 +72,7 @@
 #endif // CHIP_SYSTEM_CONFIG_POSIX_LOCKING
 
 #if CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING
-DLL_EXPORT Error Mutex::Init(Mutex & aThis)
+DLL_EXPORT CHIP_ERROR Mutex::Init(Mutex & aThis)
 {
 restart:
     if (__sync_bool_compare_and_swap(&aThis.mInitialized, 0, 1))
@@ -86,7 +86,7 @@
         {
             aThis.mInitialized = 0;
 
-            return CHIP_SYSTEM_ERROR_NO_MEMORY;
+            return CHIP_ERROR_NO_MEMORY;
         }
     }
     else
@@ -102,7 +102,7 @@
         }
     }
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 DLL_EXPORT void Mutex::Lock(void)
diff --git a/src/system/SystemMutex.h b/src/system/SystemMutex.h
index 4eaeb1e..24fe262 100644
--- a/src/system/SystemMutex.h
+++ b/src/system/SystemMutex.h
@@ -74,7 +74,7 @@
     Mutex();
     ~Mutex();
 
-    static Error Init(Mutex & aMutex);
+    static CHIP_ERROR Init(Mutex & aMutex);
 
     void Lock();   /**< Acquire the mutual exclusion lock, blocking the current thread indefinitely if necessary. */
     void Unlock(); /**< Release the mutual exclusion lock (can block on some systems until scheduler completes). */
diff --git a/src/system/SystemObject.cpp b/src/system/SystemObject.cpp
index c909f94..7997fb2 100644
--- a/src/system/SystemObject.cpp
+++ b/src/system/SystemObject.cpp
@@ -81,9 +81,9 @@
 void Object::DeferredRelease(Object::ReleaseDeferralErrorTactic aTactic)
 {
     Layer & lSystemLayer = *this->mSystemLayer;
-    Error lError         = lSystemLayer.PostEvent(*this, chip::System::kEvent_ReleaseObj, 0);
+    CHIP_ERROR lError    = lSystemLayer.PostEvent(*this, chip::System::kEvent_ReleaseObj, 0);
 
-    if (lError != CHIP_SYSTEM_NO_ERROR)
+    if (lError != CHIP_NO_ERROR)
     {
         switch (aTactic)
         {
diff --git a/src/system/SystemSockets.cpp b/src/system/SystemSockets.cpp
index 8234157..bea24b6 100644
--- a/src/system/SystemSockets.cpp
+++ b/src/system/SystemSockets.cpp
@@ -50,7 +50,7 @@
 }
 } // anonymous namespace
 
-Error WakeEvent::Open(WatchableEventManager & watchState)
+CHIP_ERROR WakeEvent::Open(WatchableEventManager & watchState)
 {
     enum
     {
@@ -75,10 +75,10 @@
 
     mWriteFD = fds[FD_WRITE];
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error WakeEvent::Close()
+CHIP_ERROR WakeEvent::Close()
 {
     int res = 0;
 
@@ -91,7 +91,7 @@
         return chip::System::MapErrorPOSIX(errno);
     }
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void WakeEvent::Confirm()
@@ -110,7 +110,7 @@
     } while (res == sizeof(buffer));
 }
 
-Error WakeEvent::Notify()
+CHIP_ERROR WakeEvent::Notify()
 {
     char byte = 1;
 
@@ -119,12 +119,12 @@
         return chip::System::MapErrorPOSIX(errno);
     }
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 #else // CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE
 
-Error WakeEvent::Open(WatchableEventManager & watchState)
+CHIP_ERROR WakeEvent::Open(WatchableEventManager & watchState)
 {
     mFD.Init(watchState);
 
@@ -138,10 +138,10 @@
     mFD.SetCallback(Confirm, reinterpret_cast<intptr_t>(this));
     mFD.RequestCallbackOnPendingRead();
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error WakeEvent::Close()
+CHIP_ERROR WakeEvent::Close()
 {
     int res = mFD.Close();
 
@@ -150,7 +150,7 @@
         return chip::System::MapErrorPOSIX(errno);
     }
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 void WakeEvent::Confirm()
@@ -163,7 +163,7 @@
     }
 }
 
-Error WakeEvent::Notify()
+CHIP_ERROR WakeEvent::Notify()
 {
     uint64_t value = 1;
 
@@ -172,7 +172,7 @@
         return chip::System::MapErrorPOSIX(errno);
     }
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 #endif // CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE
diff --git a/src/system/SystemSockets.h b/src/system/SystemSockets.h
index 2c04163..c2ee88d 100644
--- a/src/system/SystemSockets.h
+++ b/src/system/SystemSockets.h
@@ -309,8 +309,6 @@
 namespace chip {
 namespace System {
 
-using ::chip::System::Error;
-
 /**
  * @class WakeEvent
  *
@@ -320,13 +318,13 @@
 class WakeEvent
 {
 public:
-    Error Open(WatchableEventManager & watchState); /**< Initialize the pipeline */
-    Error Close();                                  /**< Close both ends of the pipeline. */
+    CHIP_ERROR Open(WatchableEventManager & watchState); /**< Initialize the pipeline */
+    CHIP_ERROR Close();                                  /**< Close both ends of the pipeline. */
 
     int GetNotifFD() const { return mFD.GetFD(); }
 
-    Error Notify(); /**< Set the event. */
-    void Confirm(); /**< Clear the event. */
+    CHIP_ERROR Notify(); /**< Set the event. */
+    void Confirm();      /**< Clear the event. */
     static void Confirm(WatchableSocket & socket) { reinterpret_cast<WakeEvent *>(socket.GetCallbackData())->Confirm(); }
 
 private:
diff --git a/src/system/SystemTimer.cpp b/src/system/SystemTimer.cpp
index 382aadc..72b4cdd 100644
--- a/src/system/SystemTimer.cpp
+++ b/src/system/SystemTimer.cpp
@@ -119,10 +119,10 @@
  *  @param[in]  aOnComplete          A pointer to the callback function when this timer fires
  *  @param[in]  aAppState            An arbitrary pointer to be passed into onComplete when this timer fires
  *
- *  @retval #CHIP_SYSTEM_NO_ERROR Unconditionally.
+ *  @retval #CHIP_NO_ERROR Unconditionally.
  *
  */
-Error Timer::Start(uint32_t aDelayMilliseconds, OnCompleteFunct aOnComplete, void * aAppState)
+CHIP_ERROR Timer::Start(uint32_t aDelayMilliseconds, OnCompleteFunct aOnComplete, void * aAppState)
 {
     Layer & lLayer = this->SystemLayer();
 
@@ -168,7 +168,7 @@
         this->mNextTimer   = lTimer->mNextTimer;
         lTimer->mNextTimer = this;
     }
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
@@ -191,7 +191,7 @@
             this->HandleComplete();
         });
         dispatch_resume(timerSource);
-        return CHIP_SYSTEM_NO_ERROR;
+        return CHIP_NO_ERROR;
     }
 #endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH
 
@@ -200,12 +200,12 @@
 #endif // CHIP_SYSTEM_CONFIG_USE_IO_THREAD
 #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-Error Timer::ScheduleWork(OnCompleteFunct aOnComplete, void * aAppState)
+CHIP_ERROR Timer::ScheduleWork(OnCompleteFunct aOnComplete, void * aAppState)
 {
-    Error err      = CHIP_SYSTEM_NO_ERROR;
+    CHIP_ERROR err = CHIP_NO_ERROR;
     Layer & lLayer = this->SystemLayer();
 
     this->AppState     = aAppState;
@@ -243,9 +243,9 @@
 /**
  *  This method de-initializes the timer object, and prevents this timer from firing if it hasn't done so.
  *
- *  @retval #CHIP_SYSTEM_NO_ERROR Unconditionally.
+ *  @retval #CHIP_NO_ERROR Unconditionally.
  */
-Error Timer::Cancel()
+CHIP_ERROR Timer::Cancel()
 {
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     Layer & lLayer = this->SystemLayer();
@@ -297,7 +297,7 @@
 
     this->Release();
 exit:
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 /**
@@ -321,7 +321,7 @@
 
     // Invoke the app's callback, if it's still valid.
     if (lOnComplete != nullptr)
-        lOnComplete(&lLayer, lAppState, CHIP_SYSTEM_NO_ERROR);
+        lOnComplete(&lLayer, lAppState, CHIP_NO_ERROR);
 
 exit:
     return;
@@ -339,10 +339,10 @@
  *  @note
  *      It's harmless if this API gets called and there are no expired timers.
  *
- *  @return CHIP_SYSTEM_NO_ERROR on success, error code otherwise.
+ *  @return CHIP_NO_ERROR on success, error code otherwise.
  *
  */
-Error Timer::HandleExpiredTimers(Layer & aLayer)
+CHIP_ERROR Timer::HandleExpiredTimers(Layer & aLayer)
 {
     size_t timersHandled = 0;
 
@@ -394,7 +394,7 @@
         }
     }
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
diff --git a/src/system/SystemTimer.h b/src/system/SystemTimer.h
index 3b45a19..2413d06 100644
--- a/src/system/SystemTimer.h
+++ b/src/system/SystemTimer.h
@@ -69,11 +69,11 @@
     static Epoch GetCurrentEpoch();
     static bool IsEarlierEpoch(const Epoch & first, const Epoch & second);
 
-    typedef void (*OnCompleteFunct)(Layer * aLayer, void * aAppState, Error aError);
+    typedef void (*OnCompleteFunct)(Layer * aLayer, void * aAppState, CHIP_ERROR aError);
     OnCompleteFunct OnComplete;
 
-    Error Start(uint32_t aDelayMilliseconds, OnCompleteFunct aOnComplete, void * aAppState);
-    Error Cancel();
+    CHIP_ERROR Start(uint32_t aDelayMilliseconds, OnCompleteFunct aOnComplete, void * aAppState);
+    CHIP_ERROR Cancel();
 
     static void GetStatistics(chip::System::Stats::count_t & aNumInUse, chip::System::Stats::count_t & aHighWatermark);
 
@@ -84,12 +84,12 @@
 
     void HandleComplete();
 
-    Error ScheduleWork(OnCompleteFunct aOnComplete, void * aAppState);
+    CHIP_ERROR ScheduleWork(OnCompleteFunct aOnComplete, void * aAppState);
 
 #if CHIP_SYSTEM_CONFIG_USE_LWIP
     Timer * mNextTimer;
 
-    static Error HandleExpiredTimers(Layer & aLayer);
+    static CHIP_ERROR HandleExpiredTimers(Layer & aLayer);
 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP
 
 #if CHIP_SYSTEM_CONFIG_USE_DISPATCH
diff --git a/src/system/tests/TestSystemErrorStr.cpp b/src/system/tests/TestSystemErrorStr.cpp
index 878b4f4..4855d68 100644
--- a/src/system/tests/TestSystemErrorStr.cpp
+++ b/src/system/tests/TestSystemErrorStr.cpp
@@ -48,16 +48,15 @@
 // Test input data.
 
 // clang-format off
-static int32_t sContext[] =
+static CHIP_ERROR sContext[] =
 {
-    CHIP_SYSTEM_ERROR_NOT_IMPLEMENTED,
-    CHIP_SYSTEM_ERROR_NOT_SUPPORTED,
-    CHIP_SYSTEM_ERROR_BAD_ARGS,
-    CHIP_SYSTEM_ERROR_UNEXPECTED_STATE,
-    CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT,
-    CHIP_SYSTEM_ERROR_NO_MEMORY,
-    CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED,
-    CHIP_SYSTEM_ERROR_ACCESS_DENIED
+    CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE,
+    CHIP_ERROR_INVALID_ARGUMENT,
+    CHIP_ERROR_INCORRECT_STATE,
+    CHIP_ERROR_UNEXPECTED_EVENT,
+    CHIP_ERROR_NO_MEMORY,
+    CHIP_ERROR_REAL_TIME_NOT_SYNCED,
+    CHIP_ERROR_ACCESS_DENIED
 };
 // clang-format on
 
@@ -65,10 +64,10 @@
 {
     // Register the layer error formatter
 
-    System::RegisterLayerErrorFormatter();
+    RegisterCHIPLayerErrorFormatter();
 
     // For each defined error...
-    for (int err : sContext)
+    for (CHIP_ERROR err : sContext)
     {
         const char * errStr = ErrorStr(err);
         char expectedText[9];
diff --git a/src/system/tests/TestSystemObject.cpp b/src/system/tests/TestSystemObject.cpp
index 29079f2..69fda04 100644
--- a/src/system/tests/TestSystemObject.cpp
+++ b/src/system/tests/TestSystemObject.cpp
@@ -70,7 +70,7 @@
 class TestObject : public Object
 {
 public:
-    Error Init();
+    CHIP_ERROR Init();
 
     static void CheckRetention(nlTestSuite * inSuite, void * aContext);
     static void CheckConcurrency(nlTestSuite * inSuite, void * aContext);
@@ -104,7 +104,7 @@
 
 ObjectPool<TestObject, TestObject::kPoolSize> TestObject::sPool;
 
-Error TestObject::Init()
+CHIP_ERROR TestObject::Init()
 {
 #if CHIP_SYSTEM_CONFIG_POSIX_LOCKING
     this->mDelay = kMaxDelayIterations > 0 ? 1 : 0;
@@ -114,7 +114,7 @@
     }
 #endif // CHIP_SYSTEM_CONFIG_POSIX_LOCKING
 
-    return CHIP_SYSTEM_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
 namespace {
diff --git a/src/system/tests/TestSystemTimer.cpp b/src/system/tests/TestSystemTimer.cpp
index 6adbceb..7265e46 100644
--- a/src/system/tests/TestSystemTimer.cpp
+++ b/src/system/tests/TestSystemTimer.cpp
@@ -111,13 +111,13 @@
     sOverflowTestDone = true;
 }
 
-void HandleTimerFailed(Layer * inetLayer, void * aState, Error aError)
+void HandleTimerFailed(Layer * inetLayer, void * aState, CHIP_ERROR aError)
 {
     (void) inetLayer, (void) aError;
     TimerFailed(aState);
 }
 
-void HandleTimer10Success(Layer * inetLayer, void * aState, Error aError)
+void HandleTimer10Success(Layer * inetLayer, void * aState, CHIP_ERROR aError)
 {
     TestContext & lContext = *static_cast<TestContext *>(aState);
     NL_TEST_ASSERT(lContext.mTestSuite, true);
@@ -153,7 +153,7 @@
     lSys.CancelTimer(HandleTimer10Success, aContext);
 }
 
-void HandleGreedyTimer(Layer * aLayer, void * aState, Error aError)
+void HandleGreedyTimer(Layer * aLayer, void * aState, CHIP_ERROR aError)
 {
     static uint32_t sNumTimersHandled = 0;
     TestContext & lContext            = *static_cast<TestContext *>(aState);
diff --git a/src/system/tests/TestSystemWakeEvent.cpp b/src/system/tests/TestSystemWakeEvent.cpp
index 4fecf03..19104e1 100644
--- a/src/system/tests/TestSystemWakeEvent.cpp
+++ b/src/system/tests/TestSystemWakeEvent.cpp
@@ -139,7 +139,7 @@
     const auto notifFD = lContext.mWakeEvent.GetNotifFD();
 
     // Check that Close() has cleaned up itself and reopen is possible
-    NL_TEST_ASSERT(inSuite, lContext.mWakeEvent.Open(lContext.mWatchableEvents) == CHIP_SYSTEM_NO_ERROR);
+    NL_TEST_ASSERT(inSuite, lContext.mWakeEvent.Open(lContext.mWatchableEvents) == CHIP_NO_ERROR);
     NL_TEST_ASSERT(inSuite, notifFD < 0);
 }
 } // namespace
diff --git a/src/transport/SecureSessionMgr.cpp b/src/transport/SecureSessionMgr.cpp
index 6179ce3..83e5da1 100644
--- a/src/transport/SecureSessionMgr.cpp
+++ b/src/transport/SecureSessionMgr.cpp
@@ -380,7 +380,7 @@
             {
                 ChipLogError(Inet,
                              "Message counter synchronization for received message, failed to "
-                             "QueueReceivedMessageAndStartSync, err = %" PRId32,
+                             "QueueReceivedMessageAndStartSync, err = %" CHIP_ERROR_FORMAT,
                              err);
             }
             else
@@ -400,7 +400,7 @@
         }
         if (err != CHIP_NO_ERROR)
         {
-            ChipLogError(Inet, "Message counter verify failed, err = %" PRId32, err);
+            ChipLogError(Inet, "Message counter verify failed, err = %" CHIP_ERROR_FORMAT, err);
         }
         SuccessOrExit(err);
     }
@@ -532,7 +532,7 @@
     mTransportMgr->Disconnect(state.GetPeerAddress());
 }
 
-void SecureSessionMgr::ExpiryTimerCallback(System::Layer * layer, void * param, System::Error error)
+void SecureSessionMgr::ExpiryTimerCallback(System::Layer * layer, void * param, CHIP_ERROR error)
 {
     SecureSessionMgr * mgr = reinterpret_cast<SecureSessionMgr *>(param);
 #if CHIP_CONFIG_SESSION_REKEYING
diff --git a/src/transport/SecureSessionMgr.h b/src/transport/SecureSessionMgr.h
index ca0ff7e..2813307 100644
--- a/src/transport/SecureSessionMgr.h
+++ b/src/transport/SecureSessionMgr.h
@@ -324,7 +324,7 @@
     /**
      * Callback for timer expiry check
      */
-    static void ExpiryTimerCallback(System::Layer * layer, void * param, System::Error error);
+    static void ExpiryTimerCallback(System::Layer * layer, void * param, CHIP_ERROR error);
 
     void SecureMessageDispatch(const PacketHeader & packetHeader, const Transport::PeerAddress & peerAddress,
                                System::PacketBufferHandle && msg);
diff --git a/src/transport/raw/BLE.cpp b/src/transport/raw/BLE.cpp
index 0f2432a..9a40c85 100644
--- a/src/transport/raw/BLE.cpp
+++ b/src/transport/raw/BLE.cpp
@@ -145,7 +145,7 @@
     }
 }
 
-void BLEBase::OnBleConnectionError(BLE_ERROR err)
+void BLEBase::OnBleConnectionError(CHIP_ERROR err)
 {
     ClearPendingPackets();
     ChipLogDetail(Inet, "BleConnection Error: %s", ErrorStr(err));
@@ -156,11 +156,11 @@
     HandleMessageReceived(Transport::PeerAddress(Transport::Type::kBle), std::move(buffer));
 }
 
-void BLEBase::OnEndPointConnectComplete(BLEEndPoint * endPoint, BLE_ERROR err)
+void BLEBase::OnEndPointConnectComplete(BLEEndPoint * endPoint, CHIP_ERROR err)
 {
     mState = State::kConnected;
 
-    if (err != BLE_NO_ERROR)
+    if (err != CHIP_NO_ERROR)
     {
         ChipLogError(Inet, "Failed to establish BLE connection: %s", ErrorStr(err));
         ClearPendingPackets();
@@ -177,7 +177,7 @@
     ChipLogDetail(Inet, "BLE EndPoint %p Connection Complete", endPoint);
 }
 
-void BLEBase::OnEndPointConnectionClosed(BLEEndPoint * endPoint, BLE_ERROR err)
+void BLEBase::OnEndPointConnectionClosed(BLEEndPoint * endPoint, CHIP_ERROR err)
 {
     mState       = State::kInitialized;
     mBleEndPoint = nullptr;
diff --git a/src/transport/raw/BLE.h b/src/transport/raw/BLE.h
index 6cedb01..89045fd 100644
--- a/src/transport/raw/BLE.h
+++ b/src/transport/raw/BLE.h
@@ -107,14 +107,14 @@
     // Those functions are BLEConnectionDelegate callbacks used when the connection
     // parameters used a name instead of a BLE_CONNECTION_OBJECT.
     void OnBleConnectionComplete(Ble::BLEEndPoint * endPoint) override;
-    void OnBleConnectionError(BLE_ERROR err) override;
+    void OnBleConnectionError(CHIP_ERROR err) override;
 
     void ClearPendingPackets();
 
     // Those functions are BLEEndPoint callbacks
     void OnEndPointMessageReceived(Ble::BLEEndPoint * endPoint, System::PacketBufferHandle && buffer) override;
-    void OnEndPointConnectComplete(Ble::BLEEndPoint * endPoint, BLE_ERROR err) override;
-    void OnEndPointConnectionClosed(Ble::BLEEndPoint * endPoint, BLE_ERROR err) override;
+    void OnEndPointConnectComplete(Ble::BLEEndPoint * endPoint, CHIP_ERROR err) override;
+    void OnEndPointConnectionClosed(Ble::BLEEndPoint * endPoint, CHIP_ERROR err) override;
 
     Ble::BleLayer * mBleLayer       = nullptr;          ///< Associated ble layer
     State mState                    = State::kNotReady; ///< State of the BLE transport
diff --git a/src/transport/raw/TCP.cpp b/src/transport/raw/TCP.cpp
index e7b28c8..fabace0 100644
--- a/src/transport/raw/TCP.cpp
+++ b/src/transport/raw/TCP.cpp
@@ -86,7 +86,7 @@
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT
     err = params.GetInetLayer()->NewTCPEndPoint(&mListenSocket);
 #else
-    err = CHIP_SYSTEM_ERROR_NOT_SUPPORTED;
+    err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif
     SuccessOrExit(err);
 
@@ -248,7 +248,7 @@
 #if INET_CONFIG_ENABLE_TCP_ENDPOINT
     err = mListenSocket->Layer().NewTCPEndPoint(&endPoint);
 #else
-    err = CHIP_SYSTEM_ERROR_NOT_SUPPORTED;
+    err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
 #endif
     SuccessOrExit(err);
 
@@ -352,7 +352,7 @@
     return CHIP_NO_ERROR;
 }
 
-INET_ERROR TCPBase::OnTcpReceive(Inet::TCPEndPoint * endPoint, System::PacketBufferHandle && buffer)
+CHIP_ERROR TCPBase::OnTcpReceive(Inet::TCPEndPoint * endPoint, System::PacketBufferHandle && buffer)
 {
     Inet::IPAddress ipAddress;
     uint16_t port;
@@ -369,12 +369,12 @@
     {
         // Connection could need to be closed at this point
         ChipLogError(Inet, "Failed to accept received TCP message: %s", ErrorStr(err));
-        return INET_ERROR_UNEXPECTED_EVENT;
+        return CHIP_ERROR_UNEXPECTED_EVENT;
     }
-    return INET_NO_ERROR;
+    return CHIP_NO_ERROR;
 }
 
-void TCPBase::OnConnectionComplete(Inet::TCPEndPoint * endPoint, INET_ERROR inetErr)
+void TCPBase::OnConnectionComplete(Inet::TCPEndPoint * endPoint, CHIP_ERROR inetErr)
 {
     CHIP_ERROR err          = CHIP_NO_ERROR;
     bool foundPendingPacket = false;
@@ -448,7 +448,7 @@
     }
 }
 
-void TCPBase::OnConnectionClosed(Inet::TCPEndPoint * endPoint, INET_ERROR err)
+void TCPBase::OnConnectionClosed(Inet::TCPEndPoint * endPoint, CHIP_ERROR err)
 {
     TCPBase * tcp = reinterpret_cast<TCPBase *>(endPoint->AppState);
 
@@ -497,7 +497,7 @@
     }
 }
 
-void TCPBase::OnAcceptError(Inet::TCPEndPoint * endPoint, INET_ERROR err)
+void TCPBase::OnAcceptError(Inet::TCPEndPoint * endPoint, CHIP_ERROR err)
 {
     ChipLogError(Inet, "Accept error: %s", ErrorStr(err));
 }
diff --git a/src/transport/raw/TCP.h b/src/transport/raw/TCP.h
index 59878d8..a1de89b 100644
--- a/src/transport/raw/TCP.h
+++ b/src/transport/raw/TCP.h
@@ -232,15 +232,15 @@
 
     // Callback handler for TCPEndPoint. TCP message receive handler.
     // @see TCPEndpoint::OnDataReceivedFunct
-    static INET_ERROR OnTcpReceive(Inet::TCPEndPoint * endPoint, System::PacketBufferHandle && buffer);
+    static CHIP_ERROR OnTcpReceive(Inet::TCPEndPoint * endPoint, System::PacketBufferHandle && buffer);
 
     // Callback handler for TCPEndPoint. Called when a connection has been completed.
     // @see TCPEndpoint::OnConnectCompleteFunct
-    static void OnConnectionComplete(Inet::TCPEndPoint * endPoint, INET_ERROR err);
+    static void OnConnectionComplete(Inet::TCPEndPoint * endPoint, CHIP_ERROR err);
 
     // Callback handler for TCPEndPoint. Called when a connection has been closed.
     // @see TCPEndpoint::OnConnectionClosedFunct
-    static void OnConnectionClosed(Inet::TCPEndPoint * endPoint, INET_ERROR err);
+    static void OnConnectionClosed(Inet::TCPEndPoint * endPoint, CHIP_ERROR err);
 
     // Callback handler for TCPEndPoint. Callend when a peer closes the connection.
     // @see TCPEndpoint::OnPeerCloseFunct
@@ -253,7 +253,7 @@
 
     // Called on accept error
     // @see TCPEndpoint::OnAcceptErrorFunct
-    static void OnAcceptError(Inet::TCPEndPoint * endPoint, INET_ERROR err);
+    static void OnAcceptError(Inet::TCPEndPoint * endPoint, CHIP_ERROR err);
 
     Inet::TCPEndPoint * mListenSocket = nullptr;                                     ///< TCP socket used by the transport
     Inet::IPAddressType mEndpointType = Inet::IPAddressType::kIPAddressType_Unknown; ///< Socket listening type
