Vodafone K3770/K3772-Z modems driver & networking library

Dependencies:   Socket USBHostWANDongle lwip-sys lwip

Dependents:   VodafoneUSBModemHTTPClientTest VodafoneUSBModemNTPClientTest VodafoneUSBModemSMSTest VodafoneUSBModemUSSDTest ... more

Fork of VodafoneUSBModem_bleedingedge by Donatien Garnier

This is the driver for the Vodafone K3700 & K3772-Z Dongles:

K3770

More details and instructions can be found here.

Revision:
26:d37501dc6c61
Parent:
22:06fb2a93a1f6
Child:
27:37d3ac289e86
--- a/VodafoneUSBModem.h	Wed Aug 29 15:49:14 2012 +0000
+++ b/VodafoneUSBModem.h	Wed Aug 29 16:28:13 2012 +0000
@@ -36,9 +36,9 @@
 {
 public:
   /** Create Vodafone USB Modem (K3770/K3772-Z) dongle API instance
-
+      @param powerGatingPin Optional pin commanding a power gating transistor on the modem's power line 
    */
-  VodafoneUSBModem();
+  VodafoneUSBModem(PinName powerGatingPin = NC);
 
   //Internet-related functions
 
@@ -92,11 +92,20 @@
   int getLinkState(int* pRssi, LinkMonitor::REGISTRATION_STATE* pRegistrationState, LinkMonitor::BEARER* pBearer);  
 
   /** Get the ATCommandsInterface instance
-     @return Pointer to the ATCommandsInterface instance
+    @return Pointer to the ATCommandsInterface instance
    */
   ATCommandsInterface* getATCommandsInterface();
+  
+  /** Switch power on or off
+    In order to use this function, a pin name must have been entered in the constructor
+    @param enable true to switch the dongle on, false to switch it off
+    @return 0 on success, error code on failure
+  */
+  int power(bool enable);
 
 protected:
+  bool power();
+
   int init();
 
 private:
@@ -119,6 +128,8 @@
   bool m_ussdInit;
   bool m_linkMonitorInit;
   bool m_atOpen;
+  
+  PinName m_powerGatingPin;
 };