keepalive invalid when using esp_iot_sdk_v1.0.1_15_04_24
keepalive invalid when using esp_iot_sdk_v1.0.1_15_04_24
Postby grantgao » Mon May 11, 2015 5:34 pm
我的keepalive功能一直都正常,替换成新的esp_iot_sdk_v1.0.1_15_04_24 SDK后,keepalive就没有了,我的代码未变动
nKeepaliveParam = 10;//默认5s探测一次
espconn_set_keepalive(pespconn, ESPCONN_KEEPIDLE, &nKeepaliveParam);
nKeepaliveParam = 2;//如果不回应的话1s探测一次
espconn_set_keepalive(pespconn, ESPCONN_KEEPINTVL, &nKeepaliveParam);
nKeepaliveParam = 10;//最多探测10次
espconn_set_keepalive(pespconn, ESPCONN_KEEPCNT, &nKeepaliveParam);
espconn_set_opt(pespconn,ESPCONN_KEEPALIVE);//使能keepalive
nKeepaliveParam = 10;//默认5s探测一次
espconn_set_keepalive(pespconn, ESPCONN_KEEPIDLE, &nKeepaliveParam);
nKeepaliveParam = 2;//如果不回应的话1s探测一次
espconn_set_keepalive(pespconn, ESPCONN_KEEPINTVL, &nKeepaliveParam);
nKeepaliveParam = 10;//最多探测10次
espconn_set_keepalive(pespconn, ESPCONN_KEEPCNT, &nKeepaliveParam);
espconn_set_opt(pespconn,ESPCONN_KEEPALIVE);//使能keepalive
Re: keepalive invalid when using esp_iot_sdk_v1.0.1_15_04_24
Postby ESP_Faye » Thu May 14, 2015 10:15 am
您好,
非常抱歉,测试您提供的代码,keep alive 功能正常,未能复现到您的问题。
非 OS SDK 其实是单线程的,keep alive 设置的时间间隔并不可靠,仅供参考值。
我的测试代码如附件。
非常抱歉,测试您提供的代码,keep alive 功能正常,未能复现到您的问题。
非 OS SDK 其实是单线程的,keep alive 设置的时间间隔并不可靠,仅供参考值。
我的测试代码如附件。
- Attachments
-
- user_main.zip
- (2.02 KiB) Downloaded 696 times
Who is online
Users browsing this forum: No registered users and 143 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.