This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC26X2R1: OTA server shows zOTA Abord.

Part Number: LAUNCHXL-CC26X2R1

Hello,

Please find the attached images and sniffer log for the reference. I have tried the simple example of the zr switch ota client. and the server shows the following error. Please guide me for this.

I am using sdk 4_40_04_04 with cc2652R1 launchpad for zr Ota client example.

  • Hello,

    I just ran a sanity check on the v5.10 SDK and found no issues, please refer to the Z-Stack OTA Upgrade section of the Z-Stack User's Guide  and make sure you are using all of the correct images.  This includes the BIM off-chip .hex and ZR OTA client .bin flashed on one device, with ZC OTA server flashed on the other and the correct ZR OTA client .zigbee used in OtaServer to transfer the image.  Based on your sniffer log, there seems to be unexpected information in the OAD image header which aborts the download process.

    Regards,
    Ryan

  • Hello,

    I have tried as per your suggestions but still result is same and i am currently use the ti basic example of zr sw ota client which is in simplelink examples. please guide me. also i have question that is there any issue in launchpad?  because the examples only works 1st time after that its not working. i am facing the above problem again and again.

  • According to your

    zigbee zota failed.cubx

    , your zr sw ota device sends Upgrade End Request before it download all necessary OTA image block. I would suggest you to set a breakpoint in zclOTA_SendUpgradeEndReq of your zr sw ota project and debug with CCS to know why your device send Upgrade End Request before it download all necessary OTA image block.

  • I agree with YK that further code debug is necessary.  There are no expected issues with the LaunchPad or SimpleLink v4.40 SDK.  Can you please further describe how the example only works the first time?  This behavior is typically caused by not loading the off-chip BIM hex image alongside the application. https://e2e.ti.com/f/1/t/995044 

    Regards,
    Ryan

  • yes i am debugging that currently. but i also tried the zed sw ota client example it also give me the same result. is their any issue in bootloader to read default image. i also tried with flashing of project zero of ble but its also not work. i am beginner in this please guide me.

  • Ota process abort after the 0.11%.

  • I don’t think this is related to BIM. Do you try to set a breakpoint in zclOTA_SendUpgradeEndReq of your zr sw ota project and debug with CCS to know why your device send Upgrade End Request before it download all necessary OTA image block?

  • Hello,

    I have debug as you suggested. 

    if(writeFlashPg(EXT_FLASH_PAGE(binaryAddrOffset), binaryAddrOffset & (~EXTFLASH_PAGE_MASK), &pData[i], len - i ) != FLASH_SUCCESS)
    {
    flash_close();
    //Something went wrong...
    return ZCL_STATUS_ABORT;
    }

    the ota image abort happens here. This is in zcl_ota.c file.

    Please guide me what is the problem exactly?.

  • My apologies for an error which removed some of the thread replies...

    It appears that the external flash memory of your LAUNCHXL-CC26X2R1 device is blank or has a corrupted image.  Please restore it to the factory default by following the "OAD with BLE" instructions from the rfWsnNodeExtFlashOadClient README.  This is also discussed in the Z-Stack OTA Upgrade sections of the Z-Stack User's Guide.

    Regards,
    Ryan

  • I have tested that its works fine now . but in my application i want to store the calibration data of the device into external flash. currently i am trying to save that on 0x0 address of nvs. but nvs give the error of -1 and above problem occurs again. i am using the sw ota application. please guide where i can store data into my external flash.

  • I suggest you to refer to ota_client_app.c to get better idea about how to use external flash related driver/APIs in flash_interface_ext_rtos_NVS.c.

  • i have gone through the ota client.c but i doesnt understand. i want to store only one variable to flash. please see the following code. i am doing this but it not work please guide me.

    #define TEMP_BUF_SIZE 64

    int_fast16_t status;

    NVS_Handle nvsHandle;
    NVS_Attrs regionAttrs;
    NVS_Params nvsParams;
    uint8_t a=10;


    uint8_t * buf = (uint8_t *) malloc(TEMP_BUF_SIZE);
    NVS_init();
    NVS_Params_init(&nvsParams);
    nvsHandle = NVS_open(CONFIG_NVSEXTERNAL, &nvsParams);
    if (nvsHandle == NULL) {
    // Display_printf(displayHandle, 0, 0, "NVS_open() failed.");
    uint8_t b=1;
    // return (NULL);
    }
    memcpy(buf,(uint8_t *)&a,sizeof(buf));
    status = NVS_write(nvsHandle, 0x0, buf, sizeof(buf), NVS_WRITE_ERASE | NVS_WRITE_POST_VERIFY);
    NVS_close(nvsHandle);

  • Writing at external flash page 0x00 is going to directly conflict with the OAD External Flash Image Header.  You need to select or initialize a sector of NVS external which does not overlap with the existing OAD application.  You can review zclOTA_ProcessImageData -> if(zclOTA_ElementTag == OTA_UPGRADE_IMAGE_TAG_ID) -> case OAD_GET_IMAGE_HDR_STATE (from zcl_ota.c) for more application usage details, but I do not recommend creating another NVS TI Driver instance.

    Regards,
    Ryan