Version bump

This commit is contained in:
Sara Damiano
2020-10-30 11:10:24 -04:00
parent 594fd3bdf9
commit 4cfabb14eb
18 changed files with 70 additions and 77 deletions

View File

@@ -25,7 +25,7 @@ with your board before submitting any issues.
Modem: <!-- Brand, model, variant, firmware version, ie Quectel BG96 Revision: BG96MAR02A07M1G -->
Main processor board: <!-- Uno, Zero, ESP32, Particle, etc -->
TinyGSM version: <!-- always try to use the latest (0.10.8) -->
TinyGSM version: <!-- always try to use the latest (0.10.9) -->
Code: <!-- Example name or paste in your code -->
### Scenario, steps to reproduce

View File

@@ -1,6 +1,6 @@
{
"name": "TinyGSM",
"version": "0.10.8",
"version": "0.10.9",
"description": "A small Arduino library for GPRS modules, that just works. Includes examples for Blynk, MQTT, File Download, and Web Client. Supports many GSM, LTE, and WiFi modules with AT command interfaces.",
"keywords": "GSM, AT commands, AT, SIM800, SIM900, A6, A7, M590, ESP8266, SIM7000, SIM800A, SIM800C, SIM800L, SIM800H, SIM808, SIM868, SIM900A, SIM900D, SIM908, SIM968, M95, MC60, MC60E, BG96, ublox, Quectel, SIMCOM, AI Thinker, LTE, LTE-M",
"authors": [

View File

@@ -1,5 +1,5 @@
name=TinyGSM
version=0.10.8
version=0.10.9
author=Volodymyr Shymanskyy
maintainer=Volodymyr Shymanskyy
sentence=A small Arduino library for GPRS modules, that just works.

View File

@@ -191,7 +191,8 @@ class TinyGsmA6 : public TinyGsmModem<TinyGsmA6>,
bool sleepEnableImpl(bool enable = true) TINY_GSM_ATTR_NOT_AVAILABLE;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false)
TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* Generic network functions
@@ -475,7 +476,7 @@ class TinyGsmA6 : public TinyGsmModem<TinyGsmA6>,
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(64);
uint8_t index = 0;
uint8_t index = 0;
uint32_t startMillis = millis();
do {
TINY_GSM_YIELD();
@@ -505,8 +506,8 @@ class TinyGsmA6 : public TinyGsmModem<TinyGsmA6>,
index = 5;
goto finish;
} else if (data.endsWith(GF("+CIPRCV:"))) {
int8_t mux = streamGetIntBefore(',');
int16_t len = streamGetIntBefore(',');
int8_t mux = streamGetIntBefore(',');
int16_t len = streamGetIntBefore(',');
int16_t len_orig = len;
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT && sockets[mux]) {
if (len > sockets[mux]->rx.free()) {
@@ -514,9 +515,7 @@ class TinyGsmA6 : public TinyGsmModem<TinyGsmA6>,
} else {
DBG("### Got: ", len, "->", sockets[mux]->rx.free());
}
while (len--) {
moveCharFromStreamToFifo(mux);
}
while (len--) { moveCharFromStreamToFifo(mux); }
// TODO(?) Deal with missing characters
if (len_orig > sockets[mux]->available()) {
DBG("### Fewer characters received than expected: ",
@@ -537,9 +536,7 @@ class TinyGsmA6 : public TinyGsmModem<TinyGsmA6>,
finish:
if (!index) {
data.trim();
if (data.length()) {
DBG("### Unhandled:", data);
}
if (data.length()) { DBG("### Unhandled:", data); }
data = "";
}
// data.replace(GSM_NL, "/");
@@ -577,7 +574,7 @@ class TinyGsmA6 : public TinyGsmModem<TinyGsmA6>,
protected:
GsmClientA6* sockets[TINY_GSM_MUX_COUNT];
const char* gsmNL = GSM_NL;
const char* gsmNL = GSM_NL;
};
#endif // SRC_TINYGSMCLIENTA6_H_

View File

@@ -684,7 +684,7 @@ class TinyGsmBG96 : public TinyGsmModem<TinyGsmBG96>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientBG96* sockets[TINY_GSM_MUX_COUNT];

View File

@@ -200,7 +200,8 @@ class TinyGsmESP8266 : public TinyGsmModem<TinyGsmESP8266>,
bool sleepEnableImpl(bool enable = true) TINY_GSM_ATTR_NOT_AVAILABLE;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false)
TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* Generic network functions
@@ -317,9 +318,7 @@ class TinyGsmESP8266 : public TinyGsmModem<TinyGsmESP8266>,
// if the status is anything but 3, there are no connections open
waitResponse(); // Returns an OK after the status
for (int muxNo = 0; muxNo < TINY_GSM_MUX_COUNT; muxNo++) {
if (sockets[muxNo]) {
sockets[muxNo]->sock_connected = false;
}
if (sockets[muxNo]) { sockets[muxNo]->sock_connected = false; }
}
return false;
}
@@ -398,9 +397,7 @@ class TinyGsmESP8266 : public TinyGsmModem<TinyGsmESP8266>,
} else {
// DBG("### Got Data: ", len, "on", mux);
}
while (len--) {
moveCharFromStreamToFifo(mux);
}
while (len--) { moveCharFromStreamToFifo(mux); }
// TODO(SRGDamia1): deal with buffer overflow/missed characters
if (len_orig > sockets[mux]->available()) {
DBG("### Fewer characters received than expected: ",
@@ -446,7 +443,7 @@ class TinyGsmESP8266 : public TinyGsmModem<TinyGsmESP8266>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientESP8266* sockets[TINY_GSM_MUX_COUNT];

View File

@@ -407,9 +407,7 @@ class TinyGsmM590 : public TinyGsmModem<TinyGsmM590>,
} else {
DBG("### Got: ", len, "->", sockets[mux]->rx.free());
}
while (len--) {
moveCharFromStreamToFifo(mux);
}
while (len--) { moveCharFromStreamToFifo(mux); }
// TODO(?): Handle lost characters
if (len_orig > sockets[mux]->available()) {
DBG("### Fewer characters received than expected: ",
@@ -465,7 +463,7 @@ class TinyGsmM590 : public TinyGsmModem<TinyGsmM590>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientM590* sockets[TINY_GSM_MUX_COUNT];

View File

@@ -227,7 +227,8 @@ class TinyGsmM95 : public TinyGsmModem<TinyGsmM95>,
return waitResponse() == 1;
}
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false)
TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* Generic network functions
@@ -625,7 +626,7 @@ class TinyGsmM95 : public TinyGsmModem<TinyGsmM95>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientM95* sockets[TINY_GSM_MUX_COUNT];

View File

@@ -222,9 +222,7 @@ class TinyGsmSim5360 : public TinyGsmModem<TinyGsmSim5360>,
if (waitResponse(10000L) != 1) { return false; }
// After booting, modem sends out messages as each of its
// internal modules loads. The final message is "PB DONE".
if (waitResponse(40000L, GF(GSM_NL "PB DONE")) != 1) {
return false;
}
if (waitResponse(40000L, GF(GSM_NL "PB DONE")) != 1) { return false; }
return init();
}
@@ -587,9 +585,7 @@ class TinyGsmSim5360 : public TinyGsmModem<TinyGsmSim5360>,
for (int muxNo = 0; muxNo < TINY_GSM_MUX_COUNT; muxNo++) {
// +CIPCLOSE:<link0_state>,<link1_state>,...,<link9_state>
bool muxState = stream.parseInt();
if (sockets[muxNo]) {
sockets[muxNo]->sock_connected = muxState;
}
if (sockets[muxNo]) { sockets[muxNo]->sock_connected = muxState; }
}
waitResponse(); // Should be an OK at the end
if (!sockets[mux]) return false;
@@ -722,7 +718,7 @@ class TinyGsmSim5360 : public TinyGsmModem<TinyGsmSim5360>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientSim5360* sockets[TINY_GSM_MUX_COUNT];

