PHS module SMA-01 library. see: https://developer.mbed.org/users/phsfan/notebook/abitusbmodem/
Dependencies: Socket lwip-sys lwip
Dependents: AbitUSBModem_HTTPTest AbitUSBModem_MQTTTest AbitUSBModem_WebsocketTest AbitUSBModem_SMSTest
Fork of VodafoneUSBModem by
Diff: ip/PPPIPInterface.h
- 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);