Misc. API

setConnectTimeout

The setConnectTimeout function will set the timeout for the WiFi connection attempt that is done inside autoConnect function. The default value is 30 seconds (30000 milliseconds).

If the device fails to connect to the saved network within the timeout, the autoConnect function will stop trying to connect to the network and will start the captive portal.

API Reference

void setup() {
  ...

  NW.setConnectTimeout(15000);

  ...
}
Previous
setHostname