View File

@@ -764,7 +764,7 @@ class TinyGsmSim7000 : public TinyGsmModem<TinyGsmSim7000>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientSim7000* sockets[TINY_GSM_MUX_COUNT];

View File

@@ -888,7 +888,7 @@ class TinyGsmSaraR4 : public TinyGsmModem<TinyGsmSaraR4>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientSaraR4* sockets[TINY_GSM_MUX_COUNT];

View File

@@ -316,7 +316,8 @@ class TinyGsmSequansMonarch
return waitResponse() == 1;
}
bool setPhoneFunctionality(uint8_t fun, bool reset = false) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool setPhoneFunctionality(uint8_t fun,
bool reset = false) TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* Generic network functions

View File

@@ -236,7 +236,7 @@ class TinyGsmUBLOX : public TinyGsmModem<TinyGsmUBLOX>,
bool factoryDefaultImpl() {
sendAT(GF("+UFACTORY=0,1")); // No factory restore, erase NVM
waitResponse();
return setPhoneFunctionality(16); // Reset
return setPhoneFunctionality(16); // Reset
}
/*
@@ -820,7 +820,7 @@ class TinyGsmUBLOX : public TinyGsmModem<TinyGsmUBLOX>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientUBLOX* sockets[TINY_GSM_MUX_COUNT];

View File

@@ -572,7 +572,8 @@ class TinyGsmXBee : public TinyGsmModem<TinyGsmXBee>,
bool sleepEnableImpl(bool enable = true) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false)
TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* Generic network functions
@@ -1443,7 +1444,8 @@ class TinyGsmXBee : public TinyGsmModem<TinyGsmXBee>,
}
public:
Stream& stream;
Stream& stream;
protected:
GsmClientXBee* sockets[TINY_GSM_MUX_COUNT];
const char* gsmNL = GSM_NL;

View File

@@ -10,7 +10,7 @@
#define SRC_TINYGSMCOMMON_H_
// The current library version number
#define TINYGSM_VERSION "0.10.8"
#define TINYGSM_VERSION "0.10.9"
#if defined(SPARK) || defined(PARTICLE)
#include "Particle.h"

View File

@@ -43,13 +43,11 @@ class TinyGsmGPS {
hour, minute, second);
}
String setGNSSMode(uint8_t mode,bool dpo)
{
return thisModem().setGNSSModeImpl(mode,dpo);
String setGNSSMode(uint8_t mode, bool dpo) {
return thisModem().setGNSSModeImpl(mode, dpo);
}
uint8_t getGNSSMode()
{
uint8_t getGNSSMode() {
return thisModem().getGNSSModeImpl();
}
@@ -68,15 +66,15 @@ class TinyGsmGPS {
* GPS/GNSS/GLONASS location functions
*/
bool enableGPSImpl() TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool disableGPSImpl() TINY_GSM_ATTR_NOT_IMPLEMENTED;
String getGPSrawImpl() TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool getGPSImpl(float* lat, float* lon, float* speed = 0, float* alt = 0,
int* vsat = 0, int* usat = 0, float* accuracy = 0,
int* year = 0, int* month = 0, int* day = 0, int* hour = 0,
int* minute = 0,
int* second = 0) TINY_GSM_ATTR_NOT_IMPLEMENTED;
String setGNSSModeImpl(uint8_t mode,bool dpo) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool enableGPSImpl() TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool disableGPSImpl() TINY_GSM_ATTR_NOT_IMPLEMENTED;
String getGPSrawImpl() TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool getGPSImpl(float* lat, float* lon, float* speed = 0, float* alt = 0,
int* vsat = 0, int* usat = 0, float* accuracy = 0,
int* year = 0, int* month = 0, int* day = 0, int* hour = 0,
int* minute = 0,
int* second = 0) TINY_GSM_ATTR_NOT_IMPLEMENTED;
String setGNSSModeImpl(uint8_t mode, bool dpo) TINY_GSM_ATTR_NOT_IMPLEMENTED;
uint8_t getGNSSModeImpl() TINY_GSM_ATTR_NOT_IMPLEMENTED;
};

