I do not want those devices to access the internet directly.
As a prototype, I am using the IOTDemo in ESP8266_NONOS_SDK Version v2.1.0 downloaded today. I am using curl commands and Fiddler prior to coding this into the App.
The problem is that the upgrade seems to go without error but the device always boots up to user1.
Any clues are greatly appreciated!
Here is my prototype test sequence:
I am calling the function to begin an upgrade using curl from a Windows 10 PC connected to the Soft AP of the device:
Code: Select all
curl -X POST -H "Content-Type:application/json" http://192.168.4.1/upgrade?command=start
This results in the following output on the serial port which appears correct:
- We have a POST request.
local upgrade start
webserver's 192.168.4.2:59310 disconnect
- upgrade file download start.
upgrade file download finished.
local upgrade success
webserver's 192.168.4.2:59350 disconnect
system upgrade deinit
Code: Select all
curl -X POST -H "Content-Type:application/json" http://192.168.4.1/upgrade?command=reset
This causes the serial port output:
- len:128
We have a POST request.
local upgrade restart
reboot to use2
del if0
station: 54:27:1e:fa:ce:db leave, AID = 1
rm 1
bcn 0
del if1
usl
<Mass of garbage since baud rate not updated>
cal sector: 1019
freq trace enable 0
rf[112] : 00
rf[113] : 00
rf[114] : 01
SDK ver: 2.1.0(116b762) compiled @ May 5 2017 16:08:55
phy ver: 1134_0, pp ver: 10.2
SDK version:2.1.0(116b762)
IOT VERSION = v1.0.5t45772(a)
reset reason: 4
LIGHT PARAM: R: 15731984
LIGHT PARAM: G: 202179138
LIGHT PARAM: B: 843353093
LIGHT PARAM: CW: 1112673090
LIGHT PARAM: WW: 15731981
LIGHT PARAM: P: 1000
malloc:1
prd:1000 r : 22222 g: 22222 b: 22222 cw: 22222 ww: 22222
free:0
PWM version : 00000003
mode : sta(18:fe:34:ce:24:04) + softAP(1a:fe:34:ce:24:04)
add if0
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
add 1
aid 1
station: 54:27:1e:fa:ce:db join, AID = 1
finish