Had to fork with a different name, because of some incompatibility issues.

Dependencies:   MQTT

Revision:
7:b14763b63562
Parent:
5:ea9f483e0294
Child:
8:cb2c98efdca8
--- a/DeviceClient.cpp	Tue May 30 06:36:04 2017 +0000
+++ b/DeviceClient.cpp	Sat Jun 09 23:26:43 2018 +0000
@@ -19,8 +19,13 @@
 #include "MQTTClient.h"
 #include "DeviceClient.h"
 
+static uint32_t linkStatus(void)
+{
+    return (1);
+}
+
 // need a wrapper since K64F and LPC1768 wont have the same name for mii read methods
-#if defined(TARGET_UBLOX_C027) || defined(TARGET_K64F)
+#if defined(TARGET_UBLOX_C027) || defined(TARGET_K64F) 
 
 static uint32_t linkStatus(void)
 {
@@ -211,10 +216,14 @@
         WARN("Retry attempt number %d waiting %d\r\n", retryAttempt, timeout);
 
         // enough retry is done - return to application
-        if (retryAttempt == 5)
+        if (retryAttempt == 5){
+        
+            //Here's my modification. If not connected, RESET the board.
+            NVIC_SystemReset();
             return false;
-        else
+        } else {
             wait(timeout);
+        }
     } while(true);
 }