Comments (7)
Hi Peter,
thank you for your interest in WiFiEsp.
I know about this issue. It is not very easy to deal with AT commands through serial but I think this can be fixed.
I'm currently working on another important rework. I'm making the WiFi object static as in the original WiFi library to improve compatibility with existing Arduino sketches based on WiFi and Ethernet libraries.
Stay tuned
from wifiesp.
Well, I think the +IPD was simply not expected thus not handled. I believe that you need to search for the ESC sequence starting with '+' in incoming data and then parse out the IPD and recognize a new connection is coming. Currently it is just echoed from input to output like an ordinary data. Somewhere the +IPD check is missing, not exactly sure where, I am not familiar with the code yet.
from wifiesp.
Bruno, I have found the following pretty insightful discussion with possible suggestions for "mixed data streams": Diaoul/arduino-ESP8266#15 and Diaoul/arduino-ESP8266#14
Maybe you can get inspired there, too.
from wifiesp.
Hi Petr,
can you please try the latest version it should better handle multiple client connections.
There are still some problems but they seems to be related to ESP serial buffer and not to my library.
I'm still trying to understand where the problems are.
I'm also planning to move to the new AT firmware. What ESP firmware version are you using?
from wifiesp.
I have just tested the latest github source and I can't see any improvement. The Chrome asking for favicon.ico is still not handled correctly - the +IPD is printed as an output text instead of being parsed and subsequent data handled as a new connection. Second connection (say from a different browser) causes the first one to time out and die so it's highly unstable in this regard.
For reference, I use SoftwareSerial and the firmware is 0018000902-AI03. I am not exactly into upgrading the firmware because I heard that the newer one (0022xxxx) has worse WiFi stability and some crucial command is broken.
This guy ("taoyuan") forked "arduino-ESP8266" here on github and implemented something that looks like a working approach to handle the +IPD in incoming data stream. Please check this out: taoyuan/arduino-ESP8266@ac5372c
However, neither his version passes the Chrome "test" (two concurrent connections) on my setup.
I am wondering if it is possible to handle it at all using the AT commands set.
from wifiesp.
Bruno, this is important: I have just increased SoftwareSerial's buffer size from 64 to 254 bytes and things are much better now! The +IPD is correctly handled now, it seems! At least Google Chrome requesting "/" and "/favicon.ico" at the same time no longer causes issues. Great work.
However, visiting the web server from second client (no matter if from localhost or a different machine) AT THE SAME TIME causes the first one to lose connection and bad things happen - like for example the web page on the first client contains AT commands "AT+CIPCLOSE=0". This is something I don't quite understand. Is it another issue caused by SoftwareSerial library? Or ESP8266's serial buffer?
I'm willing to risk upgrading the firmware of my ESP8266 if it's going to help resolve these web server issues.
from wifiesp.
I have released a new release working with the new firmware.
Can you give it a try?
I think the multiple connections problem is still present.
I will open another issue on GitHub to track it.
from wifiesp.
Related Issues (20)
- How can I get data? HOT 5
- consumption time of an API (600ms) HOT 30
- UDP->remotePort() returns incorrect value HOT 3
- UDP link is not valid HOT 4
- REST API Post request to microsoft power bi real time data set HOT 1
- ESP8266 Crashes After UDP Packet Overload HOT 2
- ESP-Now with WiFiEsp library on ESP8266-01 interfaced to Arduino Uno HOT 2
- Connect to Firebase Database using WiFiESP
- The use of Delay() HOT 10
- TIMEOUT in same position every time on large HTTP header HOT 2
- WiFiEsp: Send Post message from Arduino Mega + ESP-01 issue HOT 8
- RingBuffer namespace collision with other libraries
- WebClient example doesn't work anymore
- Invalid "ClientSSL " connection directive HOT 5
- DDNS HOT 1
- Problem with the WebClientSSL example
- Can someone help with TMRpcm.h conflict HOT 1
- UDP + WiFiEspServer
- Async web client HOT 6
- Hardware serial tutorial needed !! Help !! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifiesp.