-->
Page 1 of 1

Help setting station mode in the SDK IoT_demo

PostPosted: Wed May 27, 2015 10:34 am
by Somhi
Hi,
I'm having problems to set the station mode in the SDK IoT_demo.
I'm able to join the softAP network of the ESP but then I have no way to set the station mode.

If anyone had the same problem or knows how to resolve it, I will appreciate very much your help.

Hardware: Olimex MOD-WIFI-ESP8266-DEV

Flash command:
esptool.py --port /dev/ttyUSB0 write_flash 0x00000 ./bin/eagle.flash.bin 0x40000 ./bin/eagle.irom0text.bin 0x7C000 ./bin/esp_init_data_default.bin 0x7E000 ./bin/blank.bin

After joining the softAP network I can do curl to the ESP and I'm receiving the following info:
curl -X GET http://192.168.4.1/client?command=info
{
"Version":{
"hardware":"0.3",
"sdk_version":"1.0.1(b2)",
"iot_version":"v1.0.2t12335(a)"
},
"Device":{
"product":"Humiture",
"manufacturer":"Espressif Systems"
}

When I try to set the station mode I get no answer.
curl -X POST -H "Content-Type:application/json" -d '{"Request":{"Station":{"Connect_Station":{"SSID":"txxxx", "password":"5xxxxxxxxxxxxxxh", "token":"1234567890123456789012345678901234567890"}}}}' http://192.168.4.1/config?command=wifi

And the wifi command doesn't get updated with my router configuration:
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_9C642B",
"password":"1a:fe:43:9c:46:2b_v*%W>L<@i&Nxe!"
},
"Ipinfo_Softap":{
"ip":"192.168.4.1",
"mask":"255.255.255.0",
"gw":"192.168.4.1"
}
}
}
}