Closed AyushMarsian closed 4 years ago
@AyushMarsian Thanks for your collaboration.
For timeout operations use millis()
or micros()
unsigned long start = millis();
while (!SIM.available() && millis()-start < TIMEOUT){
// KEEP WAITING,
};
Improve the timeout and do the Pull Request.
regards.
Hello,
I face one issue in _readSerial() function, and given solution below.
In detail, the function's return data type is String, you are returning data when available from serial port. But when GSM not working or not connected with serial port at that time function return nothing. We do not get compilation error, but when we call function for to perform certain String operation at that time controller get hang or crash.
Old function
New function(Added one line)
I personally tested so, you can update and commit