-->
Page 1 of 2

ota, fail at second update

PostPosted: Fri Apr 03, 2015 3:07 am
by tamgiangtd
Hello,

Problem: the first ota update go right, user2.bin is downloaded and runs. The second update (user1.bin) is downloaded, and fails to run.

Long description:
I am using sdk v1.0, and work with examples/at from sdk. I used local computer as server with nodejs.

As far as I got, the FW looking if it's using user1/2, then ask for another user to update. The simple nodejs server return user1/2.bin for request /user1/2.bin respectively.

First update with at command
Code: Select allAT+CIUPDATE

+CIPUPDATE:1
+CIPUPDATE:2
+CIPUPDATE:3
+CIPUPDATE:4

OK

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x40100000, len 1320, room 16
tail 8
chksum 0xb8
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0xd9
load 0x3ffe8308, len 412, room 0
tail 12
chksum 0xb9
csum 0xb9

2nd boot version : 1.3(b3)
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size : 4Mbit
jump to run user2

r�
ready
compile time:Apr  2 2015 19:56:37


So far so good. "Jump to run user2, and print out user2 compile time. Then I try more with update:

Code: Select allAT+CIUPDATE

+CIPUPDATE:1
+CIPUPDATE:2
+CIPUPDATE:3
+CIPUPDATE:4

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x40100000, len 1320, room 16
tail 8
chksum 0xb8
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0xd9
load 0x3ffe8308, len 412, room 0
tail 12
chksum 0xb9
csum 0xb9

2nd boot version : 1.3(b3)
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size : 4Mbit
jump to run user2

Fatal exception (0):
epc1=0x40201660, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x40201660, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x40201660, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x40201660, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
...

Logging from nodejs server said user1.bin is requested as expectation. Problem may raise from "jump to run user2" when it should expected to run user1.

So the problem is from bootloader? And any though how to solve this?

Many thanks,

/tamgiang

Re: ota, fail at second update

PostPosted: Tue Apr 07, 2015 5:49 pm
by jirka00
Hello, tamgiang

i had similar problem when i didn't use "make clean " before building user2.bin.

Hope it helps,
Jirka

Re: ota, fail at second update

PostPosted: Wed Apr 08, 2015 8:02 am
by hdrut
Hi,

I am trying to run the OTA firmware update but got stuck at "Flashing OTA User App..."
Any idea what could be going wrong? IP address is default, SoftAP 192.168.4.1, and my STA IP is 192.168.0.107.
Webpage loads correctly after serial flashing. I am using SDK 0.9.5 by the way.

Thks in advance for any help.

Re: ota, fail at second update

PostPosted: Thu Apr 09, 2015 2:19 am
by tamgiangtd
jirka00 wrote:i had similar problem when i didn't use "make clean " before building user2.bin.


Hi Jirka,

Great thank, your advice just works.

In detail, do you know why we need to force to rebuild user2? It should not sound logical, since basically user1 and user2 come from same code, with different links.

/tamgiang