Browse Source

Fix build

v_master
Volodymyr Shymanskyy 8 years ago
parent
commit
62e8e9340e
2 changed files with 18 additions and 7 deletions
  1. +3
    -4
      .travis.yml
  2. +15
    -3
      TinyGsmClient.h

+ 3
- 4
.travis.yml View File

@ -32,13 +32,12 @@ install:
#
# Libraries from PlatformIO Library Registry:
#
# http://platformio.org/lib/show/415/Blynk
# http://platformio.org/lib/show/419/SimpleTimer
# http://platformio.org/lib/show/89/PubSubClient
# http://platformio.org/lib/show/44/Time
# http://platformio.org/lib/show/415/Blynk
# http://platformio.org/lib/show/1202/CRC32
# http://platformio.org/lib/show/1286/StreamDebugger
- platformio lib -g install 415 419 89 44 1286
- platformio lib -g install 89 415 1202 1286
script:
- platformio ci --lib="." $PLATFORMIO_CI_ARGS

+ 15
- 3
TinyGsmClient.h 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);


Loading…
Cancel
Save