-
Notifications
You must be signed in to change notification settings - Fork 30
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
Problems with first sends using EthernetENC #30
Comments
for longer connect timeout set UIP_CONNECT_TIMEOUT in utility/uipethernet-conf.h you can turn on debugging by uncommenting |
I try to reproduce the problem. I think I am seeing it too, but I thought it is only a slow initialization. I use static IP. But your case shows that DHCP/UDP already works while TCP doesn't. |
Hello. So, it doesn't seem just a matter of time, even waiting a while after Ethernet.begin(mac), the problem happens. If it is the first use of the day or after a long time with the device disconnected the problem does not happen. It only happens if in the sequence the device is turned off and on or restarted, I have the impression that there is some "dirt" from the previous connection. |
it couldn't replicate your problem. the client always connects. is the MAC address and IP address you unique? |
Yes |
Good evening, can anyone help me?
I'm using this LIB in a project where I have some buttons connected to the arduino and whenever someone presses a button I consump an API to inform the pressed button, it works fine, but I'm facing a strange problem, below is an example code:
It turns out that when connecting the arduino for the first time everything works normally, if I restart the arduino the first uploads give an error (randomly it can happen from the first to the sixth upload does not work), after that it stabilizes and all uploads work normally. I couldn't find the logic behind it.
Apparently if I comment out "clientLAN.stop();", "clientLAN.read()" and the API doesn't return anything, it doesn't. The API only returns the processing date.
Analyzing the LIB EthernetClient.ccp I arrived at this function:
As I understand it, in the first submissions it does not enter this IF:
if ((conn->tcpstateflags & UIP_TS_MASK) == UIP_ESTABLISHED)
I've tried to increase the TimeOut (clientLAN.setTimeout(10000);) of the connection, but without success.
Does anyone have any idea what it could be?
I use EthernetENC version 2.0.2.
Evidence:
The text was updated successfully, but these errors were encountered: