ESP8266 Developer Zone The Official ESP8266 Forum 2015-03-07T23:30:37+08:00 https://bbs.espressif.com:443/feed.php?f=16&t=243 2015-03-07T23:30:37+08:00 2015-03-07T23:30:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=959#p959 <![CDATA[Re: AT firmware & webserver in external host ...]]> http://hlktech.com/en/productshow.asp?id=148

simply google "HLK-M30" to find reseller !

regards

Statistics: Posted by phil31 — Sat Mar 07, 2015 11:30 pm


]]>
2015-03-07T06:59:44+08:00 2015-03-07T06:59:44+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=952#p952 <![CDATA[Re: AT firmware & webserver in external host ...]]>
thanks,

Statistics: Posted by jayc75 — Sat Mar 07, 2015 6:59 am


]]>
2015-03-06T23:01:28+08:00 2015-03-06T23:01:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=946#p946 <![CDATA[Re: AT firmware & webserver in external host ...]]>
if it was the single bug !..

the firmware is absolutly not usable (last beta, or all older versions ) !
a lot of problems as
- missing ">"
- "busy..", "Fail" messages and/or others unsolicited messages that are not explain in any documentations
- a lot of trouble with the watchdog
- and too much to do do any reliable multi socket server

i just receive the HLK-M30 module and start to evaluate asap. a little more expensive, but if stable, then ..

regards all, have a nice week end !

Statistics: Posted by phil31 — Fri Mar 06, 2015 11:01 pm


]]>
2015-03-06T19:47:04+08:00 2015-03-06T19:47:04+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=944#p944 <![CDATA[Re: AT firmware & webserver in external host ...]]> I just wanted to step in here and say YES the Espressif Latest b1 AT firmware has a bug when you try to serve Multiple connections, basically as soon as it changes the Channel ID to serve a new request, the module resets....

basically the module resets as soon as the channel ID goes higher than 0, hence it doesn't handle the Multiple connection as it should!

Attached is the application I used to stress test the module... basically if you run two copies of the program and send request from both to the ESP at the same time it will cause it to reset as soon as it starts serving higher Channel ID's

here is the output:
0,CONNECT

+IPD,0,29:GET /Hello World HTTP/1.0

AT+CIPSEND=0,233

O
OK
>


> HTTP/1.1 200 OK
CoContent-Type: text/htmlContent-Length: 102Server: hostnameCache-Control: no-cacheConnection: keep-alive
Welcome</title></head><body><p>Welcome PageCounter = 10 RebootCounter=0 ChannelId=0.</p></body></html>
S
SEND OK

1,CONNECT


+IPD,1,369:GET /test HTTP/1.1

Accept: text/html, application/xhtml+xml, */*

Accept-Language: en-US

User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko

Accept-Encoding: gzip, deflate, peerdist

Host: 192.168.1.14

Connection: Keep-Alive

X-P2P-PeerDist: Version=1.1


X-P2P-PeerDistEx: MinContentInformation=1.0, MaxContentInformation=2.0


A
AT+CIPSEND=1,234


O
OK
>


> HTTP/1.1 200 OK
CoContent-Type: text/htmlContent-Length: 102Server: hostnameCache-Control: no-cacheConnection: keep-alive
Welcome</title></head><body><p>Welcome PageCounter = 11 RebootCounter=0 ChannelId=1.</p></body></html>
a

SEND OK

2,CONNECT

+IPD,2,346:GET /favicon.ico HTTP/1.1
Accept: */*
UA-CPU: AMD64

Accept-Encoding: gzip, deflate, peerdist

User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; Touch; rv:11.0) like Gecko

Host: 192.168.1.14

DNT: 1

Connection: Keep-Alive

X-P2P-PeerDist: Version=1.1




X-P2P-PeerDistEx: MinContentInformation=1.0, MaxContentInformation=2.0


A
AT+CIPSEND=2,234




O
OK
>




> HTTP/1.1 200 OK
CoContent-Type: text/htmlContent-Length: 102Server: hostnameCache-Control: no-cacheConnection: keep-alive
Welcome</title></head><body><p>Welcome PageCounter = 12 RebootCounter=0 ChannelId=2.</p></body></html>
S

SEND OK


+IPD,1,369:GET /test HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-US

User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko

Accept-Encoding: gzip, deflate, peerdist

Host: 192.168.1.14

Connection: Keep-Alive

