SDK 6.2.1 OTA appears to be broken

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

cross mob
Anonymous
Not applicable

OTA seems brooken in SDK 6.2.1

I'm following the "snip.ota_fr" app instructions and it doesn't work. I have verified my setup with SDK 6.1 and there it works.

In SDK 6.2.1, when trying to perform the OTA it only produces this output as for the upgrade web page:

-web page loads:

pastedImage_1.png

-stuck with "NaN%"

pastedImage_2.png

There is no activity on the console either, showing we are not reading any blocks:

- board boots fine and toggle LEDs

- No activity from OTA start

pastedImage_0.png

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hello johan.jeppsson_1683281

In addition to the moving the resources to external, please add the following in platform_config.h which is missing from the 43362 platform

#ifndef WWD_DIRECT_RESOURCES

#define USES_RESOURCE_FILESYSTEM

#endif

Attached is a platform file which worked for me

View solution in original post

22 Replies
lock attach
Attachments are accessible only for community members.
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

I have verified the ota_fr snip in WICED 6.2.1 and it is working as expected. I am able to update the file. You may check the browser snapshot or the attached console log.

pastedImage_0.png

There should be some other reason for NaN. Can you please check the image you are updating? Also kindly let me know the platform you are using.

0 Likes
Anonymous
Not applicable

43362WCD4

I think it's showing in the terminal.

Mvh

Johan Jeppsson

Den fre 7 sep. 2018 08:19riya <community-manager@cypress.com> skrev:

<http://www.cypress.com>

Cypress Developer Community

<https://community.cypress.com/?et=watches.email.thread>

SDK 6.2.1 OTA is Brooken

reply from riya

<https://community.cypress.com/people/riya?et=watches.email.thread> in *WICED

Studio Wi-Fi/Combo Forums* - View the full discussion

<https://community.cypress.com/message/168562?et=watches.email.thread#168562>

0 Likes
Anonymous
Not applicable

OTA UPDATE LOGS:

10-Sep-18 16:52:40.75 [RX] - <CR><LF>

Starting WICED vWiced_006.001.000.0085<CR><LF>

Platform BCM94343WWCD1 initialised<CR><LF>

Started ThreadX v5.8<CR><LF>

Initialising NetX_Duo v5.10_sp3<CR><LF>

Creating Packet pools<CR><LF>

WLAN MAC Address : 00:A0:50:23:A0:95<CR>

<CR><LF>

WLAN Firmware    : wl0: Feb 12 2018 04:08:14 version 7.79.2 (r683798 CY) FWID 01-27b63357<CR>

<CR><LF>

WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-02-12 04:00:50 <CR>

<CR><LF>

Hi, I'm the Production App (ota_fr).<CR>

<CR><LF>

Watch while I toggle some LEDs ...<CR>

<CR><LF>

Time for an upgrade. OTA upgrade starting ...<CR>

<CR><LF>

<CR>

<CR><LF>

SoftAP start, AP name: WICED Device<CR>

<CR><LF>

IPv4 network ready IP: 192.168.10.1<CR><LF>

Setting IPv6 link-local address<CR><LF>

IPv6 network ready IP: FE80:0000:0000:0000:02A0:50FF:FE23:A095<CR><LF>

10-Sep-18 16:54:08.23 [RX] - Writing chunk 1 of size 1024 from offset 0 <CR>

<CR><LF>

Writing chunk 2 of size 1024 from offset 1024 <CR>

<CR><LF>

Writing chunk 3 of size 1024 from offset 2048 <CR>

<CR><LF>

Writing chunk 4 of size 1024 from offset 3072 <CR>

<CR><LF>

Writing chunk 5 of size 1024 from offset 4096 <CR>

<CR><LF>

Writing chunk 6 of size 1024 from offset 5120 <CR>

<CR><LF>

Writing chunk 7 of size 1024 from offset 6144 <CR>

<CR><LF>

Writing chunk 8 of size 1024 from offset 7168 <CR>

