very slow connecting when esp is an access point

danny@cs.huji.ac.il
Posts: 31
Joined: Thu Mar 30, 2017 10:39 am

very slow connecting when esp is an access point

Postby danny@cs.huji.ac.il » Sat Aug 19, 2017 9:57 am

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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: very slow connecting when esp is an access point

Postby kolban » Sat Aug 19, 2017 1:58 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: very slow connecting when esp is an access point

Postby martinayotte » Sat Aug 19, 2017 2:16 pm

In my case, I use telnet to ESP32 for getting into some kind of shell.
I is working instantaneously with any delay !

danny@cs.huji.ac.il
Posts: 31
Joined: Thu Mar 30, 2017 10:39 am

Re: very slow connecting when esp is an access point

Postby danny@cs.huji.ac.il » Sat Aug 19, 2017 3:03 pm

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

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: very slow connecting when esp is an access point

Postby martinayotte » Sat Aug 19, 2017 3:31 pm

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.

danny@cs.huji.ac.il
Posts: 31
Joined: Thu Mar 30, 2017 10:39 am

Re: very slow connecting when esp is an access point

Postby danny@cs.huji.ac.il » Sat Aug 19, 2017 3:43 pm

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.

Who is online

Users browsing this forum: No registered users and 123 guests