Using modem/nrf_modem_lib.h and modem/lte_lc.h

Hello dear Nordic support staff,

I'm working on some legacy code (NCS 1.8.0 in case it's relevant) and see this in the inclusion list of one of the files:

#include <modem/nrf_modem_lib.h>
#include <modem/lte_lc.h>

Functions from both libraries are used to set up the modem and create a connection. I'm new to network code on the nrf9160, but looking at samples and documentation, it seems like using only one of the libraries is enough, where you choose lte_lc if you want more granular control.

E.g, the udp sample uses only lte_lc.h, while the http_update sample uses only nrf_modem_lib.h. I also see that the modem_shell sample uses both. Why?

Related