<CR><LF>

Writing chunk 9 of size 1024 from offset 8192 <CR>

<CR><LF>

Writing chunk 10 of size 1024 from offset 9216 <CR>

<CR><LF>

Writing chunk 11 of size 1024 from offset 10240 <CR>

<CR><LF>

Writing chunk 12 of size 1024 from offset 11264 <CR>

<CR><LF>

Writing chunk 13 of size 1024 from offset 12288 <CR>

<CR><LF>

Writing chunk 14 of size 1024 from offset 13312 <CR>

<CR><LF>

Writing chunk 15 of size 1024 from offset 14336 <CR>

<CR><LF>

Writing chunk 16 of size 1024 from offset 15360 <CR>

<CR><LF>

Writing chunk 17 of size 1024 from offset 16384 <CR>

<CR><LF>

Writing chunk 18 of size 1024 from offset 17408 <CR>

<CR><LF>

Writing chunk 19 of size 1024 from offset 18432 <CR>

<CR><LF>

Writing chunk 20 of size 1024 from offset 19456 <CR>

<CR><LF>

Writing chunk 21 of size 1024 from offset 20480 <CR>

<CR><LF>

Writing chunk 22 of size 1024 from offset 21504 <CR>

<CR><LF>

Writing chunk 23 of size 1024 from offset 22528 <CR>

<CR><LF>

Writing chunk 24 of size 1024 from offset 23552 <CR>

<CR><LF>

Writing chunk 25 of size 1024 from offset 24576 <CR>

<CR><LF>

Writing chunk 26 of size 1024 from offset 25600 <CR>

<CR><LF>

Writing chunk 27 of size 1024 from offset 26624 <CR>

<CR><LF>

Writing chunk 28 of size 1024 from offset 27648 <CR>

<CR><LF>

Writing chunk 29 of size 1024 from offset 28672 <CR>

<CR><LF>

Writing chunk 30 of size 1024 from offset 29696 <CR>

<CR><LF>

Writing chunk 31 of size 1024 from offset 30720 <CR>

<CR><LF>

Writing chunk 32 of size 1024 from offset 31744 <CR>

<CR><LF>

Writing chunk 33 of size 1024 from offset 32768 <CR>

<CR><LF>

Writing chunk 34 of size 1024 from offset 33792 <CR>

<CR><LF>

Writing chunk 35 of size 1024 from offset 34816 <CR>

<CR><LF>

Writing chunk 36 of size 1024 from offset 35840 <CR>

<CR><LF>

Writing chunk 37 of size 1024 from offset 36864 <CR>

<CR><LF>

Writing chunk 38 of size 1024 from offset 37888 <CR>

<CR><LF>

Writing chunk 39 of size 1024 from offset 38912 <CR>

<CR><LF>

Writing chunk 40 of size 1024 from offset 39936 <CR>

<CR><LF>

Writing chunk 41 of size 1024 from offset 40960 <CR>

<CR><LF>

Writing chunk 42 of size 1024 from offset 41984 <CR>

<CR><LF>

Writing chunk 43 of size 1024 from offset 43008 <CR>

<CR><LF>

Writing chunk 44 of size 1024 from offset 44032 <CR>

<CR><LF>

Writing chunk 45 of size 1024 from offset 45056 <CR>

<CR><LF>

Writing chunk 46 of size 1024 from offset 46080 <CR>

<CR><LF>

Writing chunk 47 of size 1024 from offset 47104 <CR>

<CR><LF>

Writing chunk 48 of size 1024 from offset 48128 <CR>

<CR><LF>

Writing chunk 49 of size 1024 from offset 49152 <CR>

<CR><LF>

Writing chunk 50 of size 1024 from offset 50176 <CR>

<CR><LF>

Writing chunk 51 of size 1024 from offset 51200 <CR>

<CR><LF>

Writing chunk 52 of size 1024 from offset 52224 <CR>

<CR><LF>

