From 9acf139ad505a40e335d2196b73f6627474143ac Mon Sep 17 00:00:00 2001 From: Scott Brust Date: Thu, 1 Feb 2024 13:43:39 -0800 Subject: [PATCH] Improve bg95 connection speed by only setting nwscanseq if needed --- hal/network/ncp_client/quectel/quectel_ncp_client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hal/network/ncp_client/quectel/quectel_ncp_client.cpp b/hal/network/ncp_client/quectel/quectel_ncp_client.cpp index 284a059d68..a40780c56c 100644 --- a/hal/network/ncp_client/quectel/quectel_ncp_client.cpp +++ b/hal/network/ncp_client/quectel/quectel_ncp_client.cpp @@ -1450,8 +1450,8 @@ int QuectelNcpClient::registerNet() { CHECK_TRUE(r == 1, SYSTEM_ERROR_UNKNOWN); r = CHECK_PARSER(respNwScanSeq.readResult()); CHECK_TRUE(r == AtResponse::OK, SYSTEM_ERROR_UNKNOWN); - if (nwScanSeq != 201) { // i.e. 0201 - CHECK_PARSER(parser_.execCommand("AT+QCFG=\"nwscanseq\",0201,1")); // LTE 02, then GSM 01 + if (nwScanSeq != 20103) { // i.e. 020103 + CHECK_PARSER(parser_.execCommand("AT+QCFG=\"nwscanseq\",020103,1")); // LTE 02, then GSM 01, then NBIOT 03 } } #else @@ -1463,7 +1463,7 @@ int QuectelNcpClient::registerNet() { if (isQuecCatNBxDevice()) { // Configure Network Category to be searched - // Set to use LTE Cat-M1 ONLY if not already set, take effect immediately + // Set to use LTE Cat-M1 ONLY (exclude NBIOT) if not already set, take effect immediately auto respOpMode = parser_.sendCommand("AT+QCFG=\"iotopmode\"") ; int iotOpMode = -1;