diff --git a/components/bluetooth/ble_profiles/esp/ble_ota/CHANGELOG.md b/components/bluetooth/ble_profiles/esp/ble_ota/CHANGELOG.md index 4b763f4f9..e8c64682f 100644 --- a/components/bluetooth/ble_profiles/esp/ble_ota/CHANGELOG.md +++ b/components/bluetooth/ble_profiles/esp/ble_ota/CHANGELOG.md @@ -57,4 +57,9 @@ ## v0.1.10 - 2023-11-23 -* Fix possible cmake_utilities dependency issue \ No newline at end of file +* Fix possible cmake_utilities dependency issue + +## v0.1.11 - 2024-01-02 + +* BLE-OTA: + * Fixed ble ota packet index issue. \ No newline at end of file diff --git a/components/bluetooth/ble_profiles/esp/ble_ota/idf_component.yml b/components/bluetooth/ble_profiles/esp/ble_ota/idf_component.yml index 556added8..5a5d28fb7 100644 --- a/components/bluetooth/ble_profiles/esp/ble_ota/idf_component.yml +++ b/components/bluetooth/ble_profiles/esp/ble_ota/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.1.10" +version: "0.1.11" targets: - esp32 - esp32c3 diff --git a/components/bluetooth/ble_profiles/esp/ble_ota/src/ble_ota.c b/components/bluetooth/ble_profiles/esp/ble_ota/src/ble_ota.c index 74c864ce9..ddb3efaec 100644 --- a/components/bluetooth/ble_profiles/esp/ble_ota/src/ble_ota.c +++ b/components/bluetooth/ble_profiles/esp/ble_ota/src/ble_ota.c @@ -630,7 +630,7 @@ void esp_ble_ota_send_ack_data(ble_ota_ack_type_t ack_type, uint16_t ack_status, switch (ack_type) { case BLE_OTA_CMD_ACK: cmd_ack[0] = (BLE_OTA_ACK_CMD & 0xff); - cmd_ack[1] = (BLE_OTA_ACK_CMD & 0xff) >> 8; + cmd_ack[1] = (BLE_OTA_ACK_CMD & 0xff00) >> 8; cmd_ack[2] = (ack_param & 0xff); cmd_ack[3] = (ack_param & 0xff00) >> 8; @@ -646,13 +646,13 @@ void esp_ble_ota_send_ack_data(ble_ota_ack_type_t ack_type, uint16_t ack_status, break; case BLE_OTA_FW_ACK: cmd_ack[0] = (ack_param & 0xff); - cmd_ack[1] = (ack_param & 0xff) >> 8; + cmd_ack[1] = (ack_param & 0xff00) >> 8; cmd_ack[2] = (ack_status & 0xff); cmd_ack[3] = (ack_status & 0xff00) >> 8; cmd_ack[4] = (cur_sector & 0xff); - cmd_ack[5] = (cur_sector & 0xff) >> 8; + cmd_ack[5] = (cur_sector & 0xff00) >> 8; crc16 = crc16_ccitt(cmd_ack, 18); cmd_ack[18] = crc16 & 0xff; diff --git a/examples/bluetooth/ble_ota/main/idf_component.yml b/examples/bluetooth/ble_ota/main/idf_component.yml index e059dbfb9..a18d97afc 100644 --- a/examples/bluetooth/ble_ota/main/idf_component.yml +++ b/examples/bluetooth/ble_ota/main/idf_component.yml @@ -2,5 +2,5 @@ dependencies: espressif/esp_encrypted_img: "^2.0.1" idf: ">=4.4" ble_ota: - version: "~0.1.8" + version: "~0.1.11" override_path: "../../../../components/bluetooth/ble_profiles/esp/ble_ota"