Writing chunk 53 of size 1024 from offset 53248 <CR>

<CR><LF>

Writing chunk 54 of size 1024 from offset 54272 <CR>

<CR><LF>

Writing chunk 55 of size 1024 from offset 55296 <CR>

<CR><LF>

Writing chunk 56 of size 1024 from offset 56320 <CR>

<CR><LF>

Writing chunk 57 of size 1024 from offset 57344 <CR>

<CR><LF>

Writing chunk 58 of size 1024 from offset 58368 <CR>

<CR><LF>

Writing chunk 59 of size 1024 from offset 59392 <CR>

<CR><LF>

Writing chunk 60 of size 1024 from offset 60416 <CR>

<CR><LF>

Writing chunk 61 of size 1024 from offset 61440 <CR>

<CR><LF>

Writing chunk 62 of size 1024 from offset 62464 <CR>

<CR><LF>

Writing chunk 63 of size 1024 from offset 63488 <CR>

<CR><LF>

Writing chunk 64 of size 1024 from offset 64512 <CR>

<CR><LF>

Writing chunk 65 of size 1024 from offset 65536 <CR>

<CR><LF>

Writing chunk 66 of size 1024 from offset 66560 <CR>

<CR><LF>

Writing chunk 67 of size 1024 from offset 67584 <CR>

<CR><LF>

Writing chunk 68 of size 1024 from offset 68608 <CR>

<CR><LF>

Writing chunk 69 of size 1024 from offset 69632 <CR>

<CR><LF>

Writing chunk 70 of size 1024 from offset 70656 <CR>

<CR><LF>

Writing chunk 71 of size 1024 from offset 71680 <CR>

<CR><LF>

Writing chunk 72 of size 1024 from offset 72704 <CR>

<CR><LF>

Writing chunk 73 of size 1024 from offset 73728 <CR>

<CR><LF>

Writing chunk 74 of size 1024 from offset 74752 <CR>

<CR><LF>

Writing chunk 75 of size 1024 from offset 75776 <CR>

<CR><LF>

Writing chunk 76 of size 1024 from offset 76800 <CR>

<CR><LF>

Writing chunk 77 of size 1024 from offset 77824 <CR>

<CR><LF>

Writing chunk 78 of size 1024 from offset 78848 <CR>

<CR><LF>

Writing chunk 79 of size 1024 from offset 79872 <CR>

<CR><LF>

Writing chunk 80 of size 1024 from offset 80896 <CR>

<CR><LF>

Writing chunk 81 of size 1024 from offset 81920 <CR>

<CR><LF>

Writing chunk 82 of size 1024 from offset 82944 <CR>

<CR><LF>

Writing chunk 83 of size 1024 from offset 83968 <CR>

<CR><LF>

Writing chunk 84 of size 1024 from offset 84992 <CR>

<CR><LF>

Writing chunk 85 of size 1024 from offset 86016 <CR>

<CR><LF>

Writing chunk 86 of size 1024 from offset 87040 <CR>

<CR><LF>

Writing chunk 87 of size 1024 from offset 88064 <CR>

<CR><LF>

Writing chunk 88 of size 1024 from offset 89088 <CR>

<CR><LF>

Writing chunk 89 of size 1024 from offset 90112 <CR>

<CR><LF>

Writing chunk 90 of size 1024 from offset 91136 <CR>

<CR><LF>

Writing chunk 91 of size 1024 from offset 92160 <CR>

<CR><LF>

Writing chunk 92 of size 1024 from offset 93184 <CR>

<CR><LF>

Writing chunk 93 of size 1024 from offset 94208 <CR>

<CR><LF>

Writing chunk 94 of size 1024 from offset 95232 <CR>

<CR><LF>

Writing chunk 95 of size 1024 from offset 96256 <CR>

<CR><LF>

Writing chunk 96 of size 1024 from offset 97280 <CR>

<CR><LF>

Writing chunk 97 of size 1024 from offset 98304 <CR>

