Fix build
This commit is contained in:
@@ -32,13 +32,12 @@ install:
|
|||||||
#
|
#
|
||||||
# Libraries from PlatformIO Library Registry:
|
# 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/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
|
# 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:
|
script:
|
||||||
- platformio ci --lib="." $PLATFORMIO_CI_ARGS
|
- platformio ci --lib="." $PLATFORMIO_CI_ARGS
|
||||||
|
@@ -41,8 +41,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GSM_NL "\r\n"
|
#define GSM_NL "\r\n"
|
||||||
static constexpr char GSM_OK[] GSM_PROGMEM = "OK" GSM_NL;
|
static const char GSM_OK[] GSM_PROGMEM = "OK" GSM_NL;
|
||||||
static constexpr char GSM_ERROR[] GSM_PROGMEM = "ERROR" GSM_NL;
|
static const char GSM_ERROR[] GSM_PROGMEM = "ERROR" GSM_NL;
|
||||||
|
|
||||||
class TinyGsmClient
|
class TinyGsmClient
|
||||||
: public Client
|
: public Client
|
||||||
@@ -88,7 +88,7 @@ public:
|
|||||||
host += ip[2];
|
host += ip[2];
|
||||||
host += ".";
|
host += ".";
|
||||||
host += ip[3];
|
host += ip[3];
|
||||||
return modemConnect(host.c_str(), port);
|
return modemConnect(host.c_str(), port); //TODO: c_str may be missing
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void stop() {
|
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:
|
private:
|
||||||
int modemConnect(const char* host, uint16_t port) {
|
int modemConnect(const char* host, uint16_t port) {
|
||||||
sendAT(F("+CIPSTART="), mux, ',', F("\"TCP"), F("\",\""), host, F("\","), port);
|
sendAT(F("+CIPSTART="), mux, ',', F("\"TCP"), F("\",\""), host, F("\","), port);
|
||||||
|
Reference in New Issue
Block a user