Skip to content

Commit

Permalink
lib: lte_link_control: Skip parsing of unexpected %NCELLMEAS notifica…
Browse files Browse the repository at this point in the history
…tions

Added check to skip %NCELLMEAS notification parsing when neighbor
cell measurement has not been requested by calling
lte_lc_neighbor_cell_measurement(). If the neighbor cell measurement
is triggered by sending the AT%NCELLMEAS AT command to the modem,
LTE LC does not know how the received notification should be parsed,
sometimes leading to a parsing error.

Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
  • Loading branch information
tokangas committed Jan 2, 2025
1 parent 9abba20 commit 8dfcef9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/lte_link_control/modules/ncellmeas.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,13 @@ static void at_handler_ncellmeas(const char *response)
goto exit;
}

if (k_sem_count_get(&ncellmeas_idle_sem) > 0) {
/* No need to parse the notification because neighbor cell measurement
* has not been requested.
*/
goto exit;
}

if (ncellmeas_params.search_type > LTE_LC_NEIGHBOR_SEARCH_TYPE_EXTENDED_COMPLETE) {
at_handler_ncellmeas_gci(response);
goto exit;
Expand Down

0 comments on commit 8dfcef9

Please sign in to comment.