我刚学习esp8266.遇到这个问题请帮忙解决。
使用的是esp_iot_sdk_v1.0.1_15_04_24.zip SDK.
烧录工具是FLASH_DOWNLOAD_TOOLS_v0.9.6_150419.rar。
使用附件的参数,烧录ok.
电脑通过wifi,输入密码:1a:fe:34:fe:41:b4_v*%W>L<@i&Nxe!
连接上softAp.
在windos ,参考 2B-ESP8266__SDK__IOT_Demo_CN_v0.5.pdf
使用curl 命令修改softAp ssid 和密码不成功。
命令使用:
curl -X POST -H "Content-Type:applica
tion/json" -d "{/"Request/":{/"
Softap/":{/"Connect_Softap/":{/"authmode/":/"WPAPSK/WPA2PSK/", /"channel/":6, /"
SSID/":/"ESP_IOT_SOFTAP/", /"password/":/"34567890/"}}}}"
http://192.168.4.1/con
fig?command=wifi
这个也不行。
curl -X POST -H "Content-Type:application/json" -d "{/"Request/":{/"Softap/":{/"Connect_Softap/":{/"authmode/":/"WPA2PSK/", /"channel/":6, /"SSID/":/"ESP_IOT_SOFTAP/", /"password/":/"34567890/"}}}}"
http://192.168.4.1/config?command=wifi
具体log:
命令log:
C:Usersyk>curl -X GET
http://192.168.4.1/client?command=info
{
"Version":{
"hardware":"0.3",
"sdk_version":"1.0.1",
"iot_version":"v1.0.2t12335(a)"
},
"Device":{
"product":"Humiture",
"manufacturer":"Espressif Systems"
}
}
C:Usersyk>curl -X GET
http://192.168.4.1/config?command=wifi
{
"Response":{
"Station":{
"Connect_Station":{
"ssid":"",
"password":""
},
"Ipinfo_Station":{
"ip":"0.0.0.0",
"mask":"0.0.0.0",
"gw":"0.0.0.0"
}
},
"Softap":{
"Connect_Softap":{
"authmode":"WPAPSK/WPA2PSK",
"channel":1,
"ssid":"ESP_FE41B4",
"password":"1a:fe:34:fe:41:b4_v*%W>L<@i&Nxe!"
},
"Ipinfo_Softap":{
"ip":"192.168.4.1",
"mask":"255.255.255.0",
"gw":"192.168.4.1"
}
}
}
}
C:Usersyk>curl -X POST -H "Content-Type:application/json" -d "{/"Request/":{/"
Softap/":{/"Connect_Softap/":{/"authmode/":/"WPAPSK/WPA2PSK/", /"channel/":6, /"
SSID/":/"ESP_IOT_SOFTAP/", /"password/":/"34567890/"}}}}"
http://192.168.4.1/con
fig?command=wifi
C:Usersyk>
串口log:
ets Jan 8 2013,rst cause:1, boot mode:(3,7)
load 0x40100000, len 28304, room 16
tail 0
chksum 0xed
load 0x3ffe8000, len 3252, room 8
tail 12
chksum 0x6d
ho 0 tail 12 room 4
load 0x3ffe8cc0, len 3336, room 12
tail 12
chksum 0x45
csum 0x45
SDK ver: 1.0.1 compiled @ Apr 24 2015 19:31:11
phy ver: 329, pp ver: 8.4
SDK version:1.0.1
IOT VERSION = v1.0.2t12335(a)
addr not ack when tx write cmd
PCB->localport 80
mode : sta(18:fe:34:fe:41:b4) + softAP(1a:fe:34:fe:41:b4)
add if0
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
add if1
bcn 100
add 1
aid 1
station: 20:7c:8f:26:3a:ba join, AID = 1
We have a GET request.
webserver's 192.168.4.2:65232 disconnect
We have a GET request.
webserver's 192.168.4.2:65235 disconnect
We have a POST request.
webserver's 192.168.4.2:65240 disconnect