本地OTA升级失败 Local OTA upgrade failed

luyifan
Posts: 6
Joined: Wed Aug 26, 2015 12:00 pm

本地OTA升级失败 Local OTA upgrade failed

Postby luyifan » Fri Aug 28, 2015 11:46 am

我在本地用一台win8做IIS服务器,esp8266连接到server上进行升级但是失败了,想请教一下大家有没有人是在本地搭服务器成功升级的?
我尝试了多种方法都不行。
第一种方法我的配置如下:
在esp8266中烧录了以下bin
0x00000 boot_v1.2
0xFC000 esp_init_data_default.bin
0xFE000 blank
0x01000 0x01010.bin(用的编译选项是eagle.app.v6.new.1024.app1.ld)
前面三个bin都是烧录成功的,等到烧录我自己程序时就会失败,烧录结束后main函数都没运行,打印的都是乱码。而且用我官方给的at这个demo也是一样的结果,at的bin是我直接从sdk里拷贝出来的at/user1.1024.new.2.bin,程序烧录之后也是没有运行main函数。
第二种方法我的配置如下:
在esp8266中烧录了以下bin
0x00000 boot_v1.2
0xFC000 esp_init_data_default.bin
0xFE000 blank
0x40000 0x40000.bin(用的编译选项是eagle.app.v6.ld)
烧录之后程序可以正常运行,用wireshark观察可以看到,程序运行之后esp8266向server发出升级请求,server响应请求,向esp8266发送需要下载的bin文件,但是在发送4个数据包大约6KB之后server就不再发送数据,因为esp8266一直没有接收,现象如下:
system_upgrade_start
upgrade_connect
Updateing...
upgrade_connect_cb
GET /0x40000.bin HTTP/1.0
Host: 192.168.150.10:80
Connection: keep-alive
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gec ko) Chrome/30.0.1599.101 Safari/537.36
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8

sumlength = 175336
\0xe0\0xe0\0x00\0x00\0xe0\0x00.......
我也知道第二种方法是不对的,因为没有区分用户区,所以esp8266没有升级成功,但是为什么连下载都不行呢?采用第一种方法是可以区分用户区,可是一烧录进去连main都没跑就挂了,大家谁遇到过同样的问题?请指教一下,已经搞了2天了,一直不行,谢谢大家了~
Last edited by luyifan on Fri Aug 28, 2015 12:10 pm, edited 1 time in total.

luyifan
Posts: 6
Joined: Wed Aug 26, 2015 12:00 pm

Re: 本地OTA升级失败

Postby luyifan » Fri Aug 28, 2015 12:08 pm

I repeat this question in English.
I set up a IIS web server on the local WIN8 machine to host the firmware file. Then esp8266 take the link to server for ota upgrading, but it`s failed. Can anybody help me?
I tried some methods those were all failed.
I use 1024KB flash and burn the following bin:
1.
0x00000 boot_v1.2
0xFC000 esp_init_data_default.bin
0xFE000 blank
0x01000 0x01010.bin(ld script is eagle.app.v6.new.1024.app1.ld)
When the 0x01010.bin was burned, the main function was not running. The output was messy code. Then I used the at demo, I had the same result. The at/user1.1024.new.2.bin is token from sdk file.
2.
0x00000 boot_v1.2
0xFC000 esp_init_data_default.bin
0xFE000 blank
0x40000 0x40000.bin(ld script is eagle.app.v6.ld)
After burning these bin files, the program could be running normally. server could response ota upgrade request successfully from esp8266. Then server transmitted about 6KB data in 4 packets to esp8266, after these the transmit would stop, because esp8266 didn`t receive any data. The result is following:
system_upgrade_start
upgrade_connect
Updateing...
upgrade_connect_cb
GET /0x40000.bin HTTP/1.0
Host: 192.168.150.10:80
Connection: keep-alive
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gec ko) Chrome/30.0.1599.101 Safari/537.36
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8

sumlength = 175336
\0xe0\0xe0\0x00\0x00\0xe0\0x00.......
I know the second method is wrong, because it use the wrong user memory. But why the download doesn`t work? The first method use the right address. However, the result is that main doesn`t run?
Has anyone have the similar problem? Please help me~ Thank you :roll:

Who is online

Users browsing this forum: No registered users and 27 guests