I’m in trouble because the process stops without a timeout when connecting the WiFi Client.
Homepage sample
Wi-Fi Client Example Code
If you specify an IP address that does not exist in the connection destination HOST name in the code in, the timeout does not occur. If you specify the name of the host (example: “expaa55.com”), a timeout will occur.
Does anyone know how to cause a timeout even if you specify an IP address?
The latest version of the farm is written.
20210519-seeed-ambd-firmware-rpc-v2.1.3
Serial.begin (115200);
delay (1000);
WiFi.mode (WIFI_STA);
WiFi.disconnect ();
delay (2000);
WiFi.begin (ssid, password);
while (WiFi.status ()! = WL_CONNECTED) {
delay (500);
}
const char * host = "192.168.0.10"; // This is blocked. <-NG
//const char * host = "expaa55.com"; // This is timeout. <-OK
WiFiClient client;
if (! client.connect (host, 80)) {
Serial.println ("Connection failed."); // Don't enter here
return;
}