ota_secure_firmware_upgrade

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

用ota进行下载更新时,出现如附图错误,请帮忙看看什么原因。

串口中出现的错误如下:

hello_sensor_write_handler: handle ff02

Command:2 State:1

Active DS is not DS1 and not DS2. Cannot upgrade.

0 Likes
1 Solution
Anonymous
Not applicable

Hello Lei,

1.  Are you setting Platform = NV is SFLASH when you are building?

2.  The changes that you made below should NEVER be done:

#define WS_UPGRADE_NV_IS_EEPROM()  0// ((Config_and_Firmware_Status & CFA_CONFIG_LOCATION_MASK) == CFA_CONFIG_LOCATION_EEPROM)

UINT32 ws_upgrade_active_nv_type        = WS_UPGRADE_NV_TYPE_SF;// WS_UPGRADE_NV_TYPE_EEPROM;   // Assume EEPROM

3.  The firmware take care of either the Serial FLASH or the EEPROM -You don't need to care about the underlying NV_TYPE is.

4.  What you need to care about are the offsets.

5.  If you change anything in either the code or the btp file - place DS1 and DS2 in different locations and then and then you update the code.

6.  From your PNG file, it appears that you have modified the btp file and that is why you are seeing the DS1 and DS2 statement.

Thanks

JT

View solution in original post

0 Likes
14 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

I translated this as follows:

When using ota download updates appear as illustrated error, please help us to see what the reasons are .

Serial error appears as follows :

hello_sensor_write_handler: handle ff02

Command: 2 State: 1 

Active DS is not DS1 and not DS2. Can not upgrade.

Have you consulted the WICED Secure Over-the-Air Firmware Upgrade Application Note (SDK 2.x and TAG3 Board) AppNote?

0 Likes
Anonymous
Not applicable

Yes, I have read that pdf, do the steps as the document told. see my attached picture, it is ready to download, but failed in the transfer.

0 Likes
Anonymous
Not applicable

Chenlei, please provide more details.

1) How did you generate the OTA image?

2) What app did you download to 20736 board before OTA?

3) What's the type of your 20736 board?

4) Paste here the full log from UARt.

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

! !Please see my reply.

1)use  \Apps\ota_secure_firmware_upgrade\peerapps\Windows\WsSecOtaUpgrade\Release\x86\WsSecOtaUpgrade.exe

2)the APP is ota_secure_firmware_upgrade demo.

3)it is customer board BCM20736

4)see ota.txt file

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

!!attached is the signed file I used.

0 Likes
Anonymous
Not applicable

As showd in ota.png, you are using WsOtaUpgrade.exe to upgrade a signed(secured) OTA image.

Use WsSecOtaUpgrade.exe for a try if you have one in your SDK.

WsOtaUpgrade.exe and WsSecOtaUpgrade.exe are different:

1. WsSecOtaUpgrade.exe in directory

WICED-Smart-SDK\Apps\ota_secure_firmware_upgrade\peerapps\Windows\WsOtaUpgrade\Release\x86

is to upgarde secured OTA image.


2. WsOtaUpgrade.exe in directory

WICED-Smart-SDK\Apps\ota_firmware_upgrade\peerapps\Windows\WsSecOtaUpgrade\Release\x86

is to upgarde normal OTA image.


1) If above doesn't work, do the same test on Broadcom 20736 Tag board and see if it works.

2) If still fails, re-install your SDK. You may changed some configurations which should not be modified.


0 Likes
Anonymous
Not applicable

I have tried both demo, ota_firmware_upgrade and ota_secure_firmware_upgrade. both of them are failed,. the ota.png is what I test in the ota_firmware_upgrade demo. the sign file is what I test in the ota_secure_firmware_upgrade demo. do you know the what is error prompt in UART from the log I attached.

I will try the Broadcom 20736 Tag board soon.

0 Likes
Anonymous
Not applicable

I have test the Broadcom Tag board, both ota_firmware_upgrade and ota_secure_firmware_upgrade App works. the difference is the chip is BCM20737, not BCM20736. our board is BCM20736. will it affect?

I saw the ota_firmware_upgrade image is built for BCM920736TAG_Q32, why can not use in our board BCM20736?

0 Likes
Anonymous
Not applicable

It should have nothing to do with 20736 or 20737.

First you need to check the size of EEPROM or serial Flash on the board.

If your board is bought from 3rd party vendor, contact them to know the size/model of EEPROM or serial flash the board is using.

If the board is manufactured by your own, contact your hardware engineer for such info.

Let your hardware engineer double check if the storage device(EEPROM or serial flash) works well.

0 Likes
Anonymous
Not applicable

ok, a good suggestion. I will check that first, our board may be different with the demo board.

0 Likes
Anonymous
Not applicable

Hi maxsong

The board we use is serial flash, it is 4M-bit byts, type is MX25L2006E. the default in the Demo ota_firmware_upgrade is EEPROM. I tried to modify some settings in the demo, but it stil can not download, same error in the transfer. Any suggestions? how to know the serial flash works or not, thanks.

The changed I made is here:

#define WS_UPGRADE_NV_IS_EEPROM()  0// ((Config_and_Firmware_Status & CFA_CONFIG_LOCATION_MASK) == CFA_CONFIG_LOCATION_EEPROM)

UINT32 ws_upgrade_active_nv_type        = WS_UPGRADE_NV_TYPE_SF;// WS_UPGRADE_NV_TYPE_EEPROM;   // Assume EEPROM

0 Likes
Anonymous
Not applicable

Hi,

Any update? if I want to use ota_firmware_upgrade Demo App with serial flash, how to know the SPI interface in code is SP1, because the defaul in code is I2C(using EEPROM). how to change the demo code to support serial flash.

0 Likes
Anonymous
Not applicable

Hello Lei,

1.  Are you setting Platform = NV is SFLASH when you are building?

2.  The changes that you made below should NEVER be done:

#define WS_UPGRADE_NV_IS_EEPROM()  0// ((Config_and_Firmware_Status & CFA_CONFIG_LOCATION_MASK) == CFA_CONFIG_LOCATION_EEPROM)

UINT32 ws_upgrade_active_nv_type        = WS_UPGRADE_NV_TYPE_SF;// WS_UPGRADE_NV_TYPE_EEPROM;   // Assume EEPROM

3.  The firmware take care of either the Serial FLASH or the EEPROM -You don't need to care about the underlying NV_TYPE is.

4.  What you need to care about are the offsets.

5.  If you change anything in either the code or the btp file - place DS1 and DS2 in different locations and then and then you update the code.

6.  From your PNG file, it appears that you have modified the btp file and that is why you are seeing the DS1 and DS2 statement.

Thanks

JT

0 Likes
Anonymous
Not applicable

Hi JT,

Thanks for you response. we do not set the right building with PLATFORM_NV. now it is working.

Thanks,

Lei

0 Likes