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

[quectel] fixes PPP resume during warm boot #2772

Merged
merged 1 commit into from
May 28, 2024
Merged
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
7 changes: 5 additions & 2 deletions hal/network/ncp_client/quectel/quectel_ncp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const int IMSI_MAX_RETRY_CNT = 10;
const int CCID_MAX_RETRY_CNT = 2;

const int DATA_MODE_BREAK_ATTEMPTS = 5;
const int PPP_ECHO_REQUEST_ATTEMPTS = 3;
const int PPP_ECHO_REQUEST_ATTEMPTS = 10;
const int CGDCONT_ATTEMPTS = 5;

const int COPS_MAX_RETRY_CNT = 3;
Expand Down Expand Up @@ -1573,7 +1573,10 @@ int QuectelNcpClient::enterDataMode() {
// Send data mode break
const char breakCmd[] = "+++";
muxerDataStream_->write(breakCmd, sizeof(breakCmd) - 1);
skipAll(muxerDataStream_.get(), 1000);
// XXX: EG91-NAX required 1000ms delay after +++ needs to be at least 1004ms to resolve a
// bug during warm boot where PPP LCP echo requests will not be sent out of the modem
// on the hardware UART interface. Setting 100ms higher based on Quectel's recommendation.
skipAll(muxerDataStream_.get(), (1000 + 100));

dataParser_.reset();
responsive = waitAtResponse(dataParser_, 1000, 500) == 0;
Expand Down