Browse Source

Minor changes to 5360

v_master
Sara Damiano 5 years ago
parent
commit
afa5d1b38d
5 changed files with 15 additions and 14 deletions
  1. +1
    -0
      README.md
  2. +1
    -1
      library.json
  3. +1
    -1
      library.properties
  4. +11
    -11
      src/TinyGsmClientSIM5360.h
  5. +1
    -1
      src/TinyGsmCommon.h

+ 1
- 0
README.md 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


+ 1
- 1
library.json 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":


+ 1
- 1
library.properties 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.


+ 11
- 11
src/TinyGsmClientSIM5360.h View File

@ -199,11 +199,7 @@ TINY_GSM_MODEM_GET_INFO_ATI()
if (!testAT()) { if (!testAT()) {
return false; return false;
} }
sendAT(GF("+CFUN=0"));
if (waitResponse(10000L) != 1) {
return false;
}
sendAT(GF("+CFUN=1,1"));
sendAT(GF("+REBOOT"));
if (waitResponse(10000L) != 1) { if (waitResponse(10000L) != 1) {
return false; return false;
} }
@ -212,18 +208,23 @@ 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;
} }
delay(3000); delay(3000);
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))) {
int nl = data.lastIndexOf(GSM_NL, data.length()-8);
int coma = data.indexOf(',', nl+2);
int mux = data.substring(nl+2, coma).toInt();
} else if (data.endsWith(GF("+IPCLOSE:"))) {
int mux = stream.readStringUntil(',').toInt();
streamSkipUntil('\n'); // Skip the reason code
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;
} }


+ 1
- 1
src/TinyGsmCommon.h 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"


Loading…
Cancel
Save