Minor changes to 5360

This commit is contained in:
Sara Damiano
2019-07-17 10:06:03 -04:00
parent 7ff541d27b
commit afa5d1b38d
5 changed files with 15 additions and 14 deletions

View File

@@ -78,6 +78,7 @@ Primary Author/Contributor |[vshymanskyy](https://github.com/vshymanskyy)|[vsh
- Quectel M95 - Quectel M95
- Quectel MC60 ***(alpha)*** - Quectel MC60 ***(alpha)***
- SIMCom SIM7000 ***(alpha)*** - SIMCom SIM7000 ***(alpha)***
- SIMCom SIM5360 ***(alpha)***
### Supported boards/modules ### Supported boards/modules
- Arduino MKR GSM 1400 - Arduino MKR GSM 1400

View File

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

View File

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

View File

@@ -199,11 +199,7 @@ TINY_GSM_MODEM_GET_INFO_ATI()
if (!testAT()) { if (!testAT()) {
return false; return false;
} }
sendAT(GF("+CFUN=0")); sendAT(GF("+REBOOT"));
if (waitResponse(10000L) != 1) {
return false;
}
sendAT(GF("+CFUN=1,1"));
if (waitResponse(10000L) != 1) { if (waitResponse(10000L) != 1) {
return false; return false;
} }
@@ -212,12 +208,12 @@ TINY_GSM_MODEM_GET_INFO_ATI()
} }
bool poweroff() { bool poweroff() {
sendAT(GF("+CPOF=1")); sendAT(GF("+CPOF"));
return waitResponse() == 1; return waitResponse() == 1;
} }
bool radioOff() { bool radioOff() {
sendAT(GF("+CFUN=0")); sendAT(GF("+CFUN=4"));
if (waitResponse(10000L) != 1) { if (waitResponse(10000L) != 1) {
return false; return false;
} }
@@ -225,6 +221,11 @@ TINY_GSM_MODEM_GET_INFO_ATI()
return true; return true;
} }
bool sleepEnable(bool enable = true) {
sendAT(GF("+CSCLK="), enable);
return waitResponse() == 1;
}
/* /*
* SIM card functions * SIM card functions
*/ */
@@ -761,10 +762,9 @@ TINY_GSM_MODEM_STREAM_UTILITIES()
} }
data = ""; data = "";
DBG("### Got Data:", len, "on", mux); DBG("### Got Data:", len, "on", mux);
} else if (data.endsWith(GF("CLOSED" GSM_NL))) { } else if (data.endsWith(GF("+IPCLOSE:"))) {
int nl = data.lastIndexOf(GSM_NL, data.length()-8); int mux = stream.readStringUntil(',').toInt();
int coma = data.indexOf(',', nl+2); streamSkipUntil('\n'); // Skip the reason code
int mux = data.substring(nl+2, coma).toInt();
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT && sockets[mux]) { if (mux >= 0 && mux < TINY_GSM_MUX_COUNT && sockets[mux]) {
sockets[mux]->sock_connected = false; sockets[mux]->sock_connected = false;
} }

View File

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