Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/ble/hal/blercu/bleservices/gatt/gatt_upgradeservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const char*>(&packet);
Expand Down