Ping with MKR1010 replies with error code -3

Hi
I am trying to ping 000webhostapp.com.
It worked before, see reply below:
Pinging 000webhostapp.com: SUCCESS! RTT = 200 ms

But now I get error code -3:
(See also below)

Running the pingsketch, the Serial Monitor Displays:

WiFi Firmware Version is : 1.3.0
Please upgrade the firmware "There seems to be a VERSION 1.4.2 ??????"
Attempting to connect to WPA SSID: Netwerk 1
Attempting to connect to WPA SSID: Netwerk 1
You're connected to the network
SSID: Netwerk 1
*Pietxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BSSID: 48:D3:xxxxxxxxxxxxxxxxxxxxx
signal strength (RSSI): -75
Encryption Type: 4

IP address : 192.168.xxxxxxxxxxxxxxxxxx
Subnet mask: 255.255.255.0
Gateway IP : xxxxxxxxxxxxxxxxxxxxxxxxx
MAC address: 24:62:AB:xxxxxxxxxxxxxxx

Connection to the Modem is ok.

USED (appropriate) CODE in my PING Sketch:

#include "arduino_secrets.h"
#include <SPI.h>
#include <WiFiNINA.h>

String hostName = "000webhost.com";
int pingResult;

Loop:
pingResult = WiFi.ping(hostName);

Serial.print("pingResult ");
Serial.println(pingResult);
if (pingResult >= 0)
{
Serial.print("SUCCESS! RTT = ");
Serial.print(pingResult);
Serial.println(" ms");
}
Serial.print("FAILED! Error code: ");
Serial.println(pingResult);
pingResult = WiFi.ping(hostName);
Serial.print("pingResult ");
Serial.println(pingResult);

RESULT Loop in Serial Monitor:
Pinging www.000webhostapp.com: FAILED! Error code: -3

Pinging from my laptop goes ok, so it does not seem that the modem is blocking anything
(See below)

C:\Users\pkdam>ping 000webhostapp.com

Pinging 000webhostapp.com [153.92.0.100] with 32 bytes of data:
Reply from 153.92.0.100: bytes=32 time=123ms TTL=50
Reply from 153.92.0.100: bytes=32 time=122ms TTL=50
Reply from 153.92.0.100: bytes=32 time=122ms TTL=50
Reply from 153.92.0.100: bytes=32 time=122ms TTL=50

Ping statistics for 153.92.0.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 122ms, Maximum = 123ms, Average = 122ms

I found the following Ping Error Codes:

destination unreachable code 0 = net unreachable 1 = host unreachable 2 = protocol unreachable 3 = port unreachable 4 = fragmentation needed and DF set 5 = source route failed

(See) Understand the Ping and Traceroute Commands - Cisco

I use the MKR1010
Arduino IDE (Windows Store 1.8.42.0
Arduino SAMD 1.8.9 // (Used 1.8.10 before, but this sw version has a bug in Updating NiNA FW)
NiNiAFW 1.3.0 // "There seems to be a VERSION 1.4.2 ??????" see also wifi.h
WiFiNiNA librarie by Arduino v 1.8.0
All software newly installed to solve this issue (but with no good results)

This issue came up when I was testing NTPClient timeClient(ntpUDP, "pool.ntp.org");
No reply of EPOCH time nor other time stamps were replied.
Pinging also did not work.
Same error : -3

What do I miss or oversee?
Do I miss a librarie?

Your help will be most appreciated.
Peter Dam
Netherlands

PeterKDam:
Hi
I am trying to ping 000webhostapp.com.
It worked before, see reply below:
Pinging 000webhostapp.com: SUCCESS! RTT = 200 ms

But now I get error code -3:
(See also below)

Running the pingsketch, the Serial Monitor Displays:

WiFi Firmware Version is : 1.3.0
Please upgrade the firmware "There seems to be a VERSION 1.4.2 ??????"
Attempting to connect to WPA SSID: Netwerk 1
Attempting to connect to WPA SSID: Netwerk 1
You're connected to the network
SSID: Netwerk 1
*Pietxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BSSID: 48:D3:xxxxxxxxxxxxxxxxxxxxx
signal strength (RSSI): -75
Encryption Type: 4

IP address : 192.168.xxxxxxxxxxxxxxxxxx
Subnet mask: 255.255.255.0
Gateway IP : xxxxxxxxxxxxxxxxxxxxxxxxx
MAC address: 24:62:AB:xxxxxxxxxxxxxxx

Connection to the Modem is ok.

USED (appropriate) CODE in my PING Sketch:

#include "arduino_secrets.h"
#include <SPI.h>
#include <WiFiNINA.h>

String hostName = "000webhost.com";
int pingResult;

Loop:
pingResult = WiFi.ping(hostName);

Serial.print("pingResult ");
Serial.println(pingResult);
if (pingResult >= 0)

Serial.print("SUCCESS! RTT = ");
Serial.print(pingResult);
Serial.println(" ms");
}
else
{
Serial.print("FAILED! Error code: ");
Serial.println(pingResult);
pingResult = WiFi.ping(hostName);
Serial.print("pingResult ");
Serial.println(pingResult);

RESULT Loop in Serial Monitor:
Pinging www.000webhostapp.com: FAILED! Error code: -3

Pinging from my laptop goes ok, so it does not seem that the modem is blocking anything
(See below)

C:\Users\pkdam>ping 000webhostapp.com

Pinging 000webhostapp.com [153.92.0.100] with 32 bytes of data:
Reply from 153.92.0.100: bytes=32 time=123ms TTL=50
Reply from 153.92.0.100: bytes=32 time=122ms TTL=50
Reply from 153.92.0.100: bytes=32 time=122ms TTL=50
Reply from 153.92.0.100: bytes=32 time=122ms TTL=50

Ping statistics for 153.92.0.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 122ms, Maximum = 123ms, Average = 122ms

I found the following Ping Error Codes:

destination unreachable code 0 = net unreachable 1 = host unreachable 2 = protocol unreachable 3 = port unreachable 4 = fragmentation needed and DF set 5 = source route failed

(See) Understand the Ping and Traceroute Commands - Cisco

I use the MKR1010
Arduino IDE (Windows Store 1.8.42.0
Arduino SAMD 1.8.9 // (Used 1.8.10 before, but this sw version has a bug in Updating NiNA FW)
NiNiAFW 1.3.0 // "There seems to be a VERSION 1.4.2 ??????" see also wifi.h
WiFiNiNA librarie by Arduino v 1.8.0
All software newly installed to solve this issue (but with no good results)

This issue came up when I was testing NTPClient timeClient(ntpUDP, "pool.ntp.org");
No reply of EPOCH time nor other time stamps were replied.
Pinging also did not work.
Same error : -3

What do I miss or oversee?
Do I miss a librarie?

Your help will be most appreciated.
Peter Dam
Netherlands

When I use the IP address, instead of the webname it works ok.
I can even connect with the NTP server and get ping info and time info.
It seems there is a problem with the DNS server.

Anyone an idea?

1 Like

There is a section of the forum dedicated to the MKR system: MKR Family - Arduino Forum

I'm not suggesting that you'll get any more help there, but there may be some discussion on the problem you are facing.

Probem solved.
Reset Router.
revised code line : NTPClient timeClient(ntpUDP)