Skip to content

Commit 17fd650

Browse files
tokangasrlubos
authored andcommitted
lib: ntn: Remove %LOCATION subscription warning logs
The library may be enabled in applications which are used with both NTN and non-NTN modem firmware. Removed warning logs which were printed with non-NTN firwmare when %LOCATION notification subscription failed. Signed-off-by: Tommi Kangas <[email protected]>
1 parent 572d4e3 commit 17fd650

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/ntn/ntn.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,11 @@ static void at_handler_location(const char *notif)
194194

195195
static void location_ntf_subscribe(void)
196196
{
197-
int err;
198-
199-
err = nrf_modem_at_printf("AT%%LOCATION=1");
200-
if (err) {
201-
LOG_WRN("Enabling location notifications failed, error: %d", err);
202-
LOG_WRN("Modem firmware with NTN support required");
203-
}
197+
/* Error is ignored because this basically only fails when the firmware does not have
198+
* NTN support. There are applications which support both NTN and non-NTN modem
199+
* firmware, so we don't want to log an error here with non-NTN firmware.
200+
*/
201+
(void)nrf_modem_at_printf("AT%%LOCATION=1");
204202
}
205203

206204
#if defined(CONFIG_UNITY)

0 commit comments

Comments
 (0)