12#include <zephyr/kernel.h>
366#define LTE_LC_CELL_TIMING_ADVANCE_MAX 20512
368#define LTE_LC_CELL_TIMING_ADVANCE_INVALID 65535
370#define LTE_LC_CELL_EARFCN_MAX 262143
372#define LTE_LC_CELL_RSRP_INVALID 255
374#define LTE_LC_CELL_RSRQ_INVALID 255
376#define LTE_LC_CELL_EUTRAN_ID_INVALID UINT32_MAX
378#define LTE_LC_CELL_EUTRAN_ID_MAX 268435455
380#define LTE_LC_CELL_TAC_INVALID UINT32_MAX
382#define LTE_LC_CELL_TIME_DIFF_INVALID 0
1182#define LTE_LC_ON_CFUN(name, _callback, _context) \
1183 static void _callback(enum lte_lc_func_mode, void *ctx); \
1184 STRUCT_SECTION_ITERABLE(lte_lc_cfun_cb, lte_lc_cfun_cb_##name) = { \
1185 .callback = _callback, \
1186 .context = _context, \
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:634
@ LTE_LC_CE_LEVEL_2
Definition: lte_lc.h:642
@ LTE_LC_CE_LEVEL_0
Definition: lte_lc.h:636
@ LTE_LC_CE_LEVEL_UNKNOWN
Definition: lte_lc.h:648
@ LTE_LC_CE_LEVEL_1
Definition: lte_lc.h:639
@ LTE_LC_CE_LEVEL_3
Definition: lte_lc.h:645
int lte_lc_ptw_set(enum lte_lc_lte_mode mode, const char *ptw)
lte_lc_modem_sleep_type
Definition: lte_lc.h:541
@ LTE_LC_MODEM_SLEEP_PROPRIETARY_PSM
Definition: lte_lc.h:559
@ LTE_LC_MODEM_SLEEP_RF_INACTIVITY
Definition: lte_lc.h:546
@ LTE_LC_MODEM_SLEEP_LIMITED_SERVICE
Definition: lte_lc.h:549
@ LTE_LC_MODEM_SLEEP_FLIGHT_MODE
Definition: lte_lc.h:552
@ LTE_LC_MODEM_SLEEP_PSM
Definition: lte_lc.h:543
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:742
@ LTE_LC_FACTORY_RESET_ALL
Definition: lte_lc.h:744
@ LTE_LC_FACTORY_RESET_USER
Definition: lte_lc.h:747
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:614
@ LTE_LC_CELL_IN_TAI_LIST
Definition: lte_lc.h:620
@ LTE_LC_CELL_NOT_IN_TAI_LIST
Definition: lte_lc.h:627
@ LTE_LC_CELL_UNKNOWN
Definition: lte_lc.h:630
lte_lc_evt_type
Definition: lte_lc.h:208
@ LTE_LC_EVT_NEIGHBOR_CELL_MEAS
Definition: lte_lc.h:281
@ LTE_LC_EVT_TAU_PRE_WARNING
Definition: lte_lc.h:273
@ LTE_LC_EVT_MODEM_EVENT
Definition: lte_lc.h:318
@ LTE_LC_EVT_PSM_UPDATE
Definition: lte_lc.h:223
@ LTE_LC_EVT_EDRX_UPDATE
Definition: lte_lc.h:231
@ LTE_LC_EVT_MODEM_SLEEP_EXIT_PRE_WARNING
Definition: lte_lc.h:293
@ LTE_LC_EVT_RAI_UPDATE
Definition: lte_lc.h:328
@ LTE_LC_EVT_MODEM_SLEEP_ENTER
Definition: lte_lc.h:310
@ LTE_LC_EVT_RRC_UPDATE
Definition: lte_lc.h:239
@ LTE_LC_EVT_CELL_UPDATE
Definition: lte_lc.h:248
@ LTE_LC_EVT_LTE_MODE_UPDATE
Definition: lte_lc.h:261
@ LTE_LC_EVT_NW_REG_STATUS
Definition: lte_lc.h:215
@ LTE_LC_EVT_MODEM_SLEEP_EXIT
Definition: lte_lc.h:301
lte_lc_neighbor_search_type
Definition: lte_lc.h:937
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_GCI_EXTENDED_COMPLETE
Definition: lte_lc.h:988
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_GCI_DEFAULT
Definition: lte_lc.h:969
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_GCI_EXTENDED_LIGHT
Definition: lte_lc.h:979
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_EXTENDED_COMPLETE
Definition: lte_lc.h:962
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_DEFAULT
Definition: lte_lc.h:942
@ LTE_LC_NEIGHBOR_SEARCH_TYPE_EXTENDED_LIGHT
Definition: lte_lc.h:953
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:574
@ LTE_LC_ENERGY_CONSUMPTION_EFFICIENT
Definition: lte_lc.h:610
@ LTE_LC_ENERGY_CONSUMPTION_REDUCED
Definition: lte_lc.h:603
@ LTE_LC_ENERGY_CONSUMPTION_NORMAL
Definition: lte_lc.h:596
@ LTE_LC_ENERGY_CONSUMPTION_INCREASED
Definition: lte_lc.h:589
@ LTE_LC_ENERGY_CONSUMPTION_EXCESSIVE
Definition: lte_lc.h:581
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:668
@ LTE_LC_MODEM_EVT_NO_IMEI
Definition: lte_lc.h:710
@ LTE_LC_MODEM_EVT_CE_LEVEL_3
Definition: lte_lc.h:738
@ LTE_LC_MODEM_EVT_LIGHT_SEARCH_DONE
Definition: lte_lc.h:680
@ LTE_LC_MODEM_EVT_SEARCH_DONE
Definition: lte_lc.h:690
@ LTE_LC_MODEM_EVT_CE_LEVEL_1
Definition: lte_lc.h:724
@ LTE_LC_MODEM_EVT_CE_LEVEL_2
Definition: lte_lc.h:731
@ LTE_LC_MODEM_EVT_RESET_LOOP
Definition: lte_lc.h:701
@ LTE_LC_MODEM_EVT_BATTERY_LOW
Definition: lte_lc.h:704
@ LTE_LC_MODEM_EVT_CE_LEVEL_0
Definition: lte_lc.h:717
@ LTE_LC_MODEM_EVT_OVERHEATED
Definition: lte_lc.h:707
void(* lte_lc_evt_handler_t)(const struct lte_lc_evt *const evt)
Definition: lte_lc.h:1242
int lte_lc_reduced_mobility_get(enum lte_lc_reduced_mobility_mode *mode)
lte_lc_rrc_mode
Definition: lte_lc.h:332
@ LTE_LC_RRC_MODE_IDLE
Definition: lte_lc.h:334
@ LTE_LC_RRC_MODE_CONNECTED
Definition: lte_lc.h:337
lte_lc_reduced_mobility_mode
Definition: lte_lc.h:652
@ LTE_LC_REDUCED_MOBILITY_DISABLED
Definition: lte_lc.h:664
@ LTE_LC_REDUCED_MOBILITY_NORDIC
Definition: lte_lc.h:657
@ LTE_LC_REDUCED_MOBILITY_DEFAULT
Definition: lte_lc.h:654
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:1009
@ LTE_LC_PERIODIC_SEARCH_PATTERN_TABLE
Definition: lte_lc.h:1014
@ LTE_LC_PERIODIC_SEARCH_PATTERN_RANGE
Definition: lte_lc.h:1011
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:461
uint64_t timing_advance_meas_time
Definition: lte_lc.h:454
uint32_t tac
Definition: lte_lc.h:426
uint16_t timing_advance
Definition: lte_lc.h:441
uint32_t earfcn
Definition: lte_lc.h:429
int16_t rsrq
Definition: lte_lc.h:508
uint16_t phys_cell_id
Definition: lte_lc.h:464
int mnc
Definition: lte_lc.h:420
int16_t rsrp
Definition: lte_lc.h:484
uint32_t id
Definition: lte_lc.h:423
int mcc
Definition: lte_lc.h:417
uint8_t gci_cells_count
Definition: lte_lc.h:534
struct lte_lc_cell current_cell
Definition: lte_lc.h:518
uint8_t ncells_count
Definition: lte_lc.h:524
struct lte_lc_ncell * neighbor_cells
Definition: lte_lc.h:527
struct lte_lc_cell * gci_cells
Definition: lte_lc.h:537
void(* callback)(enum lte_lc_func_mode, void *ctx)
Definition: lte_lc.h:1171
void * context
Definition: lte_lc.h:1172
Definition: lte_lc.h:1170
int16_t rsrp
Definition: lte_lc.h:825
int16_t phy_cid
Definition: lte_lc.h:878
int16_t tx_rep
Definition: lte_lc.h:862
int16_t tx_power
Definition: lte_lc.h:914
int16_t dl_pathloss
Definition: lte_lc.h:805
uint32_t cell_id
Definition: lte_lc.h:923
enum lte_lc_rrc_mode rrc_state
Definition: lte_lc.h:772
int16_t band
Definition: lte_lc.h:887
int mcc
Definition: lte_lc.h:917
int16_t rx_rep
Definition: lte_lc.h:875
int earfcn
Definition: lte_lc.h:802
int16_t snr
Definition: lte_lc.h:901
enum lte_lc_energy_estimate energy_estimate
Definition: lte_lc.h:778
enum lte_lc_ce_level ce_level
Definition: lte_lc.h:799
int16_t rsrq
Definition: lte_lc.h:849
enum lte_lc_tau_triggered tau_trig
Definition: lte_lc.h:784
int mnc
Definition: lte_lc.h:920
enum lte_lc_lte_mode mode
Definition: lte_lc.h:356
float edrx
Definition: lte_lc.h:359
float ptw
Definition: lte_lc.h:362
struct lte_lc_cells_info cells_info
Definition: lte_lc.h:1230
uint64_t time
Definition: lte_lc.h:1227
struct lte_lc_modem_sleep modem_sleep
Definition: lte_lc.h:1217
struct lte_lc_edrx_cfg edrx_cfg
Definition: lte_lc.h:1205
enum lte_lc_rrc_mode rrc_mode
Definition: lte_lc.h:1199
enum lte_lc_modem_evt modem_evt
Definition: lte_lc.h:1220
struct lte_lc_cell cell
Definition: lte_lc.h:1208
enum lte_lc_lte_mode lte_mode
Definition: lte_lc.h:1211
enum lte_lc_evt_type type
Definition: lte_lc.h:1192
struct lte_lc_psm_cfg psm_cfg
Definition: lte_lc.h:1202
enum lte_lc_nw_reg_status nw_reg_status
Definition: lte_lc.h:1196
struct lte_lc_rai_cfg rai_cfg
Definition: lte_lc.h:1233
Definition: lte_lc.h:1190
enum lte_lc_modem_sleep_type type
Definition: lte_lc.h:565
int64_t time
Definition: lte_lc.h:570
uint16_t phys_cell_id
Definition: lte_lc.h:397
int16_t rsrp
Definition: lte_lc.h:404
int time_diff
Definition: lte_lc.h:394
uint32_t earfcn
Definition: lte_lc.h:387
int16_t rsrq
Definition: lte_lc.h:411
enum lte_lc_neighbor_search_type search_type
Definition: lte_lc.h:994
uint8_t gci_count
Definition: lte_lc.h:1004
struct lte_lc_periodic_search_pattern patterns[4]
Definition: lte_lc.h:1166
uint16_t return_to_pattern
Definition: lte_lc.h:1149
size_t pattern_count
Definition: lte_lc.h:1163
uint16_t band_optimization
Definition: lte_lc.h:1160
bool loop
Definition: lte_lc.h:1138
Definition: lte_lc.h:1131
struct lte_lc_periodic_search_table_cfg table
Definition: lte_lc.h:1126
struct lte_lc_periodic_search_range_cfg range
Definition: lte_lc.h:1123
enum lte_lc_periodic_search_pattern_type type
Definition: lte_lc.h:1119
Definition: lte_lc.h:1117
int16_t time_to_final_sleep
Definition: lte_lc.h:1047
uint16_t final_sleep
Definition: lte_lc.h:1031
int16_t pattern_end_point
Definition: lte_lc.h:1058
uint16_t initial_sleep
Definition: lte_lc.h:1024
Definition: lte_lc.h:1018
int val_4
Definition: lte_lc.h:1100
int val_2
Definition: lte_lc.h:1082
int val_1
Definition: lte_lc.h:1075
int val_5
Definition: lte_lc.h:1109
int val_3
Definition: lte_lc.h:1091
Definition: lte_lc.h:1073
int active_time
Definition: lte_lc.h:346
int tau
Definition: lte_lc.h:343
int mcc
Definition: lte_lc.h:755
bool cp_rai
Definition: lte_lc.h:761
uint32_t cell_id
Definition: lte_lc.h:753
int mnc
Definition: lte_lc.h:757
bool as_rai
Definition: lte_lc.h:759