Page 1 of 1
very slow connecting when esp is an access point
Posted: Sat Aug 19, 2017 9:57 am
by danny@cs.huji.ac.il
when configuring the esp32 as an access point, it appears very quickly, selecting it
is also very fast, i.e, the client gets an ip (192.168.4.2), but connecting to
for example via 'telnet 192.168.4.1' takes more than 60s! and yes my app is listening on port 23/tcp
BTW, i'm using esp-idf 3.0
any ideas why?
cheers,
danny
Re: very slow connecting when esp is an access point
Posted: Sat Aug 19, 2017 1:58 pm
by kolban
Can you describe more about the nature of your listening application that you have coded to run on the ESP32 that is listening on the telnet port? Maybe pastebin the code? What is the nature of the machine on which you are running your telnet client? Are you able to run wireshark to examine the network traffic coming and going from the interface of that device to see the network flows? That will tell us if the delay is due to the PC not sending traffic as expected or the ESP32 not responding as expected.
Re: very slow connecting when esp is an access point
Posted: Sat Aug 19, 2017 2:16 pm
by martinayotte
In my case, I use telnet to ESP32 for getting into some kind of shell.
I is working instantaneously with any delay !
Re: very slow connecting when esp is an access point
Posted: Sat Aug 19, 2017 3:03 pm
by danny@cs.huji.ac.il
if the esp is connected to another AP, the telnet connection is very fast.
it's only when the esp is acting as an AP, that connecting to it is very slow,
I will try later to run wireshark.
as to code snip, its pretty standard, it's either started as WIFI_MODE_AP, or WIFI_MODE_STA, the rest of the code
is identical, so the slowness comes from it being an AP or connecting to one.
thanks,
danny
Re: very slow connecting when esp is an access point
Posted: Sat Aug 19, 2017 3:31 pm
by martinayotte
Maybe it is related to DNS calls when AP only where their is no DNS as suggested in
https://esp32.com/viewtopic.php?f=19&p=12952#p12952
Personally, I'm not facing that, but my environment is pretty old, about last April ...
I will install fresh one into another machine and see if this behaviour appears.
Re: very slow connecting when esp is an access point
Posted: Sat Aug 19, 2017 3:43 pm
by danny@cs.huji.ac.il
wireshark did it!! Thanks Neil and Martin
the macbook I am using to connect to the esp, is trying to talk to a dns server to resolve
ip to name, which when connecting to the esp via wireless, has no other connectivity! and
was trying severl resolvers and timing out, till enevtually would give up and connect
anyways.
as soon as I connected the macbook wired nic to the net, it works.