As the title says... Chat on...

User avatar
By Siddhartha
#29571 "The wifi.setmode(wifi.STATION) statement should be done only if we are using a static IP. It should not be used if we use a dynamic IP (i.e. in a DHCP environment)."

Hi, is this statement true ? Please let me know what is the reason behind it ?
User avatar
By dnc40085
#29688 Hello,
That statement would be false.

The function wifi.setmode() is used to select between different modes of operation (STATION, SOFTAP, STATIONAP).
Station mode connects to preexisting wifi networks, SoftAP mode hosts a wifi network, and StationAP mode allows you to connect to an existing wifi network and host a wifi network simultaneously.

However... your statement would apply to the function wifi.sta.setip()