Skip to content

Commit

Permalink
[cellular] make sure we go into full functionality mode before queryi…
Browse files Browse the repository at this point in the history
…ng ICCID/IMSI
  • Loading branch information
avtolstoy committed Mar 12, 2021
1 parent 466844f commit 57c4120
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hal/network/ncp_client/quectel/quectel_ncp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,10 @@ int QuectelNcpClient::checkSimCard() {
}

int QuectelNcpClient::configureApn(const CellularNetworkConfig& conf) {
// IMPORTANT: Set modem full functionality!
// Otherwise we won't be able to query ICCID/IMSI
CHECK_PARSER_OK(parser_.execCommand("AT+CFUN=1,0"));

netConf_ = conf;
if (!netConf_.isValid()) {
// First look for network settings based on ICCID
Expand Down
4 changes: 4 additions & 0 deletions hal/network/ncp_client/sara/sara_ncp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,10 @@ int SaraNcpClient::checkSimCard() {
}

int SaraNcpClient::configureApn(const CellularNetworkConfig& conf) {
// IMPORTANT: Set modem full functionality!
// Otherwise we won't be able to query ICCID/IMSI
CHECK_PARSER_OK(parser_.execCommand("AT+CFUN=1,0"));

netConf_ = conf;
if (!netConf_.isValid()) {
// First look for network settings based on ICCID
Expand Down

0 comments on commit 57c4120

Please sign in to comment.