Simple detection for LE910-NA1 modules
Fork of MTS-Cellular by
Diff: Cellular/EasyIP.h
- Revision:
- 56:43205bd2752a
- Parent:
- 52:2cb58398a4f9
- Child:
- 66:8c55e2bf7270
--- a/Cellular/EasyIP.h Mon Aug 11 21:01:50 2014 +0000 +++ b/Cellular/EasyIP.h Wed Aug 13 16:46:10 2014 +0000 @@ -83,22 +83,17 @@ // TCP and UDP Socket related commands // For behavior of the following methods refer to IPStack.h documentation - virtual bool bind(unsigned int port); + virtual bool open(const std::string& address, unsigned int port, Mode mode); - virtual bool isOpen(); virtual bool close(); virtual int read(char* data, int max, int timeout = -1); virtual int write(const char* data, int length, int timeout = -1); - virtual unsigned int readable(); - virtual unsigned int writeable(); /** Pings specified DNS or IP address * Google DNS server used as default ping address * @returns true if ping received alive response else false */ virtual bool ping(const std::string& address = "8.8.8.8"); - virtual std::string getDeviceIP(); - virtual bool setDeviceIP(std::string address = "DHCP"); /** Sets the APN * @@ -109,34 +104,6 @@ */ virtual Code setApn(const std::string& apn); - /** A method for configuring command ehco capability on the radio. This command - * sets whether sent characters are echoed back from the radio, in which case you - * will receive back every command you send. - * - * @param state if true echo will be turned off, otherwise it will be turned on. - * @returns the standard AT Code enumeration. - */ - virtual Code echo(bool state); - - /** This method can be used to trade socket functionality for performance. - * Can disable checking socket closed messages from the data socket, and thus the socket - * will only be visibly closed to the local side if the radio is explicitly checked, or - * the socket is closed by the local side through the use of physical pin manipulation. - * - * Uses the Hayes escape sequence (1 second pause, "+++", 1 second pause) to exit the socket - * connection to check if a received "NO CARRIER" string is from the radio indicating the socket - * has been closed, or is merely part of the data stream. Should not occur very often, however, if - * data carrying the string "NO CARRIER" is going to be transmitted frequently, then the socket should - * be set closeable and physical-socket-closing-means be used instead to reduce the large amount of - * overhead switching from checking the validity of the "NO CARRIER" message being and indication of - * the socket connection being closed. - * - * @param enabled set to true if you want the socket closeable, otherwise false. The default - * is true. - * @returns the standard AT Code enumeration. - */ - virtual Code setSocketCloseable(bool enabled = true); - private: /** Function that sends +++ to the radio to exit data mode * returns true if it successfully exits from online mode, else