<CR><LF>

Writing chunk 98 of size 1024 from offset 99328 <CR>

<CR><LF>

Writing chunk 99 of size 1024 from offset 100352 <CR>

<CR><LF>

Writing chunk 100 of size 1024 from offset 101376 <CR>

<CR><LF>

Writing chunk 101 of size 1024 from offset 102400 <CR>

<CR><LF>

Writing chunk 102 of size 1024 from offset 103424 <CR>

<CR><LF>

Writing chunk 103 of size 1024 from offset 104448 <CR>

<CR><LF>

Writing chunk 104 of size 1024 from offset 105472 <CR>

<CR><LF>

Writing chunk 105 of size 1024 from offset 106496 <CR>

<CR><LF>

Writing chunk 106 of size 1024 from offset 107520 <CR>

<CR><LF>

Writing chunk 107 of size 1024 from offset 108544 <CR>

<CR><LF>

Writing chunk 108 of size 1024 from offset 109568 <CR>

<CR><LF>

Writing chunk 109 of size 1024 from offset 110592 <CR>

<CR><LF>

Writing chunk 110 of size 1024 from offset 111616 <CR>

<CR><LF>

Writing chunk 111 of size 1024 from offset 112640 <CR>

<CR><LF>

Writing chunk 112 of size 1024 from offset 113664 <CR>

<CR><LF>

Writing chunk 113 of size 1024 from offset 114688 <CR>

<CR><LF>

Writing chunk 114 of size 1024 from offset 115712 <CR>

<CR><LF>

0 Likes
Anonymous
Not applicable

I was not able to exactly figure out why this happened. But after some try i was able to complete the OTA successfully

0 Likes

For SDK 6.2.x, BCM943362WCD4 platform. OTA_FR issue

The problem is cause by misconfigure in platform make, cause the ota_fr and scan application images both include WiFi F/W.

And external flash will download  APPS header, OTA_FR application , DCT and resource file system (include WiFi F/W too) . Then remain external storage size is not enough to download scan application.

In BCM943362WCD4.mk

--------- BCM943362WCD4.mk start ---------

.....

PLATFORM_SUPPORTS_BUTTONS := 1

# INTERNAL_MEMORY_RESOURCES = $(ALL_RESOURCES)

ifndef BUS

BUS := SDIO

endif

...

RESOURCES_LOCATION ?= RESOURCES_IN_WICEDFS

ifeq ($(RESOURCES_LOCATION), RESOURCES_IN_DIRECT_RESOURCES)

INTERNAL_MEMORY_RESOURCES = $(ALL_RESOURCES)

GLOBAL_DEFINES += WWD_DIRECT_RESOURCES

endif

ifeq ($(RESOURCES_LOCATION), RESOURCES_IN_WICEDFS)

GLOBAL_DEFINES += USES_RESOURCES_FILESYSTEM

endif

---------------------End ---------------------

Anonymous
Not applicable

There are still problems with starting the WiFi FW. There is no CLM Blob in the 43362 FW directory?

Just to be clear, after applying above fix for moving resources to FS. My baord is not able to start WiFi FW and thus no connectivity.

Can you make sure you test this completely?

0 Likes

johan.jeppsson_1683281 wrote:

There is no CLM Blob in the 43362 FW directory?

This part is fine. 43362 doesn't has separate CLM blob file.

Anonymous
Not applicable

with platform makefile changes the FW is not operational.

See snip scan output:

Starting WICED vWiced_006.002.001.0002

Platform BCM943362WCD4 initialised

Started ThreadX v5.8

Initialising NetX_Duo v5.10_sp3

Creating Packet pools

Waiting for scan results...

  # Type  BSSID              RSSI Rate Chan Security               SSID                            CCodFlag

-------------------------------------------------------------------------------------------------------------

BCM943362WCD4.mk

NAME := Platform_BCM943362WCD4

WLAN_CHIP            := 43362

