I don't know of a convenient way to configure the softAP IP, but you can change the gateway address by modifying the IDF code:
Code: Select all
diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c
index 8198cb344..d5ed71073 100644
--- a/components/tcpip_adapter/tcpip_adapter_lwip.c
+++ b/components/tcpip_adapter/tcpip_adapter_lwip.c
@@ -106,8 +106,8 @@ void tcpip_adapter_init(void)
memset(esp_ip, 0, sizeof(tcpip_adapter_ip_info_t)*TCPIP_ADAPTER_IF_MAX);
memset(esp_ip_old, 0, sizeof(tcpip_adapter_ip_info_t)*TCPIP_ADAPTER_IF_MAX);
- IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].ip, 192, 168 , 4, 1);
- IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].gw, 192, 168 , 4, 1);
+ IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].ip, 10, 7, 42, 1);
+ IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].gw, 10, 7, 42, 1);
IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].netmask, 255, 255 , 255, 0);
ret = sys_sem_new(&api_sync_sem, 0);
if (ERR_OK != ret) {
As for how to inform the client... perhaps you can just hard-code the IP in the client? Or you can have the client check the gateway address, and assume that the ESP32 is the gateway.