Browse Source

Merge branch 'master' into v_master

v_master v0.7.9
Sara Damiano 5 years ago
parent
commit
7c06a4cb9a
11 changed files with 51 additions and 20 deletions
  1. +1
    -1
      library.json
  2. +1
    -1
      library.properties
  3. +1
    -0
      src/TinyGsmClientBG96.h
  4. +0
    -2
      src/TinyGsmClientM95.h
  5. +0
    -2
      src/TinyGsmClientMC60.h
  6. +14
    -1
      src/TinyGsmClientSIM7000.h
  7. +19
    -6
      src/TinyGsmClientSIM800.h
  8. +5
    -2
      src/TinyGsmClientSaraR4.h
  9. +1
    -1
      src/TinyGsmClientSequansMonarch.h
  10. +8
    -3
      src/TinyGsmClientUBLOX.h
  11. +1
    -1
      src/TinyGsmCommon.h

+ 1
- 1
library.json View File

@ -1,6 +1,6 @@
{
"name": "TinyGSM",
"version": "0.7.7",
"version": "0.7.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":


+ 1
- 1
library.properties View File

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


+ 1
- 0
src/TinyGsmClientBG96.h View File

@ -552,6 +552,7 @@ protected:
}
waitResponse();
DBG("### READ:", len, "from", mux);
sockets[mux]->sock_available = modemGetAvailable(mux);
return len;
}


+ 0
- 2
src/TinyGsmClientM95.h View File

@ -621,8 +621,6 @@ protected:
streamSkipUntil(','); // skip port
streamSkipUntil(','); // skip connection type (TCP/UDP)
size_t len = stream.readStringUntil('\n').toInt(); // read length
sockets[mux]->sock_available = len;
for (size_t i=0; i<len; i++) {
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
sockets[mux]->sock_available--;


+ 0
- 2
src/TinyGsmClientMC60.h View File

@ -628,8 +628,6 @@ protected:
streamSkipUntil(','); // skip port
streamSkipUntil(','); // skip connection type (TCP/UDP)
size_t len = stream.readStringUntil('\n').toInt(); // read length
sockets[mux]->sock_available = len;
for (size_t i=0; i<len; i++) {
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
sockets[mux]->sock_available--;


+ 14
- 1
src/TinyGsmClientSIM7000.h View File

@ -181,7 +181,20 @@ public:
}
String getModemName() {
return "SIMCom SIM7000";
String name = "SIMCom SIM7000";
sendAT(GF("+GMM"));
String res2;
if (waitResponse(1000L, res2) != 1) {
return name;
}
res2.replace(GSM_NL "OK" GSM_NL, "");
res2.replace("_", " ");
res2.trim();
name = res2;
DBG("### Modem:", name);
return name;
}
TINY_GSM_MODEM_SET_BAUD_IPR()


+ 19
- 6
src/TinyGsmClientSIM800.h View File

@ -184,16 +184,29 @@ public:
}
String getModemName() {
String name = "";
#if defined(TINY_GSM_MODEM_SIM800)
return "SIMCom SIM800";
name = "SIMCom SIM800";
#elif defined(TINY_GSM_MODEM_SIM808)
return "SIMCom SIM808";
name = "SIMCom SIM808";
#elif defined(TINY_GSM_MODEM_SIM868)
return "SIMCom SIM868";
name = "SIMCom SIM868";
#elif defined(TINY_GSM_MODEM_SIM900)
return "SIMCom SIM900";
name = "SIMCom SIM900";
#endif
return "SIMCom SIM800";
sendAT(GF("+GMM"));
String res2;
if (waitResponse(1000L, res2) != 1) {
return name;
}
res2.replace(GSM_NL "OK" GSM_NL, "");
res2.replace("_", " ");
res2.trim();
name = res2;
DBG("### Modem:", name);
return name;
}
TINY_GSM_MODEM_SET_BAUD_IPR()
@ -269,7 +282,7 @@ TINY_GSM_MODEM_GET_INFO_ATI()
bool poweroff() {
sendAT(GF("+CPOWD=1"));
return waitResponse(GF("NORMAL POWER DOWN")) == 1;
return waitResponse(10000L, GF("NORMAL POWER DOWN")) == 1;
}
bool radioOff() {


+ 5
- 2
src/TinyGsmClientSaraR4.h View File

@ -100,7 +100,7 @@ TINY_GSM_CLIENT_CONNECT_OVERLOADS()
// that it wants from the socket even if it was closed externally.
rx.clear();
at->maintain();
while (sock_available > 0) {
while (sock_connected && sock_available > 0) {
at->modemRead(TinyGsmMin((uint16_t)rx.free(), sock_available), mux);
rx.clear();
at->maintain();
@ -613,6 +613,7 @@ protected:
streamSkipUntil('\"');
waitResponse();
DBG("### READ:", len, "from", mux);
sockets[mux]->sock_available = modemGetAvailable(mux);
return len;
}
@ -628,8 +629,10 @@ protected:
result = stream.readStringUntil('\n').toInt();
// if (result) DBG("### DATA AVAILABLE:", result, "on", mux);
waitResponse();
} else if (res == 3) {
streamSkipUntil('\n'); // Skip the error text
}
if (!result && res != 2 && res != 3) { // Don't check modemGetConnected after an error
if (!result) {
sockets[mux]->sock_connected = modemGetConnected(mux);
}
return result;


+ 1
- 1
src/TinyGsmClientSequansMonarch.h View File

@ -624,7 +624,7 @@ protected:
}
DBG("### Read:", len, "from", mux);
waitResponse();
// sockets[mux % TINY_GSM_MUX_COUNT]->sock_available = modemGetAvailable(mux);
sockets[mux % TINY_GSM_MUX_COUNT]->sock_available = modemGetAvailable(mux);
return len;
}


+ 8
- 3
src/TinyGsmClientUBLOX.h View File

@ -100,7 +100,7 @@ TINY_GSM_CLIENT_CONNECT_OVERLOADS()
// that it wants from the socket even if it was closed externally.
rx.clear();
at->maintain();
while (sock_available > 0) {
while (sock_connected && sock_available > 0) {
at->modemRead(TinyGsmMin((uint16_t)rx.free(), sock_available), mux);
rx.clear();
at->maintain();
@ -501,8 +501,10 @@ TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED()
}
int res = stream.readStringUntil(',').toInt();
int8_t percent = res*20; // return is 0-5
// Wait for final OK
waitResponse();
return res;
return percent;
}
uint8_t getBattChargeState() TINY_GSM_ATTR_NOT_AVAILABLE;
@ -601,6 +603,7 @@ protected:
streamSkipUntil('\"');
waitResponse();
DBG("### READ:", len, "from", mux);
sockets[mux]->sock_available = modemGetAvailable(mux);
return len;
}
@ -616,8 +619,10 @@ protected:
result = stream.readStringUntil('\n').toInt();
// if (result) DBG("### DATA AVAILABLE:", result, "on", mux);
waitResponse();
} else if (res == 3) {
streamSkipUntil('\n'); // Skip the error text
}
if (!result && res != 2 && res != 3) { // Don't check modemGetConnected after an error
if (!result) {
sockets[mux]->sock_connected = modemGetConnected(mux);
}
return result;


+ 1
- 1
src/TinyGsmCommon.h View File

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


Loading…
Cancel
Save