Merge branch 'master' into v_master
This commit is contained in:
1
.github/ISSUE_TEMPLATE.md
vendored
1
.github/ISSUE_TEMPLATE.md
vendored
@@ -15,7 +15,6 @@ with your board before submitting any issues.
|
|||||||
[ ] Request to support a new module
|
[ ] Request to support a new module
|
||||||
<!-- Please, consider forking and submitting a pull request! -->
|
<!-- Please, consider forking and submitting a pull request! -->
|
||||||
[ ] Bug or problem compiling the library
|
[ ] 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)
|
[ ] Bug or issue with library functionality (ie, sending data over TCP/IP)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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).
|
Please [refer to this comment](https://github.com/vshymanskyy/TinyGSM/issues/91#issuecomment-356024747).
|
||||||
|
|
||||||
#### HttpClient
|
#### 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
|
### SAMD21
|
||||||
|
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ protected:
|
|||||||
|
|
||||||
bool modemGetConnected(uint8_t mux) {
|
bool modemGetConnected(uint8_t mux) {
|
||||||
sendAT(GF("+CIPSTATUS"));
|
sendAT(GF("+CIPSTATUS"));
|
||||||
if (waitResponse(3000, GF("STATUS:")) != 1) return REG_UNKNOWN;
|
if (waitResponse(3000, GF("STATUS:")) != 1) return false;
|
||||||
int status =
|
int status =
|
||||||
waitResponse(GFP(GSM_ERROR), GF("2"), GF("3"), GF("4"), GF("5"));
|
waitResponse(GFP(GSM_ERROR), GF("2"), GF("3"), GF("4"), GF("5"));
|
||||||
if (status != 3) {
|
if (status != 3) {
|
||||||
|
|||||||
@@ -203,9 +203,12 @@ public:
|
|||||||
virtual uint8_t connected() {
|
virtual uint8_t connected() {
|
||||||
if (available()) {
|
if (available()) {
|
||||||
return true;
|
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;
|
return sock_connected;
|
||||||
// NOTE: We dont't check or return
|
// NOTE: We don't check or return
|
||||||
// modemGetConnected() because we don't
|
// modemGetConnected() because we don't
|
||||||
// want to go into command mode.
|
// want to go into command mode.
|
||||||
// return at->modemGetConnected();
|
// return at->modemGetConnected();
|
||||||
@@ -657,13 +660,30 @@ public:
|
|||||||
XBEE_COMMAND_END_DECORATOR
|
XBEE_COMMAND_END_DECORATOR
|
||||||
|
|
||||||
if (beeType == XBEE3_LTEM_ATT && intRes == 105) intRes = 0; // tends to reply with "69" when signal is unknown
|
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() {
|
bool isNetworkConnected() {
|
||||||
RegStatus s = getRegistrationStatus();
|
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) {
|
bool waitForNetwork(unsigned long timeout_ms = 60000L) {
|
||||||
@@ -1161,6 +1181,7 @@ public:
|
|||||||
// 0x02 = Invalid parameters (bad IP/host)
|
// 0x02 = Invalid parameters (bad IP/host)
|
||||||
// 0x12 = DNS query lookup failure
|
// 0x12 = DNS query lookup failure
|
||||||
// 0x25 = Unknown server - DNS lookup failed (0x22 for UDP socket!)
|
// 0x25 = Unknown server - DNS lookup failed (0x22 for UDP socket!)
|
||||||
|
// fall through
|
||||||
case 0x02:
|
case 0x02:
|
||||||
case 0x12:
|
case 0x12:
|
||||||
case 0x25: {
|
case 0x25: {
|
||||||
@@ -1169,6 +1190,7 @@ public:
|
|||||||
|
|
||||||
// If it's anything else (inc 0x02, 0x12, and 0x25)...
|
// If it's anything else (inc 0x02, 0x12, and 0x25)...
|
||||||
// it's definitely NOT connected
|
// it's definitely NOT connected
|
||||||
|
// fall through
|
||||||
default: {
|
default: {
|
||||||
sockets[0]->sock_connected = false;
|
sockets[0]->sock_connected = false;
|
||||||
savedOperatingIP = od;
|
savedOperatingIP = od;
|
||||||
|
|||||||
Reference in New Issue
Block a user