-
• #2
Yes, just checked setIP, getIP() setAPIP() and getAPIP() are not jet implemented for ESP32 implementation.
If you like do the implementation.
-
• #3
Well if it involves CPP code that's a maybe. I've been exploring espruino as an option to writing CPP since CPP is not a language I know very well like node. Still, if it has been done for esp8266 maybe the implementation can more or less be copied.
-
• #4
ESP32 stuff is written in C.
Starting point is jswrap_esp32_network.c and jswrap_esp32_network.h
if it has been done for esp8266 maybe the implementation can more or less be copied.
Not sure about this, because ESP32 is a bit different.
-
• #5
This library from espressif has a config method that accepts static ip as demonstrated in tutorial below.
Can this just be incorporated?
https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/
Alternatively If I can't get to this I'll set up a fixed IP from my DHCP server based on MAC for now.
-
• #6
I guess this is what you are looking for:
// info about the structure typedef struct { ip4_addr_t ip; ip4_addr_t netmask; ip4_addr_t gw; } tcpip_adapter_ip_info_t; // STA calls tcpip_adapter_dhcpc_stop(WIFI_IF_STA); tcpip_adapter_set_ip_info(WIFI_IF_STA, const tcpip_adapter_ip_info_t *ip_info) // AP - calls tcpip_adapter_dhcpc_stop(WIFI_IF_AP); tcpip_adapter_set_ip_info(WIFI_IF_AP, const tcpip_adapter_ip_info_t *ip_info) tcpip_adapter_dhcpc_start(WIFI_IF_AP);
I'm running 2v06 esp32 espruino.
If I read the docs correctly (no options in connect and setIP is unknown) it is not possible at this time to set a static IP (although it seems possible for esp8266)?