-
Notifications
You must be signed in to change notification settings - Fork 212
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
ENC28J60 stops reacting to network after TCP Retransmission packet #92
Comments
Adding Ethernet.begin(mac) to run once per minute seems to be a valid workaround - it starts to accept network connection again after it. But it probably be interesting to find the core reason ot this... |
I'm pretty sure the TCP-retransmits are symptom, not cause. Enc28J60Ethernet.receivePacket (https://github.com/ntruchsess/arduino_uip/blob/master/utility/Enc28J60Network.cpp#L156) is called from UIPEthernet.tick() (https://github.com/ntruchsess/arduino_uip/blob/master/UIPEthernet.cpp#L168). One would have to put in some debug-code into Enc28J60Ethernet.receivePacket to see what exactly happens there (register EPKTCNT not incrementing any more or receive-status keeps being invalid?) |
I have a potential fix for this issue (and #71 #75 #88 #90): f416bf3 So far test is running fine with WebServer.ino from Ethernet-lib executing 4 requests/sec. To test either checkout UIPEthernet branch 'fix_receive_wraparound' from https://github.com/ntruchsess/arduino_uip/tree/fix_receive_wraparound |
It seems to be more stable with this fix, at least I does not break as fast as it did before. I'll put it for a long-term test to see how it goes. Thank you for very fast reaction and your support. |
Hi!
This is Arduino Pro Micro - this thing has hardware USB and probably some interrupts for working with that. And I use my interrupt for handling ADC converter results. Possibly that some places in the library are not immune to interrupts - that's just my thougths. |
fixed in c37970b |
Hello dear developers, after analyzing Wireshark I realized that UIPEthernet 2.0.7 and ENC28J60 is generating TCP Retransmissions, I am using it with an Arduino Nano. I open a connection with a TCP server and send and receive packets in a period of 20 packets per second, but with UIPEthernet happens from time to time also lose connection to the server, I have other hardware running in this same way PIC24FJ256GB106 and ENC28J60 with the Microchip TCPIP Stack v5.42.08 stack, and the Arduino Shield W5100, and these TCP Restransmissions problems do not occur. What could it be? If you can guide me in something so I can try to discover this bug in the library and be able to send it to you, any help is welcome. Thank you all. |
Hello!
I am using UIPEthernet version 1.07. My arduino sketch implements gets DHCP address and runs one server.
I have 4 clients, that are connecting to that server once per second, send a request, got and answer and disconnect.
It works normally for a few minutes and then ENC28J60 stops to react to incoming TCP connections and also to ARP requests. Arduino code keeps working, it calls Ethernet.maintain(); once per minute and get's 0.
I've made a Wireshark dump of the communication and it looks that this behavour starts when ENC28J60 gets a TCP Retransmission packet. See this image:
It does not happen always, e.g. this retransmission happenned some time before and it did not hang:
I have the complete Wireshark dump file for this session and can sent it or any other information you may require.
The text was updated successfully, but these errors were encountered: