12#include <zephyr/kernel.h>
217#if defined(CONFIG_LTE_LC_PSM_MODULE)
227#if defined(CONFIG_LTE_LC_EDRX_MODULE)
267#if defined(CONFIG_LTE_LC_TAU_PRE_WARNING_MODULE)
281#if defined(CONFIG_LTE_LC_NEIGHBOR_CELL_MEAS_MODULE)
291#if defined(CONFIG_LTE_LC_MODEM_SLEEP_MODULE)
330#if defined(CONFIG_LTE_LC_RAI_MODULE)
378#define LTE_LC_CELL_TIMING_ADVANCE_MAX 20512
380#define LTE_LC_CELL_TIMING_ADVANCE_INVALID 65535
382#define LTE_LC_CELL_EARFCN_MAX 262143
384#define LTE_LC_CELL_RSRP_INVALID 255
386#define LTE_LC_CELL_RSRQ_INVALID 255
388#define LTE_LC_CELL_EUTRAN_ID_INVALID UINT32_MAX
390#define LTE_LC_CELL_EUTRAN_ID_MAX 268435455
392#define LTE_LC_CELL_TAC_INVALID UINT32_MAX
394#define LTE_LC_CELL_TIME_DIFF_INVALID 0
1211#define LTE_LC_ON_CFUN(name, _callback, _context) \
1212 static void _callback(enum lte_lc_func_mode, void *ctx); \
1213 STRUCT_SECTION_ITERABLE(lte_lc_cfun_cb, lte_lc_cfun_cb_##name) = { \
1214 .callback = _callback, \
1215 .context = _context, \
1230#if defined(CONFIG_LTE_LC_PSM_MODULE)
1235#if defined(CONFIG_LTE_LC_EDRX_MODULE)
1246#if defined(CONFIG_LTE_LC_MODEM_SLEEP_MODULE)
1264#if defined(CONFIG_LTE_LC_NEIGHBOR_CELL_MEAS_MODULE)
1269#if defined(CONFIG_LTE_LC_RAI_MODULE)
static const struct event_proxy_config cfg
Definition event_proxy_def.h:28
int lte_lc_connect_async(lte_lc_evt_handler_t handler)
int lte_lc_psm_param_set_seconds(int rptau, int rat)
int lte_lc_periodic_search_set(const struct lte_lc_periodic_search_cfg *const cfg)
int lte_lc_periodic_search_clear(void)
lte_lc_ce_level
Definition lte_lc.h:650
@ LTE_LC_CE_LEVEL_2
Definition lte_lc.h:658
@ LTE_LC_CE_LEVEL_0
Definition lte_lc.h:652
@ LTE_LC_CE_LEVEL_UNKNOWN
Definition lte_lc.h:664
@ LTE_LC_CE_LEVEL_1
Definition lte_lc.h:655
@ LTE_LC_CE_LEVEL_3
Definition lte_lc.h:661
int lte_lc_ptw_set(enum lte_lc_lte_mode mode, const char *ptw)
lte_lc_modem_sleep_type
Definition lte_lc.h:557
@ LTE_LC_MODEM_SLEEP_PROPRIETARY_PSM
Definition lte_lc.h:575
@ LTE_LC_MODEM_SLEEP_RF_INACTIVITY
Definition lte_lc.h:562
@ LTE_LC_MODEM_SLEEP_LIMITED_SERVICE
Definition lte_lc.h:565
@ LTE_LC_MODEM_SLEEP_FLIGHT_MODE
Definition lte_lc.h:568
@ LTE_LC_MODEM_SLEEP_PSM
Definition lte_lc.h:559
int lte_lc_system_mode_set(enum lte_lc_system_mode mode, enum lte_lc_system_mode_preference preference)
int lte_lc_system_mode_get(enum lte_lc_system_mode *mode, enum lte_lc_system_mode_preference *preference)
lte_lc_factory_reset_type
Definition lte_lc.h:765
@ LTE_LC_FACTORY_RESET_ALL
Definition lte_lc.h:767
@ LTE_LC_FACTORY_RESET_USER
Definition lte_lc.h:770
int lte_lc_psm_param_set(const char *rptau, const char *rat)
int lte_lc_edrx_get(struct lte_lc_edrx_cfg *edrx_cfg)
int lte_lc_psm_req(bool enable)
lte_lc_func_mode
Definition lte_lc.h:153
@ LTE_LC_FUNC_MODE_RX_ONLY
Definition lte_lc.h:176
@ LTE_LC_FUNC_MODE_OFFLINE_UICC_ON
Definition lte_lc.h:204
@ LTE_LC_FUNC_MODE_OFFLINE
Definition lte_lc.h:183
@ LTE_LC_FUNC_MODE_DEACTIVATE_UICC
Definition lte_lc.h:198
@ LTE_LC_FUNC_MODE_ACTIVATE_GNSS
Definition lte_lc.h:195
@ LTE_LC_FUNC_MODE_POWER_OFF
Definition lte_lc.h:159
@ LTE_LC_FUNC_MODE_DEACTIVATE_LTE
Definition lte_lc.h:186
@ LTE_LC_FUNC_MODE_NORMAL
Definition lte_lc.h:166
@ LTE_LC_FUNC_MODE_ACTIVATE_UICC
Definition lte_lc.h:201
@ LTE_LC_FUNC_MODE_DEACTIVATE_GNSS
Definition lte_lc.h:192
@ LTE_LC_FUNC_MODE_ACTIVATE_LTE
Definition lte_lc.h:189
int lte_lc_psm_get(int *tau, int *active_time)
lte_lc_tau_triggered
Definition lte_lc.h:630
@ LTE_LC_CELL_IN_TAI_LIST
Definition lte_lc.h:636
@ LTE_LC_CELL_NOT_IN_TAI_LIST
Definition lte_lc.h:643
@ LTE_LC_CELL_UNKNOWN
Definition lte_lc.h:646
lte_lc_evt_type
Definition lte_lc.h:208
@ LTE_LC_EVT_NEIGHBOR_CELL_MEAS
Definition lte_lc.h:288
@ LTE_LC_EVT_TAU_PRE_WARNING
Definition lte_lc.h:278
@ LTE_LC_EVT_MODEM_EVENT
Definition lte_lc.h:328
@ LTE_LC_EVT_PSM_UPDATE
Definition lte_lc.h:224
@ LTE_LC_EVT_EDRX_UPDATE
Definition lte_lc.h:234
@ LTE_LC_EVT_MODEM_SLEEP_EXIT_PRE_WARNING
Definition lte_lc.h:302
@ LTE_LC_EVT_RAI_UPDATE
Definition lte_lc.h:339
@ LTE_LC_EVT_MODEM_SLEEP_ENTER
Definition lte_lc.h:319
@ LTE_LC_EVT_RRC_UPDATE
Definition lte_lc.h:243
@ LTE_LC_EVT_CELL_UPDATE
Definition lte_lc.h:252
@ LTE_LC_EVT_LTE_MODE_UPDATE
Definition lte_lc.h:265
@ LTE_LC_EVT_NW_REG_STATUS
Definition lte_lc.h:215
@ LTE_LC_EVT_MODEM_SLEEP_EXIT
Definition lte_lc.h:310
lte_lc_neighbor_search_type
Definition lte_lc.h:964
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_GCI_EXTENDED_COMPLETE
Definition lte_lc.h:1015
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_GCI_DEFAULT
Definition lte_lc.h:996
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_GCI_EXTENDED_LIGHT
Definition lte_lc.h:1006
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_EXTENDED_COMPLETE
Definition lte_lc.h:989
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_DEFAULT
Definition lte_lc.h:969
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_EXTENDED_LIGHT
Definition lte_lc.h:980
int lte_lc_func_mode_get(enum lte_lc_func_mode *mode)
int lte_lc_conn_eval_params_get(struct lte_lc_conn_eval_params *params)
int lte_lc_neighbor_cell_measurement(struct lte_lc_ncellmeas_params *params)
lte_lc_energy_estimate
Definition lte_lc.h:590
@ LTE_LC_ENERGY_CONSUMPTION_EFFICIENT
Definition lte_lc.h:626
@ LTE_LC_ENERGY_CONSUMPTION_REDUCED
Definition lte_lc.h:619
@ LTE_LC_ENERGY_CONSUMPTION_NORMAL
Definition lte_lc.h:612
@ LTE_LC_ENERGY_CONSUMPTION_INCREASED
Definition lte_lc.h:605
@ LTE_LC_ENERGY_CONSUMPTION_EXCESSIVE
Definition lte_lc.h:597
lte_lc_lte_mode
Definition lte_lc.h:89
@ LTE_LC_LTE_MODE_NBIOT
Definition lte_lc.h:97
@ LTE_LC_LTE_MODE_NONE
Definition lte_lc.h:91
@ LTE_LC_LTE_MODE_LTEM
Definition lte_lc.h:94
int lte_lc_deregister_handler(lte_lc_evt_handler_t handler)
lte_lc_modem_evt
Definition lte_lc.h:687
@ LTE_LC_MODEM_EVT_NO_IMEI
Definition lte_lc.h:729
@ LTE_LC_MODEM_EVT_CE_LEVEL_3
Definition lte_lc.h:757
@ LTE_LC_MODEM_EVT_LIGHT_SEARCH_DONE
Definition lte_lc.h:699
@ LTE_LC_MODEM_EVT_SEARCH_DONE
Definition lte_lc.h:709
@ LTE_LC_MODEM_EVT_CE_LEVEL_1
Definition lte_lc.h:743
@ LTE_LC_MODEM_EVT_CE_LEVEL_2
Definition lte_lc.h:750
@ LTE_LC_MODEM_EVT_RESET_LOOP
Definition lte_lc.h:720
@ LTE_LC_MODEM_EVT_BATTERY_LOW
Definition lte_lc.h:723
@ LTE_LC_MODEM_EVT_CE_LEVEL_0
Definition lte_lc.h:736
@ LTE_LC_MODEM_EVT_OVERHEATED
Definition lte_lc.h:726
void(* lte_lc_evt_handler_t)(const struct lte_lc_evt *const evt)
Definition lte_lc.h:1281
int lte_lc_reduced_mobility_get(enum lte_lc_reduced_mobility_mode *mode)
lte_lc_rrc_mode
Definition lte_lc.h:344
@ LTE_LC_RRC_MODE_IDLE
Definition lte_lc.h:346
@ LTE_LC_RRC_MODE_CONNECTED
Definition lte_lc.h:349
lte_lc_reduced_mobility_mode
Definition lte_lc.h:671
@ LTE_LC_REDUCED_MOBILITY_DISABLED
Definition lte_lc.h:683
@ LTE_LC_REDUCED_MOBILITY_NORDIC
Definition lte_lc.h:676
@ LTE_LC_REDUCED_MOBILITY_DEFAULT
Definition lte_lc.h:673
int lte_lc_nw_reg_status_get(enum lte_lc_nw_reg_status *status)
int lte_lc_edrx_req(bool enable)
void lte_lc_register_handler(lte_lc_evt_handler_t handler)
int lte_lc_lte_mode_get(enum lte_lc_lte_mode *mode)
int lte_lc_power_off(void)
int lte_lc_neighbor_cell_measurement_cancel(void)
lte_lc_periodic_search_pattern_type
Definition lte_lc.h:1036
@ LTE_LC_PERIODIC_SEARCH_PATTERN_TABLE
Definition lte_lc.h:1041
@ LTE_LC_PERIODIC_SEARCH_PATTERN_RANGE
Definition lte_lc.h:1038
int lte_lc_proprietary_psm_req(bool enable)
int lte_lc_periodic_search_request(void)
int lte_lc_func_mode_set(enum lte_lc_func_mode mode)
int lte_lc_modem_events_disable(void)
int lte_lc_factory_reset(enum lte_lc_factory_reset_type type)
lte_lc_system_mode
Definition lte_lc.h:60
@ LTE_LC_SYSTEM_MODE_NBIOT
Definition lte_lc.h:65
@ LTE_LC_SYSTEM_MODE_LTEM_NBIOT
Definition lte_lc.h:77
@ LTE_LC_SYSTEM_MODE_NBIOT_GPS
Definition lte_lc.h:74
@ LTE_LC_SYSTEM_MODE_GPS
Definition lte_lc.h:68
@ LTE_LC_SYSTEM_MODE_LTEM
Definition lte_lc.h:62
@ LTE_LC_SYSTEM_MODE_LTEM_NBIOT_GPS
Definition lte_lc.h:80
@ LTE_LC_SYSTEM_MODE_LTEM_GPS
Definition lte_lc.h:71
int lte_lc_edrx_param_set(enum lte_lc_lte_mode mode, const char *edrx)
lte_lc_nw_reg_status
Definition lte_lc.h:33
@ LTE_LC_NW_REG_REGISTERED_HOME
Definition lte_lc.h:38
@ LTE_LC_NW_REG_UICC_FAIL
Definition lte_lc.h:56
@ LTE_LC_NW_REG_REGISTRATION_DENIED
Definition lte_lc.h:47
@ LTE_LC_NW_REG_SEARCHING
Definition lte_lc.h:44
@ LTE_LC_NW_REG_REGISTERED_ROAMING
Definition lte_lc.h:53
@ LTE_LC_NW_REG_NOT_REGISTERED
Definition lte_lc.h:35
@ LTE_LC_NW_REG_UNKNOWN
Definition lte_lc.h:50
int lte_lc_reduced_mobility_set(enum lte_lc_reduced_mobility_mode mode)
int lte_lc_periodic_search_get(struct lte_lc_periodic_search_cfg *const cfg)
lte_lc_system_mode_preference
Definition lte_lc.h:109
@ LTE_LC_SYSTEM_MODE_PREFER_NBIOT
Definition lte_lc.h:127
@ LTE_LC_SYSTEM_MODE_PREFER_LTEM_PLMN_PRIO
Definition lte_lc.h:135
@ LTE_LC_SYSTEM_MODE_PREFER_NBIOT_PLMN_PRIO
Definition lte_lc.h:143
@ LTE_LC_SYSTEM_MODE_PREFER_LTEM
Definition lte_lc.h:119
@ LTE_LC_SYSTEM_MODE_PREFER_AUTO
Definition lte_lc.h:111
int lte_lc_modem_events_enable(void)
uint64_t measurement_time
Definition lte_lc.h:473
uint64_t timing_advance_meas_time
Definition lte_lc.h:466
uint32_t tac
Definition lte_lc.h:438
uint16_t timing_advance
Definition lte_lc.h:453
uint32_t earfcn
Definition lte_lc.h:441
int16_t rsrq
Definition lte_lc.h:524
uint16_t phys_cell_id
Definition lte_lc.h:476
int mnc
Definition lte_lc.h:432
int16_t rsrp
Definition lte_lc.h:498
uint32_t id
Definition lte_lc.h:435
int mcc
Definition lte_lc.h:429
uint8_t gci_cells_count
Definition lte_lc.h:550
struct lte_lc_cell current_cell
Definition lte_lc.h:534
uint8_t ncells_count
Definition lte_lc.h:540
struct lte_lc_ncell * neighbor_cells
Definition lte_lc.h:543
struct lte_lc_cell * gci_cells
Definition lte_lc.h:553
void(* callback)(enum lte_lc_func_mode, void *ctx)
Definition lte_lc.h:1198
void * context
Definition lte_lc.h:1199
int16_t rsrp
Definition lte_lc.h:850
int16_t phy_cid
Definition lte_lc.h:905
int16_t tx_rep
Definition lte_lc.h:889
int16_t tx_power
Definition lte_lc.h:941
int16_t dl_pathloss
Definition lte_lc.h:828
uint32_t cell_id
Definition lte_lc.h:950
enum lte_lc_rrc_mode rrc_state
Definition lte_lc.h:795
int16_t band
Definition lte_lc.h:914
int mcc
Definition lte_lc.h:944
int16_t rx_rep
Definition lte_lc.h:902
int earfcn
Definition lte_lc.h:825
int16_t snr
Definition lte_lc.h:928
enum lte_lc_energy_estimate energy_estimate
Definition lte_lc.h:801
enum lte_lc_ce_level ce_level
Definition lte_lc.h:822
int16_t rsrq
Definition lte_lc.h:876
enum lte_lc_tau_triggered tau_trig
Definition lte_lc.h:807
int mnc
Definition lte_lc.h:947
enum lte_lc_lte_mode mode
Definition lte_lc.h:368
float edrx
Definition lte_lc.h:371
float ptw
Definition lte_lc.h:374
struct lte_lc_cells_info cells_info
Definition lte_lc.h:1266
uint64_t time
Definition lte_lc.h:1262
struct lte_lc_modem_sleep modem_sleep
Definition lte_lc.h:1251
struct lte_lc_edrx_cfg edrx_cfg
Definition lte_lc.h:1237
enum lte_lc_rrc_mode rrc_mode
Definition lte_lc.h:1228
enum lte_lc_modem_evt modem_evt
Definition lte_lc.h:1255
struct lte_lc_cell cell
Definition lte_lc.h:1241
enum lte_lc_lte_mode lte_mode
Definition lte_lc.h:1244
enum lte_lc_evt_type type
Definition lte_lc.h:1221
struct lte_lc_psm_cfg psm_cfg
Definition lte_lc.h:1232
enum lte_lc_nw_reg_status nw_reg_status
Definition lte_lc.h:1225
struct lte_lc_rai_cfg rai_cfg
Definition lte_lc.h:1271
enum lte_lc_modem_sleep_type type
Definition lte_lc.h:581
int64_t time
Definition lte_lc.h:586
uint16_t phys_cell_id
Definition lte_lc.h:409
int16_t rsrp
Definition lte_lc.h:416
int time_diff
Definition lte_lc.h:406
uint32_t earfcn
Definition lte_lc.h:399
int16_t rsrq
Definition lte_lc.h:423
enum lte_lc_neighbor_search_type search_type
Definition lte_lc.h:1021
uint8_t gci_count
Definition lte_lc.h:1031
struct lte_lc_periodic_search_pattern patterns[4]
Definition lte_lc.h:1193
uint16_t return_to_pattern
Definition lte_lc.h:1176
size_t pattern_count
Definition lte_lc.h:1190
uint16_t band_optimization
Definition lte_lc.h:1187
bool loop
Definition lte_lc.h:1165
struct lte_lc_periodic_search_table_cfg table
Definition lte_lc.h:1153
struct lte_lc_periodic_search_range_cfg range
Definition lte_lc.h:1150
enum lte_lc_periodic_search_pattern_type type
Definition lte_lc.h:1146
int16_t time_to_final_sleep
Definition lte_lc.h:1074
uint16_t final_sleep
Definition lte_lc.h:1058
int16_t pattern_end_point
Definition lte_lc.h:1085
uint16_t initial_sleep
Definition lte_lc.h:1051
int val_4
Definition lte_lc.h:1127
int val_2
Definition lte_lc.h:1109
int val_1
Definition lte_lc.h:1102
int val_5
Definition lte_lc.h:1136
int val_3
Definition lte_lc.h:1118
int active_time
Definition lte_lc.h:358
int tau
Definition lte_lc.h:355
int mcc
Definition lte_lc.h:778
bool cp_rai
Definition lte_lc.h:784
uint32_t cell_id
Definition lte_lc.h:776
int mnc
Definition lte_lc.h:780
bool as_rai
Definition lte_lc.h:782