USB Host WAN Dongle library

Fork of USBHostWANDongle_bleedingedge by Donatien Garnier

Revision:
16:e1f5ba831485
Parent:
15:25c10b07bb17
Child:
17:b8739fd10faf
--- a/USB3GModule/WANDongle.cpp	Wed Feb 06 16:49:34 2013 +0000
+++ b/USB3GModule/WANDongle.cpp	Sun Feb 10 16:23:31 2013 +0000
@@ -32,6 +32,7 @@
 {
     host = USBHost::getHostInst();
     init();
+    DBG("WANDongle object instantiated. getHostInst method called on USBHost.");
 }
 
 
@@ -126,6 +127,12 @@
             }
           } //if()
       } //if()
+      else
+      {
+        // Looks like the getDevice method failed and returned a null pointer. Maybe there has been a power cut, modem pulled or something to stop the modem.
+        // Lets run the initilise routine again. Next time round the loop we might have a handle to an end point!
+        init();
+      }
   } //for()
   host->unlock();
   return false;