X-P2P-PeerDist: Version=1.1

X-P2P-PeerDistEx: MinContentInformation=1.0, MaxContentInformation=2.0


AT+CIPSEND=1,234


O
OK
>




> HTTP/1.1 200 OK
CoContent-Type: text/htmlContent-Length: 102Server: hostnameCache-Control: no-cacheConnection: keep-alive
Welcome</title></head><body><p>Welcome PageCounter = 13 RebootCounter=0 ChannelId=1.</p></body></html>
S

SEND OK



+IPD,2,346:GET /favicon.ico HTTP/1.1
Accept: */*
UA-CPU: AMD64

Accept-Encoding: gzip, deflate, peerdist

User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; Touch; rv:11.0) like Gecko

Host: 192.168.1.14
DNT: 1

Connection: Keep-Alive
X-P2P-PeerDist: Version=1.1

X-P2P-PeerDistEx: MinContentInformation=1.0, MaxContentInformation=2.0


AT+CIPSEND=2,234


O
OK
>


> HTTP/1.1 200 OK
CoContent-Type: text/htmlContent-Length: 102Server: hostnameCache-Control: no-cacheConnection: keep-alive
Welcome</title></head><body><p>Welcome PageCounter = 14 RebootCounter=0 ChannelId=2.</p></body></html>
S

SEND OK

3,CONNECT


+IPD,3,29:GET /Hello World HTTP/1.0


AT+CIPSEND=3,234


O
OK
>


> HTTP/1.1 200 OK
CoContent-Type: text/htmlContent-Length: 102Server: hostnameCache-Control: no-cacheConnection: keep-alive
Welcome</title></head><body><p>Welcome PageCounter = 15 RebootCounter=0 ChannelId=3.</p></body></html>
S
SEND OK
3,CLOSED
0,CONNECT FAIL


ets Jan 8 2013,rst cause:4, boot mode:(3,7)


wdt reset

load 0x40100000, len 1320, room 16

tail 8

chksum 0xb8

load 0x3ffe8000, len 776, room 0

tail 8

chksum 0xd9

load 0x3ffe8308, len 412, room 0

tail 12

chksum 0xb9
csum 0xb9


2nd boot version : 1.3(b3)

SPI Speed : 40MHz

SPI Mode : QIO

SPI Flash Size : 4Mbit

jump to run user1



rlmp

ready

btw in my opinion this code should be changed to >5


Code:

..
if(espconn_tcp_get_max_con()!=5) {
espconn_tcp_set_max_con(5);
system_restart(); // ;-) ....
}



to

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(); // ;-) ....
}
StressTestNetworkWinForm.rar

Statistics: Posted by jayc75 — Fri Mar 06, 2015 7:47 pm


]]>
2015-03-05T20:11:09+08:00 2015-03-05T20:11:09+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=930#p930 <![CDATA[Re: AT firmware & webserver in external host ...]]>

i tried since more than 4 months .. so i think that i have tried with EVERY available version, from older 0016 to last beta 0.22/SDK0.9.6 !

all my host routines work absolutly perfect to serve some single big files, as a big image, or any other kind of files.
all troubles come when you serve an HTML, wich include more file / so more sockets : "busy" message is the most often, then "error", "fail" and sometime WDT reboot "withtout any reason" ...
i had request already many time to Espressif, to provide some informations to carefully and efficiently manage the multi socket side, or to use the ESP8266 as web server with multiple connections ..
i'm convince that they don't reply because they know all these troubles .. !


my German is old, bu yes, your link on mikrocontroller.net, seem describe same problem ! i'm not alone !

i realy don't want look at the SDK files, because my goal is to not modify anything inside .. i want to use the official AT firmware, to obtain the gain of the online update feature..
so it make no sens to modify the AT firmware by myslef or to use non official firmware.

regards
Phil

Statistics: Posted by phil31 — Thu Mar 05, 2015 8:11 pm


]]>
2015-03-05T08:38:43+08:00 2015-03-05T08:38:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=917#p917 <![CDATA[Re: AT firmware & webserver in external host ...]]>
phil31 wrote:
i use Espressif AT firmware ONLY,


can u plz post the firmware version
SDK:
AT Version:

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...


i understand you, we do talk the same in scenic forum
http://www.mikrocontroller.net/topic/356311#new

Code:

#if LWIP_TCP
  MEMP_NUM_TCP_PCB = 5;
  tcp_init();



have a look in lwip\app

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)
..


or / and example
0.9.3\include
espconn.h

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 !


ok ..

phil31 wrote:
some of my previous complain :
viewtopic.php?f=16&t=116
viewtopic.php?f=16&t=140


will see in this too.

best wishes
rudi ;-)

Statistics: Posted by rudi — Thu Mar 05, 2015 8:38 am


]]>
2015-03-05T01:16:20+08:00 2015-03-05T01:16:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=916#p916 <![CDATA[Re: AT firmware & webserver in external host ...]]>
thanks for your long reply, but maybe my english is not perfect ..

i use Espressif AT firmware ONLY, with externalo CPU as host.
don't care about which kind of CPU, ATMEL, PIC, NXP .. that's change nothing ..
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.

if you find a link, showing what i want to do, PLEASE .. share it !
i goggle since long time to find somthing .. i only find some guy who claim to use as web server, with a simple HTML page of maybe 100 nytes .. no images, no CSS, no script ..
yes ok in that case, it seem working .. but as soon as you try to use the chip with a real HTML (which call CSS, images and others parts ) .. the chip become crazy !

as your example (in german language, you can see that the web page is composed only of some 100's bytes .. nothing more )


i can serve a big file as an image of 100KB, WITHTOUT trouble .. but try to serve an HTML, which call 2 images 'in same' time .. then crazy masseage as "busy", "fail" comes :(


about "esphttpd " .. NO, the web documents are embedded on the host side (as i want to use only original AT firmware) !
don't care if they are on SD card, on CPU memory or so .. that make no differences.

some of my previous complain :
viewtopic.php?f=16&t=116
viewtopic.php?f=16&t=140

regards

Statistics: Posted by phil31 — Thu Mar 05, 2015 1:16 am


]]>
2015-03-04T23:35:02+08:00 2015-03-04T23:35:02+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=914#p914 <![CDATA[Re: AT firmware & webserver in external host ...]]>
phil31 wrote:
Dear all

Is it that I'm the only one wanting to do a web server with an external host CPU and AT firmware ??


I think this is like it is - the most people make own Firmware for the CHIP ESP8266ex or other combinied with the Chip ESP8266ex,
most hardware manufacturer take the ESP8266ex for making simple Modules like ESP01..ESP04..ESP07..ESP12 and so on, that can combinied with extern MCU and simply connect by UART or SPI or other, other combinied it with AVR or Arduino or makes own parts at one PCB, here are many examples at market too.

phil31 wrote:
i'm figthing since too long time with all unsolicited message as "busy...", "fail", "error" .. or WDT reboot ..


which standard fw version you are use?
do you use RTOS or SDK AT or Manufacturer AT that is given at Modules?
can you tell more about the last steps?

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.


Ok, which support you wish in your web server, have you test example esphttpd for a try? is this helpfull to you?
can you post, which host cpu you want to combinied with your esp modul and which your favorite?
example with arduino there are be many examples to download or for the pic ( 18F2550 , 24FJ..) or other.

which is your favorite and how you get on with µC code for this?
can you post a snipp from your code?

do you include website by sd card or do you generate by µC Code in your µC code?
do you support picture? from sd card, from extern spi flash or other methode?
will you send this by extra sockets or include - example base64 inline's in html - that µC generated HTML code?

here is a litte fw example as snippy code
for study or test.. you can built likewise in your µC Code and combine it with Uart and ESP8266 Modul

example as a firmware snippy:
http://www.mikrocontroller.net/topic/354605#3960467

base64 from picture tool
http://www.heise.de/download/base64-de- ... 58399.html

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);

..





best wishes
rudi ;-)

Statistics: Posted by rudi — Wed Mar 04, 2015 11:35 pm


]]>
2015-03-04T00:26:50+08:00 2015-03-04T00:26:50+08:00 https://bbs.espressif.com:443/viewtopic.php?t=243&p=893#p893 <![CDATA[AT firmware & webserver in external host ...]]>
Is it that I'm the only one wanting to do a web server with an external host CPU and AT firmware ??

i'm figthing since too long time with all unsolicited message as "busy...", "fail", "error" .. or WDT reboot ..
i already order 2 or 3 different modules from competitor and will evaluate it to see if they are more stable at the AT firmware.

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.

best regards to all

Statistics: Posted by phil31 — Wed Mar 04, 2015 12:26 am


]]>