View File

@@ -174,7 +174,8 @@ class TinyGsmModem {
bool sleepEnableImpl(bool enable = true) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) TINY_GSM_ATTR_NOT_IMPLEMENTED;
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false)
TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* Generic network functions
@@ -266,15 +267,15 @@ class TinyGsmModem {
}
protected:
inline bool streamGetLength(char* buf, int8_t numChars, const uint32_t timeout_ms = 1000L) {
if (!buf) {
return false;
}
inline bool streamGetLength(char* buf, int8_t numChars,
const uint32_t timeout_ms = 1000L) {
if (!buf) { return false; }
int8_t numCharsReady = -1;
uint32_t startMillis = millis();
while (millis() - startMillis < timeout_ms && (numCharsReady = thisModem().stream.available()) < numChars) {
TINY_GSM_YIELD();
int8_t numCharsReady = -1;
uint32_t startMillis = millis();
while (millis() - startMillis < timeout_ms &&
(numCharsReady = thisModem().stream.available()) < numChars) {
TINY_GSM_YIELD();
}
if (numCharsReady >= numChars) {
@@ -285,8 +286,9 @@ class TinyGsmModem {
return false;
}
inline int16_t streamGetIntLength(int8_t numChars, const uint32_t timeout_ms = 1000L) {
char buf[numChars + 1];
inline int16_t streamGetIntLength(int8_t numChars,
const uint32_t timeout_ms = 1000L) {
char buf[numChars + 1];
if (streamGetLength(buf, numChars, timeout_ms)) {
buf[numChars] = '\0';
return atoi(buf);
@@ -309,8 +311,9 @@ class TinyGsmModem {
return -9999;
}
inline float streamGetFloatLength(int8_t numChars, const uint32_t timeout_ms = 1000L) {
char buf[numChars + 1];
inline float streamGetFloatLength(int8_t numChars,
const uint32_t timeout_ms = 1000L) {
char buf[numChars + 1];
if (streamGetLength(buf, numChars, timeout_ms)) {
buf[numChars] = '\0';
return atof(buf);