Reference   Language | Libraries | Comparison | Changes

WiFiNINA : WiFi class

setTimeout()

Description

Sets the connection timeout value in milliseconds for WiFi.begin(...).

Syntax

WiFi.setTimeout(timeout)

Parameters

timeout - the connection timeout value in milliseconds

Returns

Nothing

Example


 WiF.setTimeout(120 * 1000);

  // attempt to connect to Wifi network:
  while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
  }



See Also



Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.