WLAN_CHIP_REVISION   := A2

WLAN_CHIP_FAMILY     := 43362

HOST_MCU_FAMILY      := STM32F2xx

HOST_MCU_VARIANT     := STM32F2x5

HOST_MCU_PART_NUMBER := STM32F215RGT6

PLATFORM_SUPPORTS_BUTTONS := 1

#INTERNAL_MEMORY_RESOURCES = $(ALL_RESOURCES)

ifndef BUS

BUS := SDIO

endif

EXTRA_TARGET_MAKEFILES +=  $(MAKEFILES_PATH)/standard_platform_targets.mk

VALID_BUSES := SDIO SPI

# For apps without wifi firmware, NO_WIFI_FIRMWARE := YES and

# resources will be in DIRECT_RESOURCE for SDIO bus

ifneq ($(NO_WIFI_FIRMWARE),)

ifeq ($(BUS),SDIO)

RESOURCES_LOCATION := RESOURCES_IN_DIRECT_RESOURCES

endif

endif

# WIFI_FIRMWARE and WIFI_FIRMWARE_CLM_BLOB are now included into resources

# RESOURCES_LOCATION default to RESOURCES_IN_WICEDFS. But can be optionally config to RESOURCES_IN_DIRECT_RESOURCES

# WARNING: Config RESOURCES_LOCATION to RESOURCES_IN_DIRECT_RESOURCES will build firmware and blob to into main application

# and may cause internal flash to overflow

RESOURCES_LOCATION ?= RESOURCES_IN_WICEDFS

ifeq ($(RESOURCES_LOCATION), RESOURCES_IN_DIRECT_RESOURCES)

INTERNAL_MEMORY_RESOURCES = $(ALL_RESOURCES)

GLOBAL_DEFINES += WWD_DIRECT_RESOURCES

endif

ifeq ($(RESOURCES_LOCATION), RESOURCES_IN_WICEDFS)

GLOBAL_DEFINES += USES_RESOURCES_FILESYSTEM

endif

# Global includes

GLOBAL_INCLUDES  := .

GLOBAL_INCLUDES  += $(SOURCE_ROOT)libraries/inputs/gpio_button

# Global defines

# HSE_VALUE = STM32 crystal frequency = 26MHz (needed to make UART work correctly)

GLOBAL_DEFINES += HSE_VALUE=26000000

GLOBAL_DEFINES += $$(if $$(NO_CRLF_STDIO_REPLACEMENT),,CRLF_STDIO_REPLACEMENT)

# Components

$(NAME)_COMPONENTS += drivers/spi_flash \

                      inputs/gpio_button

# Source files

$(NAME)_SOURCES := platform.c

# WICED APPS

# APP0 and FILESYSTEM_IMAGE are reserved main app and resources file system

# FR_APP := resources/sflash/snip_ota_fr-BCM943362WCD6.stripped.elf

# DCT_IMAGE :=

# OTA_APP :=

# FILESYSTEM_IMAGE :=

# WIFI_FIRMWARE :=

# APP0 :=

# APP1 :=

# APP2 :=

# WICED APPS LOOKUP TABLE

APPS_LUT_HEADER_LOC := 0x0000

APPS_START_SECTOR := 1

ifneq ($(APP),bootloader)

ifneq ($(MAIN_COMPONENT_PROCESSING),1)

$(info +-----------------------------------------------------------------------------------------------------+ )

$(info | IMPORTANT NOTES                                                                                     | )

$(info +-----------------------------------------------------------------------------------------------------+ )

$(info | Wi-Fi MAC Address                                                                                   | )

$(info |    The target Wi-Fi MAC address is defined in <WICED-SDK>/generated_mac_address.txt                 | )

$(info |    Ensure each target device has a unique address.                                                  | )

$(info +-----------------------------------------------------------------------------------------------------+ )

$(info | MCU & Wi-Fi Power Save                                                                              | )

$(info |    It is *critical* that applications using WICED Powersave API functions connect an accurate 32kHz | )

