File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545#define NORMAL_MODE " AT+CFUN=1,1\r\n "
4646#define REGISTRATION_STATUS " AT+CREG?\r\n "
4747#define SIGNAL_QUALITY " AT+CSQ\r\n "
48+ #define SLEEP_MODE " AT+CSCLK=1\r\n "
4849
4950#define OK " OK\r\n "
5051#define DOWNLOAD " DOWNLOAD"
@@ -155,6 +156,14 @@ Result HTTP::get(const char *uri, char *response) {
155156 return result;
156157}
157158
159+ void HTTP::sleep (){
160+ sendCmdAndWaitForResp (SLEEP_MODE, OK, 2000 );
161+ }
162+
163+ void HTTP::wakeUp (){
164+ if (sendATTest () != TRUE ) preInit ();
165+ }
166+
158167Result HTTP::setHTTPSession (const char *uri){
159168
160169 Result result;
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ class HTTP : public SIM800 {
5959 Result disconnect ();
6060 Result get (const char *uri, char *response);
6161 Result post (const char *uri, const char *body, char *response);
62+ void sleep ();
63+ void wakeUp ();
6264
6365 private:
6466 void readResponse (char *response);
You can’t perform that action at this time.
0 commit comments