ESP8266 Developer Zone The Official ESP8266 Forum 2015-04-20T18:05:34+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=368 2015-04-20T18:05:34+08:00 2015-04-20T18:05:34+08:00 https://bbs.espressif.com:443/viewtopic.php?t=368&p=1438#p1438 <![CDATA[Re: 8266在和路由器失联后,如何通过SDK CALLBACK获取?]]> do your tcp client reconnect to your server after fail? or only connect once when you power up.
it seems that your ap kicks out esp8266, but i'm not sure now. if station does not transfer any data to ap, ap will kick out this station, the time depend on the config of ap.
so please ping your device from pc, check again.

Statistics: Posted by jackon — Mon Apr 20, 2015 6:05 pm


]]>
2015-04-17T17:07:08+08:00 2015-04-17T17:07:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=368&p=1393#p1393 <![CDATA[Re: 8266在和路由器失联后,如何通过SDK CALLBACK获取?]]>
grantgao wrote:
jackon wrote:hi, grantgao
i add the function you required last night, now you can register a callback in user_init, and handle connect/disconnect/got_ip event in your callback function.
please follow readme.txt in the attached zip file, test this new function and give me feedback asap.
thx


i have tried it ,and it is very useful feature!i power off my router and wait several seconds ,then power on the router again,the callback handle can note me wifi have reconnected ,so at this time i can make sure that currect tcp socket need to be cleared and recreate!
thanks espressif team!


but i found one new issue,when i shut down my local TCP server ,and then boot esp8266,esp8266 can not connect with local server ofcourse,but the wifi event handle always note me with string "event 2 ip:192.168.0.103,mask:255.255.255.0,gw:192.168.0.1" every 5-8min,if i start local server and let esp8266 connect successful,and tranport a keepalive packet every minitue,esp8266 never note me the string "event 2ip:192.168.0.103,mask:255.255.255.0,gw:192.168.0.1" again,

my question is ,if no trasport task on esp8266 wifi ,will esp8266 enter idle or sleep mode automatic? if not,why it note me with the string "event 2 ip:192.168.0.103,mask:255.255.255.0,gw:192.168.0.1" every 5-8min?

Statistics: Posted by grantgao — Fri Apr 17, 2015 5:07 pm


]]>
2015-04-17T16:51:16+08:00 2015-04-17T16:51:16+08:00 https://bbs.espressif.com:443/viewtopic.php?t=368&p=1392#p1392 <![CDATA[Re: 8266在和路由器失联后,如何通过SDK CALLBACK获取?]]>
jackon wrote:
hi, grantgao
i add the function you required last night, now you can register a callback in user_init, and handle connect/disconnect/got_ip event in your callback function.
please follow readme.txt in the attached zip file, test this new function and give me feedback asap.
thx


i have tried it ,and it is very useful feature!i power off my router and wait several seconds ,then power on the router again,the callback handle can note me wifi have reconnected ,so at this time i can make sure that currect tcp socket need to be cleared and recreate!
thanks espressif team!

Statistics: Posted by grantgao — Fri Apr 17, 2015 4:51 pm


]]>
2015-04-17T10:42:53+08:00 2015-04-17T10:42:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=368&p=1383#p1383 <![CDATA[Re: 8266在和路由器失联后,如何通过SDK CALLBACK获取?]]>
jackon wrote:
hi, grantgao
i add the function you required last night, now you can register a callback in user_init, and handle connect/disconnect/got_ip event in your callback function.
please follow readme.txt in the attached zip file, test this new function and give me feedback asap.
thx


wonderful!i will try and feedback,thanks very much!

Statistics: Posted by grantgao — Fri Apr 17, 2015 10:42 am


]]>
2015-04-17T10:09:00+08:00 2015-04-17T10:09:00+08:00 https://bbs.espressif.com:443/viewtopic.php?t=368&p=1381#p1381 <![CDATA[Re: 8266在和路由器失联后,如何通过SDK CALLBACK获取?]]> i add the function you required last night, now you can register a callback in user_init, and handle connect/disconnect/got_ip event in your callback function.
please follow readme.txt in the attached zip file, test this new function and give me feedback asap.
thx
1.0.1_b2_wifi_event_callback.zip

Statistics: Posted by jackon — Fri Apr 17, 2015 10:09 am


]]>
2015-04-16T16:13:58+08:00 2015-04-16T16:13:58+08:00 https://bbs.espressif.com:443/viewtopic.php?t=368&p=1366#p1366 <![CDATA[Re: 8266在和路由器失联后,如何通过SDK CALLBACK获取?]]>
非常抱歉,目前没有相关 callback,您可以通过 timer 查询是否连接上路由,请参考 IOT_Demo 中的 user_esp_platform_check_ip

您的意见十分宝贵,我们将安排评估这一需求。

感谢您对 ESP8266 的关注 !

Statistics: Posted by ESP_Faye — Thu Apr 16, 2015 4:13 pm


]]>
2015-04-16T16:04:13+08:00 2015-04-16T16:04:13+08:00 https://bbs.espressif.com:443/viewtopic.php?t=368&p=1361#p1361 <![CDATA[8266在和路由器失联后,如何通过SDK CALLBACK获取?]]> 你可以看下我附图中,8266的底层打印表明,路由器在重新scan done后,获取了IP地址和网关。我需要一个API能在此时主动通过callback的形式通知user程序
路由器失连.png

Statistics: Posted by grantgao — Thu Apr 16, 2015 4:04 pm


]]>