Re: Problems with OTA2: flashing device and firmware_reset (con't)

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

cross mob
JoSt_3481606
Level 4
Level 4
First like received

Per this closed thread Problems with OTA2: flashing device and firmware_reset

I have followed the same tutorial and got to the same point with the exception of being able to load new firmware via the web upload.

I am able to load the boot loader and default firmware and can restore from the factory download area holding sw1 for 10sec on boot.

I can get it into firmware upload mode sw1 for 5 seconds and load the webpage.  I then start a transfer and the progress bar goes past 100 and the device never reboots and updates.

I have tried manually rebooting with no success.  It just goes back to whatever firmware was currently active.

I am generating the firmware using ota2_image for the one I am using to update from the webpage.

0 Likes
1 Solution

Hello:

this directory, this  file:

build/snip.apsta-CYW954907AEVAL1F/OTA2_image_file.bin

not the binary directory .

View solution in original post

15 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

snip.ota2_extract-CYW954907AEVAL1F

snip.ota2_example-CYW954907AEVAL1F ota2_factory_download

snip.ota2_example-CYW954907AEVAL1F ota2_image download_apps download run

snip.apsta-CYW954907AEVAL1F ota2_image

// This is the image which will be updated.

//  after reset key pressed,  press button 1 for 5 seconds

do the update process by using web server provided in ota_extract .

and I did the same process twice, It was finished successfully .

I stilll cant get get this to work.  I am on 6.2.1.  I wasn't able to get the snip.apsta to build unless I add these lines to the make file

#OTA SoftAp application

OTA_APPLICATION := snip.ota2_extract-$(PLATFORM)

OTA_APP    := build/$(OTA_APPLICATION)/binary/$(OTA_APPLICATION).stripped.elf

This is the error on the initial build

Creating Filesystem BCM94390x_targets.mk ...

./tools/common/Win32/mk_wicedfs32 build/snip.apsta-CYW943907AEVAL1F/filesystem.bin build/snip.apsta-CYW943907AEVAL1F/resources/Staging/

Creating Filesystem Done

Illegal division by zero at ./tools/text_to_c/sector_count.pl line 49.

Building apps lookup table

tools/makefiles/wiced_apps.mk:454: *** OTA2 Factory Reset Image Info File Not built!.  Stop.

Makefile:351: recipe for target 'main_app' failed

make: *** [main_app] Error 2

Then when I uploaed the stripped elf using the webpage, the progress bar goes beyond 100%.  It never reboots and a manual reboot doesn't cause the firmware to load.

0 Likes

Hi:

#OTA SoftAp application

OTA_APPLICATION := snip.ota2_extract-$(PLATFORM)

OTA_APP    := build/$(OTA_APPLICATION)/binary/$(OTA_APPLICATION).stripped.elf

This  is  a necessary step:

and like what I have posted,  extract application should be compiled firstly also.

snip.ota2_extract-CYW954907AEVAL1F

Can you clean all the compile and do it according the steps I posted  ?  thanks.

as I stated previously, I have done a clean compile and was following your steps.  Can you tell me what browser you are using to do the upload?  I was using safari to upload the snip.apsta-CYW943907AEVAL1F.stripped.elf. 

Is that the correct file?  Is it a problem with safari?

I built all the files on windows, but used my mac to upload as that is the only machine I have with wifi to connect to the soft AP.

0 Likes

Hello:

   Yes,  I think the difference is I am using windows firefox to visit wiced_ota_server/upgrade.html .

and I verified my steps , it worked well.

0 Likes

I tried windows Firefox and got the same result.  Progress bar keeps going past 100% and device never loads new firmware.

I tried windows chrome, Firefox, Mac safari, Mac chrome, Mac Firefox all with the same results.

Any other thoughts?

0 Likes

hello:

   it is better you can show me your steps , I have no idea about the failed status since I am working well all the time in my side.  and what is the application will be updated into staging area ?  Can you send the bin file to me for a try ?

lock attach
Attachments are accessible only for community members.

1)clean

15:20:33 **** Build of configuration Default for project 43xxx_Wi-Fi ****

"C:\\WICED-Studio-6.2\\43xxx_Wi-Fi\\make.exe" clean

MAKEFILE MAKECMDGOALS=clean OTA2_SUPPORT is disabled

