Browse Source

Merge branch 'master' into v_master

v_master
Sara Damiano 5 years ago
parent
commit
4df78ef650
4 changed files with 28 additions and 7 deletions
  1. +0
    -1
      .github/ISSUE_TEMPLATE.md
  2. +1
    -1
      README.md
  3. +1
    -1
      src/TinyGsmClientESP8266.h
  4. +26
    -4
      src/TinyGsmClientXBee.h

+ 0
- 1
.github/ISSUE_TEMPLATE.md View File

@ -15,7 +15,6 @@ with your board before submitting any issues.
[ ] Request to support a new module
<!-- Please, consider forking and submitting a pull request! -->
[ ] Bug or problem compiling the library
<!-- NOTE: If you are using an ESP32, you will not be able to compile the HttpClient or HttpsClient examples with ESP32 core >1.0.1. Downgrade to version 1.0.1 or use the WebClient example. Please comment on the issue on the ESP32 core, not in this library: https://github.com/espressif/arduino-esp32/issues/2755 -->
[ ] Bug or issue with library functionality (ie, sending data over TCP/IP)


+ 1
- 1
README.md View File

@ -206,7 +206,7 @@ When using ESP32 `HardwareSerial`, you may need to specify additional parameters
Please [refer to this comment](https://github.com/vshymanskyy/TinyGSM/issues/91#issuecomment-356024747).
#### HttpClient
You will not be able to compile the HttpClient or HttpsClient examples with ESP32 core >1.0.1. Downgrade to version 1.0.1 or use the WebClient example. Please comment on the issue on the ESP32 core, not in this library: https://github.com/espressif/arduino-esp32/issues/2755
You will not be able to compile the HttpClient or HttpsClient examples with ESP32 core 1.0.2. Upgrade to 1.0.3, downgrade to version 1.0.1 or use the WebClient example.
### SAMD21


+ 1
- 1
src/TinyGsmClientESP8266.h View File

@ -388,7 +388,7 @@ protected:
bool modemGetConnected(uint8_t mux) {
sendAT(GF("+CIPSTATUS"));
if (waitResponse(3000, GF("STATUS:")) != 1) return REG_UNKNOWN;
if (waitResponse(3000, GF("STATUS:")) != 1) return false;
int status =
waitResponse(GFP(GSM_ERROR), GF("2"), GF("3"), GF("4"), GF("5"));
if (status != 3) {


+ 26
- 4
src/TinyGsmClientXBee.h View File

@ -203,9 +203,12 @@ public:
virtual uint8_t connected() {
if (available()) {
return true;
// if we never got an IP, it can't be connected
} else if (at->savedIP == IPAddress(0, 0, 0, 0)){
return false;
}
return sock_connected;
// NOTE: We dont't check or return
// NOTE: We don't check or return
// modemGetConnected() because we don't
// want to go into command mode.
// return at->modemGetConnected();
@ -657,13 +660,30 @@ public:
XBEE_COMMAND_END_DECORATOR
if (beeType == XBEE3_LTEM_ATT && intRes == 105) intRes = 0; // tends to reply with "69" when signal is unknown
if (beeType == XBEE_S6B_WIFI) return -93 + intRes; // the maximum sensitivity is -93dBm
else return -1*intRes; // need to convert to negative number
if (beeType == XBEE_S6B_WIFI) {
if (intRes == 0xFF) {
return 0; // 0xFF returned for unknown
} else {
return -93 + intRes; // the maximum sensitivity is -93dBm
}
} else {
return -1*intRes; // need to convert to negative number
}
}
bool isNetworkConnected() {
RegStatus s = getRegistrationStatus();
return (s == REG_OK);
if (s == REG_OK) {
IPAddress ip = localIP();
if (ip != IPAddress(0, 0, 0, 0)) {
return true;
} else {
return false;
}
} else {
return false;
}
}
bool waitForNetwork(unsigned long timeout_ms = 60000L) {
@ -1161,6 +1181,7 @@ public:
// 0x02 = Invalid parameters (bad IP/host)
// 0x12 = DNS query lookup failure
// 0x25 = Unknown server - DNS lookup failed (0x22 for UDP socket!)
// fall through
case 0x02:
case 0x12:
case 0x25: {
@ -1169,6 +1190,7 @@ public:
// If it's anything else (inc 0x02, 0x12, and 0x25)...
// it's definitely NOT connected
// fall through
default: {
sockets[0]->sock_connected = false;
savedOperatingIP = od;


Loading…
Cancel
Save