Skip to content

Commit

Permalink
Merge pull request #2772 from particle-iot/fix/ppp-resume-on-warm-boot
Browse files Browse the repository at this point in the history
[quectel] fixes PPP resume during warm boot
  • Loading branch information
scott-brust authored May 28, 2024
2 parents 983cc02 + b16eac2 commit 1c34048
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit 1c34048

Please sign in to comment.