wiced_framework_open crash

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

cross mob
Geva_2134536
Level 3
Level 3
First like received First like given

Hello,

I currently have a working OTA with the webinterface.

However I am now trying to do it over HTTP from the running app APP0.

I can download my file through HTTP already without any problems.

But now I try to copy the functions from the ota server to write the downloaded data to APP1 from APP0 which is running.

However once I execute the first command:

wiced_framework_app_open(DCT_APP1_INDEX,&app)

It  hangs and after a while the controller reboots.

I don' t get any result from the function it just simply hangs there.

Tried that with the following snippet:

if(wiced_framework_app_open(DCT_APP1_INDEX,&app) == WICED_SUCCESS)

   {

        WPRINT_LIB_INFO( ("open"));

    }

    else

    {

        WPRINT_LIB_INFO( ("close"));

        return WICED_ERROR;

    }

Does anyone have an idea what could be causing this?

Cheers,

Gerard

0 Likes
4 Replies
Geva_2134536
Level 3
Level 3
First like received First like given

Does anyone have a clue? Because I am totally stuck on this.

Cheers,

Gerard

0 Likes
Anonymous
Not applicable

Hi,

What is your platform? Also, try writing to APP0 as a start and see if this would work.

PS: make sure to add the download_apps target to your make command

Regards,

Bassem

0 Likes

Hi Bassem,

Thanks for your suggestion.

My platform is SN8205 from murata.

I already have the OTA implemented the normal way with the upload page and the bootloader for that already has the download apps included in it and partitions the flash.

However I am now running in APP0, which is loaded using default wiced ota. From there I try to download the file using http and write to APP1 but the open already gives the crash.

If I try to write to app0 I would overwrite myself, this I don't want because if anything go wrong I still have APP0 as fallback.

Cheers,

Gerard

0 Likes
Anonymous
Not applicable

Hi,

The OTA is platform dependent, some platform configurations are required to have OTA working for your platform. Usually your platform provider should help you with this. However here are few configs you need to make sure you have:

- In the platfrom config file (probably in platforms/sn8205/sn8205.mk) you need to make sure the locations of the lookup table  and appliacations in serial flash is defined, for example:

# WICED APPS LOOKUP TABLE

APPS_LUT_HEADER_LOC := 0x0000

APPS_START_SECTOR := 1

- you platform_config.h need to define PLATFORM_HAS_OTA

/*  OTA */

#define PLATFORM_HAS_OTA

- your platform.h need to indicate that is has an external spi flash and the CS (chip select) pin:

/* SPI flash is present */

#define WICED_PLATFORM_INCLUDES_SPI_FLASH

#define WICED_SPI_FLASH_CS ( WICED_GPIO_5 )

try to have a look at other platforms to get a  view of the configurations.

PS: it would also help if you can put any logs mainly the build /download logs to see what is going on.

Regards,

Bassem

0 Likes