SARA R410 also "forget" to notify about incoming data
This commit is contained in:
@@ -100,6 +100,7 @@ public:
|
||||
// closes until all data is read from the buffer.
|
||||
// Doing it this way allows the external mcu to find and get all of the data
|
||||
// that it wants from the socket even if it was closed externally.
|
||||
rx.clear();
|
||||
at->maintain();
|
||||
while (sock_available > 0) {
|
||||
sock_available -= at->modemRead(TinyGsmMin((uint16_t)rx.free(), sock_available), mux);
|
||||
@@ -153,7 +154,6 @@ public:
|
||||
cnt += chunk;
|
||||
continue;
|
||||
}
|
||||
// TODO: Read directly into user buffer?
|
||||
// Workaround: sometimes SIM800 forgets to notify about data arrival.
|
||||
// TODO: Currently we ping the module periodically,
|
||||
// but maybe there's a better indicator that we need to poll
|
||||
@@ -162,6 +162,7 @@ public:
|
||||
prev_check = millis();
|
||||
}
|
||||
at->maintain();
|
||||
// TODO: Read directly into user buffer?
|
||||
if (sock_available > 0) {
|
||||
sock_available -= at->modemRead(TinyGsmMin((uint16_t)rx.free(), sock_available), mux);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user