Network Connectivity Issues & Interesting Observations

Hello,

I have recently been trying to establish network connectivity with my Spark Core & other devices/networks and have been experiencing some issues. Initially the objective was to verify that that the Core can reach other devices & networks. This was attempted by sending ICMP packets to:

  • Google - Successful (5/5)
  • Router - Successful (5/5)
  • Server - Failed (0/5)

For some reason the Core can’t reach the server. In an attempt to alleviate this issue i attempted to PING the server through the use of different means. As the following code suggests i have simply tried to PING the server using different methods, all which initially fail.

  • BYTE - Fail (0/5)
  • IPAddress(server) - Fail (0/5)
  • IPAddress(10,1,1,2) - Fail (0/5)

However i have noticed something quite unusual which somehow allows the Core to PING the server. Whist the Core was running the PING requests in the loop and failing, i attempted to PING the Core through the server which also failed. However once the server stopped trying to PING the core, the Core was able to successfully PING the server with exceptions:

  • BYTE - Successful (5/5)
  • IPAddress(server) - Fail (0/5)
  • IPAddress(10,1,1,2) - Successful (5/5)

I am not sure why the Core just starts working and why ‘IPAddress(server)’ fails.

Sorry if this was confusing.

byte server[]       = {10,1,1,2};
IPAddress server2   = (10,1,1,2);

void setup()
{
    Serial.begin(9600);
   
    while(!Serial.available()) SPARK_WLAN_Loop();
   
    Serial.println("Control Device 1 - Serial Monitor\n");
 
}

void loop() 
{
    delay(10000);
     
    Serial.print("Server Connectivity (BYTE) = ");
    Serial.println(Network.ping(server));
    
    Serial.print("Server Connectivity (IPAD) = ");
    Serial.println(Network.ping(server2));
    
    Serial.print("Server Connectivity (RAWA) = ");
    Serial.println(Network.ping(IPAddress(10,1,1,2)));
}