Hi,
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: Select all
..
if(espconn_tcp_get_max_con()!=5) {
espconn_tcp_set_max_con(5);
system_restart(); // ;-) ....
}
to
Code: Select all
..
//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(); // ;-) ....
}