$(info |    reference clock to the sleep clock input pin of the WLAN chip. Please read the WICED Powersave   | )

$(info |    Application Note located in the documentation directory if you plan to use powersave features.   | )

$(info +-----------------------------------------------------------------------------------------------------+ )

endif

endif

0 Likes

johan.jeppsson_1683281 wrote:

with platform makefile changes the FW is not operational.

See snip scan output:

Starting WICED vWiced_006.002.001.0002

Platform BCM943362WCD4 initialised

Started ThreadX v5.8

Initialising NetX_Duo v5.10_sp3

Creating Packet pools

Waiting for scan results...

The WLAN firmware is not loaded.

0 Likes
Anonymous
Not applicable

That is clear. So how to fix this and also retain OTA functionality?

0 Likes
lock attach
Attachments are accessible only for community members.

Hello johan.jeppsson_1683281

In addition to the moving the resources to external, please add the following in platform_config.h which is missing from the 43362 platform

#ifndef WWD_DIRECT_RESOURCES

#define USES_RESOURCE_FILESYSTEM

#endif

Attached is a platform file which worked for me

Anonymous
Not applicable

I am using BCM94343WWCD1 board to try the default application in WICED SDK version Wiced_006.001.000.0085.

You mean to say OTA will not work in this version of SDK. I will have to change to WICED SDK 6.2.1 to evaluate OTA

0 Likes
Anonymous
Not applicable

OTA upgarde starts but fails to complete. It stops at some point randomly.

Find the attached screenshot and update logs for the same.

Screenshot_20100111-060434.png

0 Likes

I think you run out your external SPI flash space!

0 Likes
Anonymous
Not applicable

It's still broken on 43362WCD4. You didn't test this?

I have tested with 4343WWCD2 and there it works. I suggest you re-test.

I checked the code diff between SDK6.2.1 and SDK5 for the OTA server and it's not an issue with the minimal changes that I saw. I actually rolled back the code and no change in behavior for this issue.

It points to be a platform issue.

0 Likes
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Sir, It appears to be a memory issue. Please ake sure you have enough space to store the image

Anonymous
Not applicable

I didn't compare image sizes or memory configurations between SDK 5 and SDK

6. Are you saying there are major changes in this area or need to be

re-configured? Appreciate any instructions if I need to change something.

It ran out of the box on SDK5

Den tis 25 sep. 2018 15:18mifo <community-manager@cypress.com> skrev:

<http://www.cypress.com>

Cypress Developer Community

<https://community.cypress.com/?et=watches.email.outcome>

SDK 6.2.1 OTA is Brooken

mifo <https://community.cypress.com/people/mifo?et=watches.email.outcome>

marked riya

<https://community.cypress.com/people/riya?et=watches.email.outcome>'s

reply on SDK 6.2.1 OTA is Brooken

<https://community.cypress.com/thread/36588?et=watches.email.outcome> as

helpful. View the full reply

<https://community.cypress.com/message/170143?et=watches.email.outcome#170143>

0 Likes

riya wrote:

Sir, It appears to be a memory issue. Please ake sure you have enough space to store the image

What information make you think it's memory issue or running out of storage space?

The original question is to OTA snip.scan which is a very small snip code.

Do you notice the original question mentioned it works with sdk-6.1 but does not work with sdk-6.2.1?

0 Likes
Anonymous
Not applicable

Could be enough memory space not available.

At this point i also have one more question. How does the module get flashed. ?

If the chip was previously programmed and if i try to reflash the chip, will the previously stored contents are initially erased completetly and then gets programmed. Is this mechanism happeneing in WICED SDK.

0 Likes
Anonymous
Not applicable

Just a question. Do you intend to fix this?

0 Likes

Adding the Cypress IoT applications team anpm grsr gyan riya rroy shjl wwfe

0 Likes
PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

Yes Sir. We are trying to fix the issue. I will update the thread when the fix is available