Cleaning...

Done

15:20:35 Build Finished (took 1s.921ms)

2)snip.ota2_extract-CYW943907AEVAL1F

15:21:08 **** Build of configuration Default for project 43xxx_Wi-Fi ****

"C:\\WICED-Studio-6.2\\43xxx_Wi-Fi\\make.exe" snip.ota2_extract-CYW943907AEVAL1F

MAKEFILE MAKECMDGOALS=snip.ota2_extract-CYW943907AEVAL1F OTA2_SUPPORT is enabled

3)snip.ota2_example-CYW943907AEVAL1F ota2_factory_download

16:05:00 **** Build of configuration Default for project 43xxx_Wi-Fi ****

"C:\\WICED-Studio-6.2\\43xxx_Wi-Fi\\make.exe" snip.ota2_example-CYW943907AEVAL1F ota2_factory_download

MAKEFILE MAKECMDGOALS=snip.ota2_example-CYW943907AEVAL1F ota2_factory_download OTA2_SUPPORT is enabled

4)snip.ota2_example-CYW943907AEVAL1F ota2_image download_apps download run

16:07:44 **** Build of configuration Default for project 43xxx_Wi-Fi ****

"C:\\WICED-Studio-6.2\\43xxx_Wi-Fi\\make.exe" snip.ota2_example-CYW943907AEVAL1F ota2_image download_apps download run

MAKEFILE MAKECMDGOALS=snip.ota2_example-CYW943907AEVAL1F ota2_image download_apps download run OTA2_SUPPORT is enabled

Building Bootloader waf.ota2_bootloader-NoOS-NoNS-CYW943907AEVAL1F-P103-SoC.43909

5)snip.apsta-CYW943907AEVAL1F ota2_image

16:09:55 **** Build of configuration Default for project 43xxx_Wi-Fi ****

"C:\\WICED-Studio-6.2\\43xxx_Wi-Fi\\make.exe" snip.apsta-CYW943907AEVAL1F ota2_image

MAKEFILE MAKECMDGOALS=snip.apsta-CYW943907AEVAL1F ota2_image OTA2_SUPPORT is enabled

6)boot into soft ap mode holding sw1

softap.JPG

7)browse to webpage and upload snip.apsta-CYW943907AEVAL1F.stripped.elf

Screen Shot 2018-10-25 at 4.17.58 PM.png

Screen Shot 2018-10-25 at 4.18.27 PM.png

Here is the output of the terminal.  It just stops after getting all the bytes

noupgrade.JPG

I have included the entire build directory.  If I reset the board it also doesn't load.

0 Likes

Hello:

last step, you need to upload the .bin file .

   The OTA2 Image Packager Application will combine all of the assets into a linear file which has a length and CRC for easy retrieval via the HTTP protocol. This will include Executable Application, DCT, and File system (resources, WiFi Firmware, etc.).

I just tried the .bin file and got the same results as before.  Progress bar goes past 100 and it never reloads and updates the firmware.

0 Likes

Hello:

this directory, this  file:

build/snip.apsta-CYW954907AEVAL1F/OTA2_image_file.bin

not the binary directory .

Wow, that was a lot of effort for something so simple.  Yes that is the correct file and it works.  I think the confusion is in the documentation.  There is no reference to the soft ap upload tool or the correct file in WICED-OTA2.pdf  IN WICED-OTA.pdf on page 8 and 9 it tells you to use the stripped.elf file that is in the bin directory.

The WICED-OTA2.pdf never explicitly specifies the path for the update ota2 image.  Maybe that should be make more clear.

Thanks for your help.

0 Likes

zhez

strickon_3481606​ (CC:)

Should I interpret your marked correct response as the following:

After the kit is programmed then reset into OTA boot mode and you've accessed your device from your PC and navigated to 192.168.10.1, load the .bin file named "OTA2_image_file.bin found in the build/snip.apsta-CYW954907AEVAL1F directory. Do NOT use any .bin file from the lower build/snip.apsta-CYW954907AEVAL1F/binary directory.

user_455868498

0 Likes

That was the issue. There should be explicit directions about where to get the bin file in the pdf that described the process.

0 Likes

Thanks again strickon_3481606

0 Likes