Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identfy the "+CIPRXGET: 4" response for the "AT+CIPRXGET=4,0" command, even if modem returns "+CIPRXGET: 1" and "+CIPRXGET: 4" in the same response #803

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/TinyGsmClientSIM7000.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,16 @@ class TinyGsmSim7000 : public TinyGsmSim70xx<TinyGsmSim7000>,

sendAT(GF("+CIPRXGET=4,"), mux);
size_t result = 0;

if (waitResponse(GF("+CIPRXGET:")) == 1) {
streamSkipUntil(','); // Skip mode 4
int16_t first_mode_to_appear = streamGetIntBefore(','); // Skip and get first mode to appear

streamSkipUntil(','); // Skip mux

if (first_mode_to_appear == 1) {
streamSkipUntil(','); // Skip last comma, if appears +CIPRXGET: 1,0 first than +CIPRXGET: 4 in response
}

result = streamGetIntBefore('\n');
waitResponse();
}
Expand Down