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:
79:a6ac8206a58d
Parent:
22:06fb2a93a1f6
--- a/ip/PPPIPInterface.h	Wed Dec 19 09:32:58 2012 +0000
+++ b/ip/PPPIPInterface.h	Wed Jan 09 16:13:50 2013 +0000
@@ -25,6 +25,7 @@
 #include "LwIPInterface.h"
 
 #include "lwip/sio.h"
+#include "at/ATCommandsInterface.h"
 
 namespace rtos {
 class Semaphore;
@@ -37,11 +38,15 @@
 class PPPIPInterface : public LwIPInterface
 {
 public:
-    PPPIPInterface(IOStream* pStream);
+    PPPIPInterface(IOStream* pStream, IOStream* atStream, ATCommandsInterface* pIf, bool hangupViaATPort);
+    ATCommandsInterface* m_pIf;
     virtual ~PPPIPInterface();
 
     int init(); //Init PPP-specific stuff, create the right bindings, etc
     int setup(const char* user, const char* pw); //Setup authentication
+    
+    // should the modem hangup via AT port or PPP port? true for AT port
+    void setHangupViaATPort(bool val);
     virtual int connect();
     virtual int disconnect();
 
@@ -53,8 +58,13 @@
     int m_pppErrCode;
 
     IOStream* m_pStream; //Serial stream
+    
+    IOStream* m_atStream;
     bool m_streamAvail;
-
+    
+    // if this is true, then PPP connection must be terminated using AT virtual serial port 
+    // this is usually because the ppp stream doesn't support +++ escape sequence
+    bool m_hangupViaATPort;
     int m_pppd;
 
     friend u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len);