Fix build

This commit is contained in:
Volodymyr Shymanskyy
2016-12-06 21:13:36 +02:00
parent 02b9e0b320
commit 62e8e9340e
2 changed files with 18 additions and 7 deletions

View File

@@ -41,8 +41,8 @@
#endif
#define GSM_NL "\r\n"
static constexpr char GSM_OK[] GSM_PROGMEM = "OK" GSM_NL;
static constexpr char GSM_ERROR[] GSM_PROGMEM = "ERROR" GSM_NL;
static const char GSM_OK[] GSM_PROGMEM = "OK" GSM_NL;
static const char GSM_ERROR[] GSM_PROGMEM = "ERROR" GSM_NL;
class TinyGsmClient
: public Client
@@ -88,7 +88,7 @@ public:
host += ip[2];
host += ".";
host += ip[3];
return modemConnect(host.c_str(), port);
return modemConnect(host.c_str(), port); //TODO: c_str may be missing
}
virtual void stop() {
@@ -276,6 +276,18 @@ public:
}
}
bool simUnlock(const char *pin)
{
sendAT(F("+CPIN="), pin);
return waitResponse() == 1;
}
bool simGetCCID() {
sendAT(F("+CCID"));
//TODO...
}
private:
int modemConnect(const char* host, uint16_t port) {
sendAT(F("+CIPSTART="), mux, ',', F("\"TCP"), F("\",\""), host, F("\","), port);