Giter VIP home page Giter VIP logo

Comments (7)

bportaluri avatar bportaluri commented on August 10, 2024

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.

joysfera avatar joysfera commented on August 10, 2024

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.

joysfera avatar joysfera commented on August 10, 2024

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.

bportaluri avatar bportaluri commented on August 10, 2024

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.

joysfera avatar joysfera commented on August 10, 2024

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.

joysfera avatar joysfera commented on August 10, 2024

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.

bportaluri avatar bportaluri commented on August 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.