-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Esp8266 IP Address not reachable after a while #2330
Comments
A similar issue #1137 was reported on dec 2015 |
A similar issue also reported in |
As mentioned in me-no-dev/ESPAsyncWebServer#54 I have already tried the approach in the link http://www.esp8266.com/viewtopic.php?p=12809 and its still not working. Now will analyse using wireshark myself |
Wireshark is recieving ARP broadcast from the module every second because of the fix. Here is the packet content. |
For a device to which ARP is responding here is the sequence
|
Found a very interesting thing.
I will look into the arp query responder code in the codebase |
Looks like the arp requests are completely handled by lwIP project which is what this project is depenent on. |
lwip comes from espressif and not me :) I just tweaked some stuff here and there (not broadcast but multicast). Latest lwip is wip :) |
Upgrade to open source Lwip(1.4.1) from 1.3.2 port as suggested by @igrr The module is still responding to ARP requests.. Waiting to see if it stops. |
Can you make a diff between 1.3.2 and 1.4.1 in the part which deals with ARP? Maybe we can backport the fix instead of updating all of lwip for now. |
Stopped responding to ARP requests on 1.4.1 as well. 51056 1693.352539 Espressi_88:7f:7e Broadcast ARP 42 Gratuitous ARP for 192.168.1.12 (Request) |
How ever restarting the module takes a new ip address and it starts responding to ARP requests. |
Now I am seeing that the IP Address is also in use by another device which is obvious as ESP didn't respond to ARP request. But ESP has been sending gratuitous ARP and here is the wire shark capture 5495591 37123.051429 00:e1:40:46:09:6c Broadcast ARP 42 Gratuitous ARP for 192.168.1.5 (Request) (duplicate use of 192.168.1.5 detected!) |
This is not an issue with ARP as most people have pointed out. This has something to do with the wireless connectivity stability. I see debug logs right after the module stops responding to ARP saying This seems to be the root cause. I have attached the full log here. |
Attaching Enums that the event numbers point to Arduino/tools/sdk/include/user_interface.h Line 368 in db5e20f
Both map to same enum values.. |
What make, model and firmware is your AP? Have you tried a different brand or model of wifi AP? they are not all equal by far.
|
So you think the wifi connectivity instability lead to the inability of responding ARP broadcast requests? |
@ClaudioHutte You are partially right. Here are my observations
Log
Just to explain my setup I have 2 esp8266 12 f modules
I have attached the complete log to the link |
I never tested two units as you done, though I incurred into the same troubles with ESP8266-12 and a TP-link router located quite far (two stories below mine). I would like to do some tests the same way you've done, but I will be busy into other works for the next two weeks. |
Before you mentioned about the gratuitous ARP i hadn't added it into the code base. Even then the module stopped responding like we discussed here me-no-dev/ESPAsyncWebServer#54 But i haven't collected the logs without Gratuitous ARP but I'm sure its the same issue though. For the module to eventually stop responding it always take 36 hours + . |
By upgrading to SDK 2.1.0 #3215 this problem will be solved. |
I tried new sdk and still have arp issue. |
I also have this same issue. |
Can you ping the ESP from the router itself?
It looks like the arp issue.
Have you eliminated the access-point/router as being the cause by trying a different make/model?
… On Jun 25, 2017, at 2:21 AM, Vijay ***@***.***> wrote:
I also have this same issue.
I am using a webserver on the ESP which connects to my router in the STA mode. The router assigns a fix IP to the ESP (192.168.1.54). All works good but after some time (typically a few hours to a day) the ESP webserver stops responding. I tried pinging the IP address at this point and its unreachable. To see memory footprint I added log calls within the ESP which calls a googlesheet URL and logs all relevant info. All that keeps working fine. Memory foot print is also normal. So while my ESP is able to reach the internet it's IP address is not reachable from within the local network.
If I reset my ESP or turn my modem ON/OFF (to again assign the IP address) the issue goes away for a few hours.
I have tried the simple webserver from the examples and it behaves the same way so my program is not what is causing this. I have also tried this on a SONOFF,Electrodragon ESP relay module, ESP 01 module , ESP 12E module - they all behave the same.
Can somebody guide me on what should I be looking at here,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#2330 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AKy2zuT0ObFwq_Fiv_pkoVam4IsGv3hIks5sHiadgaJpZM4JVNL1>.
|
Hi @mtnbrit , I am in the process of trying out a different router, will a few days to verify this. |
@cziter15 @TD-er Try adding |
I am using 2.5.0 version from Boards Manager because versions above that give me a BSOD when I try to upload the sketch. (And I'm too exhausted to look into the root of the problem). |
@pouriap this is only part of the fix, the last part (I hope). The rest was merged after 2.5.2. That means that pulling just these files into your version won't make a meaningful test. |
@devyte If I clone ChocolateFrogsNuts repository and checkout |
It keeps crashing giving me this on serial monitor:
There's a bunch of new options added which I don't understand. I'm using the defaults: ( |
|
@pouriap ISRs being in IRAM has always been a requirement, it's just that we started enforcing it (at least the top level function) recently in 2.5.x. The fact that you hit the message with the newer core means that you aren't complying. |
Deleted previous |
If you are not sure about the ISR functions, you may just build against the (released) core 2.5.2 and try to see if that still gives the same issues. |
Looks and sounds correct. Also, to cover super paranoia, delete the arduino15 dir. |
Deleted Arduino15 dir to cover super paranoia. I'll wait for a few hours/days and see if it goes unresponsive. @TD-er Thanks. Adding |
I wonder, who is answering the ARP requests after the 1st one? The reason I'm asking is this run I just did:
As you can see, I got 12 replies here. I tested only one of my nodes running the PR #6484 to make sure I did not change behavior on the other one running this test. |
@TD-er If you use Wireshark you can make sure who is answering the ARP by looking at the MAC address of the sender. @devyte Is there a specific SKD and lwip version we should use for this test? |
I think testing on 2.2.x+100 with LWIP v2 (Higher Bandwidth or Lower Memory) is expected. @pouriap What DTIM and power saving mode are you using? |
@pouriap The same behavior of "waking up" the ESP was also seen before, but then tested with ping. |
@pouriap The test build here is with, SDK 22y and lwip v2 low mem with a fairly recent git pull, but it shouldn't matter which lwip v2 config you use (low mem, high bandwidth or otherwise). nping --arp is getting 100% response with no extras:
The first 1-15 responses take around 100ms although I've seen up to 250ms, until the esp "wakes up" and replies are mostly about 5ms, with some up to 15ms.
I am running 15dbm RF output on the test - shouldn't make a difference unless your chip is showing other signs of instability but might be worth a try. Oh and those tests above were run against a WEMOS D1 mini that's been running 104 hours without a reset or loss of connectivity. |
Closing via #6484 |
Hi All,
ESP abecomes unavailable after sometime intermittently where it says
Connection to http://192.168.1.4:80 refused
org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.1.4:80 refused
The same happens from the web browser and then it starts working randomly. Checking the logs of the ESP device itself there is no crash.
Am i missing something in the setup of the server which can keep it alive all the time.
I thought this was a webserver problem but it seems like and ESP issue.
Here is the related issue me-no-dev/ESPAsyncWebServer#54
Cheers,
Akash A
The text was updated successfully, but these errors were encountered: