Statistics: Posted by phil31 — Sat Mar 07, 2015 11:30 pm
Statistics: Posted by jayc75 — Sat Mar 07, 2015 6:59 am
Statistics: Posted by phil31 — Fri Mar 06, 2015 11:01 pm
Code:
..
if(espconn_tcp_get_max_con()!=5) {
espconn_tcp_set_max_con(5);
system_restart(); // ;-) ....
}
Code:
..
//cause a reset only when the mx if actually higher than 5 no need to reset the max if it is under 5.
if(espconn_tcp_get_max_con() > 5) {
espconn_tcp_set_max_con(5);
system_restart(); // ;-) ....
}
Statistics: Posted by jayc75 — Fri Mar 06, 2015 7:47 pm
Statistics: Posted by phil31 — Thu Mar 05, 2015 8:11 pm
phil31 wrote:
..what i mean is that the AT fiurmware is not reliable actually to be used as web server (multiple connection, to serve a real web page with HTML, CSS, JS and image) ..
yes it's work if you plan to use it to send 1à bytes each hours to a web server .. but not in my case, where i need to serve 20 or 30KB in some seconds...
Code:
#if LWIP_TCP
MEMP_NUM_TCP_PCB = 5;
tcp_init();
Code:
espconn_tcp_max_con
..
espconn_tcp_set_max_con(uint8 num )
..
extern sint8 espconn_tcp_set_max_con_allow(struct espconn *espconn, uint8 num)
..
Code:
..
sint8 espconn_tcp_set_max_con(uint8 num );
..
Code:
..
if(espconn_tcp_get_max_con()!=5) {
espconn_tcp_set_max_con(5);
system_restart(); // ;-) ....
}
phil31 wrote:
if you find a link, showing what i want to do, PLEASE .. share it !
Statistics: Posted by rudi — Thu Mar 05, 2015 8:38 am
Statistics: Posted by phil31 — Thu Mar 05, 2015 1:16 am
phil31 wrote:
i'm figthing since too long time with all unsolicited message as "busy...", "fail", "error" .. or WDT reboot ..
phil31 wrote:
....
..too bad becasue i'm convince that the ESP8266 is a good chip, but withtout a stable and reliable AT firmware, for my purpose, it is not usable.![]()
i don't plan to send only 10 bytes each minute to a server, i need to use it as web server, with host cpu.
Code:
const char sw_on[] = "<img src=\"data:image/png;base64,data ....==\" />";
const char sw_off[] = "<img src=\"data:image/png;base64,data ....==\" />";
..
Web Response..
// constants what you want
// or central create and use as webside.h ..
// simple as TCP Response from ESP or µC then you must change to uart communication and change all in your µC code
// this only a short example..
const char hs0[]="HTTP/1.0 200 OK\r\nCONTENT-TYPE: text/html\r\n\r\n";
const char hs1[]="<html><head><title>Switch</title></head><body>";
const char hs2[]="<center>Relais One<br>";
const char hs3[]="<img src)\"";
const char hs4[]="</center></body></html>";
..
// switch reqeust..
..
if (sw==on) {
os_sprintf(at_dataline,"%s%s%s%s%s%s",hs0,hs1,hs2,hs3,sw_on,hs4);
}
if (sw==off) {
os_sprintf(at_dataline,"%s%s%s%s%s%s",hs0,hs1,hs2,hs3,sw_off,hs4);
}
at_tranLen = strlen(at_dataLine);
os_sprintf(WebSide,"\r\n %s\r\n", at_dataLine);
uart0_sendStr(WebSide);
espconn_sent (pLink[0].pCon, at_dataLine, at_tranLen);
// no wait status in iexplore..
espconn_disconnect(pLink[0].pCon);
..
Statistics: Posted by rudi — Wed Mar 04, 2015 11:35 pm
Statistics: Posted by phil31 — Wed Mar 04, 2015 12:26 am