Pull some updates from upstream
This commit is contained in:
		@@ -418,8 +418,9 @@ public:
 | 
				
			|||||||
  bool gprsConnect(const char* apn, const char* user = NULL, const char* pwd = NULL) {
 | 
					  bool gprsConnect(const char* apn, const char* user = NULL, const char* pwd = NULL) {
 | 
				
			||||||
    gprsDisconnect();
 | 
					    gprsDisconnect();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    sendAT(GF("EE"), 2);  // Set security to WPA2
 | 
					    sendAT(GF("+CGATT=1"));
 | 
				
			||||||
    if (waitResponse() != 1) goto fail;
 | 
					    if (waitResponse(60000L) != 1)
 | 
				
			||||||
 | 
					      return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // TODO: wait AT+CGATT?
 | 
					    // TODO: wait AT+CGATT?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -852,8 +852,7 @@ public:
 | 
				
			|||||||
    streamWrite(tail...);
 | 
					    streamWrite(tail...);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  bool streamSkipUntil(char c) {
 | 
					  bool streamSkipUntil(const char c, const unsigned long timeout = 3000L) {
 | 
				
			||||||
    const unsigned long timeout = 1000L;
 | 
					 | 
				
			||||||
    unsigned long startMillis = millis();
 | 
					    unsigned long startMillis = millis();
 | 
				
			||||||
    while (millis() - startMillis < timeout) {
 | 
					    while (millis() - startMillis < timeout) {
 | 
				
			||||||
      while (millis() - startMillis < timeout && !stream.available()) {
 | 
					      while (millis() - startMillis < timeout && !stream.available()) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
//============================================================================//
 | 
					//============================================================================//
 | 
				
			||||||
//============================================================================//
 | 
					//============================================================================//
 | 
				
			||||||
//              Declaration and Definitio of the TinyGsmSim808 Class
 | 
					//              Declaration and Definition of the TinyGsmSim808 Class
 | 
				
			||||||
//============================================================================//
 | 
					//============================================================================//
 | 
				
			||||||
//============================================================================//
 | 
					//============================================================================//
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -726,7 +726,7 @@ public:
 | 
				
			|||||||
      TINY_GSM_YIELD();
 | 
					      TINY_GSM_YIELD();
 | 
				
			||||||
      while (stream.available() > 0) {
 | 
					      while (stream.available() > 0) {
 | 
				
			||||||
        int a = stream.read();
 | 
					        int a = stream.read();
 | 
				
			||||||
        if (a <= 0) continue; // Skip 0x00 bytes, just in case
 | 
					        if (a < 0) continue;
 | 
				
			||||||
        data += (char)a;
 | 
					        data += (char)a;
 | 
				
			||||||
        if (r1 && data.endsWith(r1)) {
 | 
					        if (r1 && data.endsWith(r1)) {
 | 
				
			||||||
          index = 1;
 | 
					          index = 1;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user