OTA upgrade problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
joMa_1809706
Level 4
Level 4
10 likes received First like received First like given

I'm using SDK 3.7.0. The snip example (snip.ota_fr-BCM94343W_AVN download download_apps run) works when upgrading to the same example code.

When ported to my application program which is 50% larger than the snip example it doesn't work. The web page is hung with NaN in the transfer box and repeated logs to console with empty response. If I use the snip example to upgrade to my app it upgrades, but is then hung in the provisioning state with not being able to set is_configured to true. Possibly because the DCT of snip example is different from my app?

Is there a size limitation for the OTA upgrade code that I have exceeded?

1 Solution

Well ota does work for the snip example. It also works with my application if I don't have a factory restore image. See the first post in this thread. So as sort of asked in the original post. What is the maximum application size that will work for the module to have a restore image and a current image? And as an additional question is there a version of this module available with double the current flash? Cost? Availability? Etc. Broadcom has several versions of their own version that covers this.

View solution in original post

12 Replies
Anonymous
Not applicable

I have same issue. And I checked when OTA from sdk340, there are 105 sectors for frimware. But in sdk370, there are 94 sectors. You may tarce from libraries\demons\ota_server\wiced_ota_server.c  process_update_chunk

wiced_framework_app_set_size

return error because available size is not enough for my application.

    if (offset == 0)

    {

    printf("offset = %d,file_size = %d\n",offset,file_size);

        uint32_t    current_size;

        if (wiced_framework_app_open( DCT_APP0_INDEX, &app ) != WICED_SUCCESS)

        {

            return -1;

        }

        if (wiced_framework_app_get_size( &app, &current_size ) != WICED_SUCCESS)

        {

            return -1;

        }

        if (wiced_framework_app_set_size( &app, file_size) != WICED_SUCCESS)

        {

            return -1;

        }

        if (wiced_framework_app_get_size( &app, &current_size ) != WICED_SUCCESS)

        {

    

            return -1;

        }

        if ( current_size < file_size )

        {

            printf("Error setting application size!!\n");

            return -1;

        }

  //printf("offset = 0!!\n",current_size,file_size);

    }

0 Likes
Anonymous
Not applicable

OTA2 is recommended for all future designs. Please use the latest SDK for OTA2 functionality

Please refer the following thread for more info and installation

>> WICED SDK version 3.7.0-3 has been released....

0 Likes

OTA2 does not support FreeRTOS build. What's your suggestion?

0 Likes

So is the avnet 4343 module on the supported list for ota2? And if the original ota does not support my larger application size how will ota2 work any better?

0 Likes

The OTA should work, otherwise it's a bug.

I don't think OTA2 can complete replace OTA.

OTA works for platforms even with 2MB flash, but the example of OTA2 in the

SDK seems to assume the device at least has 8MB flash.

Well ota does work for the snip example. It also works with my application if I don't have a factory restore image. See the first post in this thread. So as sort of asked in the original post. What is the maximum application size that will work for the module to have a restore image and a current image? And as an additional question is there a version of this module available with double the current flash? Cost? Availability? Etc. Broadcom has several versions of their own version that covers this.

Anonymous
Not applicable

axel.lin

Yes I do accept your argument. I have stated this because in our OTA document we have mentioned in the Note stating to use OTA2.

If possible then one can use OTA2 instead of OTA.

0 Likes

I do think OTA2 is a very nice feature.

However, I have no idea every time I mention it does works with LwIP build. No further response.

see https://community.cypress.com/thread/6235?q=ota2%20freertos

The SDK claims supporting both threadX and FreeRTOS but obviously the support for FreeRTOS build is not good.

Note, the problem is not in FreeRTOS but in the WICED's implementation.

0 Likes

My question is the OTA2 support STM platform now ?

as I know OTA2 only support 4390x platform with 8MB external FLASH !

0 Likes
Anonymous
Not applicable

Hi.

I'm using SDK 3.5.2. and OTA server are same like in 3.7.0_0 .

1. OTA server have bugs (lib). It using request_length, but need use available_data_length (need replace request_length with  available_data_length )

2. SDK 3.5.2 have bugs like in 3.7.0_0   ( possible that some bugs corrected in sdk 3.7.0_3 )

3. Problems with dct - exmp. in factory restore dct will delete in danger way (delete dct1 ) , but not restore from spi flash  (  possible that some bugs corrected in sdk 3.7.0_3   )

exmp  bug in 3.5.2 was corrected in 3.7.0 with ota2, so OTA newer was tested seriously.

wiced_result_t wiced_waf_app_set_boot(uint8_t app_id, char load_once)

{

    boot_detail_t boot;

    boot.entry_point                 = 0;

    boot.load_details.load_once      = load_once;

    boot.load_details.valid          = 1;

    boot.load_details.destination.id = INTERNAL;

    if ( wiced_dct_get_app_header_location( app_id, &boot.load_details.source ) != WICED_SUCCESS )

    {

        return WICED_ERROR;

    }

    /* darius  wiced_dct_write cant write boot_detail

    if ( wiced_dct_write( &boot, DCT_INTERNAL_SECTION, OFFSETOF( platform_dct_header_t, boot_detail ), sizeof(boot_detail_t) ) != WICED_SUCCESS )

    {

        return WICED_ERROR;

    }

    */

    if ( wiced_dct_write_boot_details( &boot ) != WICED_SUCCESS )

    {

        return WICED_ERROR;

    }

    return WICED_SUCCESS;

}

P.S. I think wiced sdk have seriously bugs in FreeRtos semaphore using. I will report later.

Anonymous
Not applicable

Hello,

we faced same issue,

We need help for resolve such kind of issue.

OTA_issue.png

We used below configuration:

Platform: WicedSDK 3.7.0-3

Example: snip.ota_fr

Test:

1> Application: snip.scan

     File : snip.scan stripped.elf

     size: 291KB

     Result: update successfully

2> Application: snip.ota_fr

     File : snip.ota_fr stripped.elf

     size: 451KB

     Result: update successfully

3> Application: my_app

     File : my_app stripped.elf

     size: 548KB

     Result: update issue

We check internal falsh size is 2MB of our module SN8205.

we face issue like you was faced. have any solution so please share with us.

Thanks & Regards

Chintan Patel

0 Likes

Some older browsers don't support the slice command used in the ota process. Try it from a phone or tablet.

0 Likes