ESP32 AP mode, get TCP client hostname for TLS

Viktor
Posts: 10
Joined: Mon Nov 30, 2020 10:48 am

ESP32 AP mode, get TCP client hostname for TLS

Postby Viktor » Thu Jun 03, 2021 6:17 am

Hi.
I want to implement ESP32 working in Access Point (AP) mode and create TLS-PSK TCP server on ESP32 side. I see that I need to use esp_tls_conn_new_async (or _sync, no matter). I see that hostname should be passed as a parameter.
1) Is it a hostname of the client connected to ESP32?
2) How can I get that hostname for TCP client connected to ESP32 in AP mode? Is it possible at all?
As I see, somebody else was looking for the gethostbyaddr implementation: viewtopic.php?t=3148
When I pass ESP32 hostname or even empty string to esp_tls_conn_new_async, it fails during resolving hostname: getaddrinfo().

Who is online

Users browsing this forum: Baidu [Spider] and 256 guests