-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UDP only works on certain socket numbers #263
Comments
I'm dealing with the same kind of behaviour: sometime it works, sometimes the callback function isn't called. What is your pin assignment ? |
@beegee-tokyo any thoughts? |
@p0llard and @tve Are there any other sockets/connections in use (TCP, MQTT, REST, ...)??? In other projects with the ESP8266 (pure ESP projects, no Arduino board involved), I got problems if I try to open too many sockets/connections, e.g. HTTP, FTP, TCP server, TCP client and UDP client altogether. The ESP8266 dropped some connections, it seems there is some limitation in the ESP sources regarding the number of sockets that can be used in parallel. I do not have a unit available to debug, because my Uno WiFi is used in one of my projects (using 1 UDP socket and 1 TCP socket). It runs since months without any problems. |
Hi, |
Using Release 3.0.14 Alpha on Arduino UNO WiFi with EL-Client Release v3.0.alpha0.
I have a rather strange issue when running the EL-Client demonstration code for UDP sockets. Essentially, it only sometimes works; quite a lot of the time the serial console will say that it is sending the packet, but never confirms that it has been sent - if this behavior occurs, then it will not stop until after the arduino has been reset several times. Resetting esp-link through the online interface fixes the problem immediately, but a subsequent reset of the Arduino causes the problem again (probably because it results in the next available socket being used).
Upon the successful sending of a packet, I would expect
socketclient_sent_cb
to be called, which sends a command over serial to the Arduino, triggering the callback within the EL-Client library. It seems thatsocketclient_sent_cb
is never being called, as when a packet fails to send we don't see the expected output in the log (see bottom).After 'extensive debugging' (resetting the Arduino several times and looking at the esp-link online debug log), it seems that if the sockets used are 0 or 1, then there usually isn't a problem - normally the packets fail to send if sockets 2 or 3 are used... ...except when it's the otherway around, which happens entirely unpredictably.
In fact, adding an additional UDP socket usually results in only two of them working, normally the ones which are assigned 0 and 1, except sometimes very rarely 1 and 2 will work (or 2 and 3, or 3 and 0). I say usually as one time it worked fine with three sockets, but I haven't been able to reproduce this behaviour.
If only one socket is created, then it will only work if the socket used is socket 0.
Has anyone else experienced this unusual behaviour?
I'm going to try and get my hands on a replacement board, so I'll close the issue if that solves it.EDIT: Have tried on three individual boards, and the exact same behavior occurs - I'm now fairly certain this is a genuine bug in esp-link.Packet Successfully Sent Log:
Packet Send Failure Log:
Notice in the second log the absence of the
Sent
andcmdResponse
entries.The text was updated successfully, but these errors were encountered: