From 06065e86752e3f300f0293192956259fd2b1a6ca Mon Sep 17 00:00:00 2001 From: Mohita Singh Date: Wed, 2 Jul 2025 00:23:43 +0000 Subject: [PATCH 1/2] RDKTV-13686: [Test build request]: OTA error condition 1 Reason for change: For testing PR1-242 and PR1-246 Test Procedure: DO NOT MERGE Risks: Low Priority: P2 Signed-off-by: Mohita Singh --- .../blercu/bleservices/gatt/gatt_upgradeservice.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp b/src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp index b49b7620..8543e2f4 100644 --- a/src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp +++ b/src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp @@ -853,6 +853,18 @@ void GattUpgradeService::sendDATA() // set the block id packet.header[0] = OPCODE_DATA | uint8_t((blockId >> 8) & 0x3f); packet.header[1] = uint8_t(blockId & 0xff); + int64_t pos = blockId * FIRMWARE_PACKET_MTU; + if (pos > 100) { +#if 1 + // OTA error condition1 + XLOGD_WARN("Sending invalid op code OPCODE_ERROR for RDKTV-13686 to test error condition in RCU!!!!!!!!!!!!!!!!!!"); + packet.header[0] = OPCODE_ERROR | uint8_t((blockId >> 8) & 0x3f); +#else + // OTA error condition2 + XLOGD_WARN("Sending OPCODE_WRQ while upload already in progress for RDKTV-13686 to test error condition in RCU!!!"); + sendWRQ(); +#endif + } // send / queue the data packet const char* buffer = reinterpret_cast(&packet); From b0221bbf5e98426f945bfbe55be1476e6b12d515 Mon Sep 17 00:00:00 2001 From: Mohita Singh Date: Wed, 2 Jul 2025 00:43:45 +0000 Subject: [PATCH 2/2] RDKTV-13686: [Test build request]: OTA error condition 2 Reason for change: For testing PR1-242 and PR1-246 Test Procedure: DO NOT MERGE Risks: Low Priority: P2 Signed-off-by: Mohita Singh Mohita_Singh2@comcast.com --- src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp b/src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp index 8543e2f4..f313adf6 100644 --- a/src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp +++ b/src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp @@ -855,7 +855,7 @@ void GattUpgradeService::sendDATA() packet.header[1] = uint8_t(blockId & 0xff); int64_t pos = blockId * FIRMWARE_PACKET_MTU; if (pos > 100) { -#if 1 +#if 0 // OTA error condition1 XLOGD_WARN("Sending invalid op code OPCODE_ERROR for RDKTV-13686 to test error condition in RCU!!!!!!!!!!!!!!!!!!"); packet.header[0] = OPCODE_ERROR | uint8_t((blockId >> 8) & 0x3f);