Hello,
I'm now playing with ESP32 (NANO32). Successfully setup Arduino environment for ESP32.
So, When I trying WiFiClient example. I can connected to my local host for a first time. But when I try to connect it again it always failed and afterward. Below is error what I got.
[E][WiFiClient.cpp] connect(): lwip_connect_r: 113
Can you guide me, where I have to check or what have I done wrong?
Thank you so much...
WiFiClient connection error
Re: WiFiClient connection error
Congrats on getting it working ... awesome. Might you have a few minutes to post what you did in case someone in the future has the problem and finds this post?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: WiFiClient connection error
I have the same problem, how can it be solved?
Re: WiFiClient connection error
I discovered part of the problem, I was trying to connect to my own server that I have in a raspberry, every 5 times that the esp tried to connect only managed to connect 1 time, on another linux server if it is able to connect every time well.
Anyone know why with the raspberry does not connect well to the server?
thanks in advance
Anyone know why with the raspberry does not connect well to the server?
thanks in advance
Re: WiFiClient connection error
I think I solved this problem with an interesting finding. I had much from Mr.Kolban's book on ESP32 in my first steps. So I think I owe Mr.Kolban to share my finding:
All of a sudden I started having these Error messages:
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:270] _eventCallback(): Reason: 201 - AUTH_FAIL
Sensors count: 2
21.937C,
[E][WiFiClient.cpp:97] connect(): lwip_connect_r: 118
21.812C,
[E][WiFiClient.cpp:97] connect(): lwip_connect_r: 118
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:270] _eventCallback(): Reason: 201 - AUTH_FAIL
Sensors count: 2
Whatever suggestion I found, I tried but no luck. I copied people's suggested code to solve this problem in a new sketch and faced no problem. But copied the code into my sketch, problem appeared again. Then I started a new sketch totally from begining. It worked without error.
Then I decided to find out the differences between my long sketch and the new one. After spending few sleepless days, here is my finding:
When I start a new sketch from begining, by default is not in debug mode. Howewer in my original sketch it is, to see what is going on.
So, switching "tools->Core Debug Level" to "None" solved my problem. Tested my finding by playing the "Core Debug Level" with all possibilities, proved me that: problem disappears only in "None"
I can neither understand nor explain the relation among them. But this solves my problem. I hope this helps other people, too.
Kindest Regards to Mr. Kolban.
Yavuz Darendelioğlu
All of a sudden I started having these Error messages:
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:270] _eventCallback(): Reason: 201 - AUTH_FAIL
Sensors count: 2
21.937C,
[E][WiFiClient.cpp:97] connect(): lwip_connect_r: 118
21.812C,
[E][WiFiClient.cpp:97] connect(): lwip_connect_r: 118
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:270] _eventCallback(): Reason: 201 - AUTH_FAIL
Sensors count: 2
Whatever suggestion I found, I tried but no luck. I copied people's suggested code to solve this problem in a new sketch and faced no problem. But copied the code into my sketch, problem appeared again. Then I started a new sketch totally from begining. It worked without error.
Then I decided to find out the differences between my long sketch and the new one. After spending few sleepless days, here is my finding:
When I start a new sketch from begining, by default is not in debug mode. Howewer in my original sketch it is, to see what is going on.
So, switching "tools->Core Debug Level" to "None" solved my problem. Tested my finding by playing the "Core Debug Level" with all possibilities, proved me that: problem disappears only in "None"
I can neither understand nor explain the relation among them. But this solves my problem. I hope this helps other people, too.
Kindest Regards to Mr. Kolban.
Yavuz Darendelioğlu
-
- Posts: 3
- Joined: Wed Dec 06, 2017 9:29 am
Re: WiFiClient connection error
Hi bioyavuz
Thank you for this suggestion. I had the same issues as gearwalker, but I am still not able to solve it.
I tried your suggestion and it did not work either. I believe, that changing the core debug level to "None" does not affect this issue, because the error will not be sent to the Serial monitor, but it still occurs.
I am really interested in the solution of gearwalker...
Cheers
Thank you for this suggestion. I had the same issues as gearwalker, but I am still not able to solve it.
I tried your suggestion and it did not work either. I believe, that changing the core debug level to "None" does not affect this issue, because the error will not be sent to the Serial monitor, but it still occurs.
I am really interested in the solution of gearwalker...
Cheers
Who is online
Users browsing this forum: No registered users and 100 guests