Developer World
Spresense SDK Library v1.4.2-3df2e9d
lte_api.h
Go to the documentation of this file.
1 /****************************************************************************
2  * modules/include/lte/lte_api.h
3  *
4  * Copyright 2018 Sony Semiconductor Solutions Corporation
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in
14  * the documentation and/or other materials provided with the
15  * distribution.
16  * 3. Neither the name of Sony Semiconductor Solutions Corporation nor
17  * the names of its contributors may be used to endorse or promote
18  * products derived from this software without specific prior written
19  * permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *
34  ****************************************************************************/
35 
36 #ifndef __MODULES_INCLUDE_LTE_LTE_API_H
37 #define __MODULES_INCLUDE_LTE_LTE_API_H
38 
87 /****************************************************************************
88  * Included Files
89  ****************************************************************************/
90 
91 #include <stdbool.h>
92 #include <stdint.h>
93 
94 /****************************************************************************
95  * Pre-processor Definitions
96  ****************************************************************************/
97 
98 #define LTE_RESULT_OK (0)
99 #define LTE_RESULT_ERROR (1)
100 #define LTE_RESULT_CANCEL (2)
102 #define LTE_VALID (true)
103 #define LTE_INVALID (false)
105 #define LTE_ENABLE (true)
106 #define LTE_DISABLE (false)
108 #define LTE_ERR_WAITENTERPIN (1)
109 #define LTE_ERR_REJECT (2)
110 #define LTE_ERR_MAXRETRY (3)
111 #define LTE_ERR_BARRING (4)
112 #define LTE_ERR_DETACHED (5)
113 #define LTE_ERR_UNEXPECTED (255)
115 #define LTE_SESSION_ID_MIN (1)
116 #define LTE_SESSION_ID_MAX (5)
121 #define LTE_NETSTAT_NOT_REG_NOT_SEARCHING (0)
122 
125 #define LTE_NETSTAT_REG_HOME (1)
126 
130 #define LTE_NETSTAT_NOT_REG_SEARCHING (2)
131 
134 #define LTE_NETSTAT_REG_DENIED (3)
135 
138 #define LTE_NETSTAT_UNKNOWN (4)
139 
142 #define LTE_NETSTAT_REG_ROAMING (5)
143 
146 #define LTE_NETSTAT_REG_SMS_ONLY_HOME (6)
147 
150 #define LTE_NETSTAT_REG_SMS_ONLY_ROAMING (7)
151 
154 #define LTE_NETSTAT_NOT_REG_EMERGENCY (8)
155 
158 #define LTE_NETSTAT_REG_CSFB_NOT_PREF_HOME (9)
159 
162 #define LTE_NETSTAT_REG_CSFB_NOT_PREF_ROAMING (10)
163 
166 #define LTE_APN_LEN (101)
167 
170 #define LTE_APN_USER_NAME_LEN (64)
171 
174 #define LTE_APN_PASSWD_LEN (32)
175 
176 #define LTE_APN_IPTYPE_IP (0)
177 #define LTE_APN_IPTYPE_IPV6 (1)
178 #define LTE_APN_IPTYPE_IPV4V6 (2)
180 #define LTE_APN_AUTHTYPE_NONE (0)
181 #define LTE_APN_AUTHTYPE_PAP (1)
182 #define LTE_APN_AUTHTYPE_CHAP (2)
186 #define LTE_APN_TYPE_UNKNOWN (0x01)
187 
190 #define LTE_APN_TYPE_DEFAULT (0x02)
191 
194 #define LTE_APN_TYPE_MMS (0x04)
195 
198 #define LTE_APN_TYPE_SUPL (0x08)
199 
202 #define LTE_APN_TYPE_DUN (0x10)
203 
206 #define LTE_APN_TYPE_HIPRI (0x20)
207 
210 #define LTE_APN_TYPE_FOTA (0x40)
211 
214 #define LTE_APN_TYPE_IMS (0x80)
215 
218 #define LTE_APN_TYPE_CBS (0x100)
219 
222 #define LTE_APN_TYPE_IA (0x200)
223 
226 #define LTE_APN_TYPE_EMERGENCY (0x400)
227 
230 #define LTE_NETERR_MAXRETRY (0)
231 
234 #define LTE_NETERR_REJECT (1)
235 
238 #define LTE_NETERR_NWDTCH (2)
239 
242 #define LTE_REJECT_CATEGORY_EMM (0)
243 
246 #define LTE_REJECT_CATEGORY_ESM (1)
247 
250 #define LTE_VER_BB_PRODUCT_LEN (5)
251 
254 #define LTE_VER_NP_PACKAGE_LEN (32)
255 
256 #define LTE_PIN_ENABLE (true)
257 #define LTE_PIN_DISABLE (false)
261 #define LTE_PINSTAT_READY (0)
262 
265 #define LTE_PINSTAT_SIM_PIN (1)
266 
269 #define LTE_PINSTAT_SIM_PUK (2)
270 
273 #define LTE_PINSTAT_PH_SIM_PIN (3)
274 
277 #define LTE_PINSTAT_PH_FSIM_PIN (4)
278 
282 #define LTE_PINSTAT_PH_FSIM_PUK (5)
283 
286 #define LTE_PINSTAT_SIM_PIN2 (6)
287 
290 #define LTE_PINSTAT_SIM_PUK2 (7)
291 
294 #define LTE_PINSTAT_PH_NET_PIN (8)
295 
299 #define LTE_PINSTAT_PH_NET_PUK (9)
300 
303 #define LTE_PINSTAT_PH_NETSUB_PIN (10)
304 
308 #define LTE_PINSTAT_PH_NETSUB_PUK (11)
309 
313 #define LTE_PINSTAT_PH_SP_PIN (12)
314 
318 #define LTE_PINSTAT_PH_SP_PUK (13)
319 
322 #define LTE_PINSTAT_PH_CORP_PIN (14)
323 
327 #define LTE_PINSTAT_PH_CORP_PUK (15)
328 
329 #define LTE_TARGET_PIN (0)
330 #define LTE_TARGET_PIN2 (1)
334 #define LTE_SIMSTAT_REMOVAL (0)
335 
338 #define LTE_SIMSTAT_INSERTION (1)
339 
342 #define LTE_SIMSTAT_WAIT_PIN_UNLOCK (2)
343 
346 #define LTE_SIMSTAT_PERSONAL_FAILED (3)
347 
351 #define LTE_SIMSTAT_ACTIVATE (4)
352 
355 #define LTE_SIMSTAT_DEACTIVATE (5)
356 
357 #define LTE_MCC_DIGIT (3)
358 #define LTE_MNC_DIGIT_MAX (3)
362 #define LTE_CELLINFO_MCC_DIGIT LTE_MCC_DIGIT
363 
366 #define LTE_CELLINFO_MNC_DIGIT_MAX LTE_MNC_DIGIT_MAX
367 
368 #define LTE_EDRX_ACTTYPE_WBS1 (0)
369 #define LTE_EDRX_CYC_512 (0)
370 #define LTE_EDRX_CYC_1024 (1)
371 #define LTE_EDRX_CYC_2048 (2)
372 #define LTE_EDRX_CYC_4096 (3)
373 #define LTE_EDRX_CYC_6144 (4)
374 #define LTE_EDRX_CYC_8192 (5)
375 #define LTE_EDRX_CYC_10240 (6)
376 #define LTE_EDRX_CYC_12288 (7)
377 #define LTE_EDRX_CYC_14336 (8)
378 #define LTE_EDRX_CYC_16384 (9)
379 #define LTE_EDRX_CYC_32768 (10)
380 #define LTE_EDRX_CYC_65536 (11)
381 #define LTE_EDRX_CYC_131072 (12)
382 #define LTE_EDRX_CYC_262144 (13)
383 #define LTE_EDRX_PTW_128 (0)
384 #define LTE_EDRX_PTW_256 (1)
385 #define LTE_EDRX_PTW_384 (2)
386 #define LTE_EDRX_PTW_512 (3)
387 #define LTE_EDRX_PTW_640 (4)
388 #define LTE_EDRX_PTW_768 (5)
389 #define LTE_EDRX_PTW_896 (6)
390 #define LTE_EDRX_PTW_1024 (7)
391 #define LTE_EDRX_PTW_1152 (8)
392 #define LTE_EDRX_PTW_1280 (9)
393 #define LTE_EDRX_PTW_1408 (10)
394 #define LTE_EDRX_PTW_1536 (11)
395 #define LTE_EDRX_PTW_1664 (12)
396 #define LTE_EDRX_PTW_1792 (13)
397 #define LTE_EDRX_PTW_1920 (14)
398 #define LTE_EDRX_PTW_2048 (15)
402 #define LTE_PSM_T3324_UNIT_2SEC (0)
403 
406 #define LTE_PSM_T3324_UNIT_1MIN (1)
407 
410 #define LTE_PSM_T3324_UNIT_6MIN (2)
411 
415 #define LTE_PSM_T3324_UNIT_DEACT (3)
416 
419 #define LTE_PSM_T3412_UNIT_2SEC (0)
420 
423 #define LTE_PSM_T3412_UNIT_30SEC (1)
424 
427 #define LTE_PSM_T3412_UNIT_1MIN (2)
428 
431 #define LTE_PSM_T3412_UNIT_10MIN (3)
432 
435 #define LTE_PSM_T3412_UNIT_1HOUR (4)
436 
439 #define LTE_PSM_T3412_UNIT_10HOUR (5)
440 
443 #define LTE_PSM_T3412_UNIT_320HOUR (6)
444 
448 #define LTE_PSM_T3412_UNIT_DEACT (7)
449 
452 #define LTE_PSM_TIMEVAL_MIN (0)
453 
456 #define LTE_PSM_TIMEVAL_MAX (31)
457 
458 #define LTE_IPTYPE_V4 (0)
459 #define LTE_IPTYPE_V6 (1)
460 #define LTE_IPADDR_MAX_LEN (40)
464 #define LTE_PDN_SESSIONID_INVALID_ID (0)
465 
468 #define LTE_PDN_SESSIONID_MIN (LTE_PDN_SESSIONID_INVALID_ID)
469 
472 #define LTE_PDN_SESSIONID_MAX (255)
473 
474 #define LTE_PDN_DEACTIVE (0)
475 #define LTE_PDN_ACTIVE (1)
477 #define LTE_PDN_IPADDR_MAX_COUNT (2)
479 #define LTE_IMS_NOT_REGISTERED (0)
480 #define LTE_IMS_REGISTERED (1)
481 #define LTE_DATA_DISALLOW (0)
482 #define LTE_DATA_ALLOW (1)
486 #define LTE_RESTART_USER_INITIATED (0)
487 
490 #define LTE_RESTART_MODEM_INITIATED (1)
491 
494 #define LTE_ERR_INDICATOR_ERRCODE (0x01)
495 
498 #define LTE_ERR_INDICATOR_ERRNO (0x02)
499 
502 #define LTE_ERR_INDICATOR_ERRSTR (0x04)
503 
506 #define LTE_ERROR_STRING_MAX_LEN (64)
507 
510 #define LTE_SIMINFO_GETOPT_MCCMNC (1 << 0)
511 
514 #define LTE_SIMINFO_GETOPT_SPN (1 << 1)
515 
518 #define LTE_SIMINFO_GETOPT_ICCID (1 << 2)
519 
522 #define LTE_SIMINFO_GETOPT_IMSI (1 << 3)
523 
526 #define LTE_SIMINFO_GETOPT_GID1 (1 << 4)
527 
530 #define LTE_SIMINFO_GETOPT_GID2 (1 << 5)
531 
534 #define LTE_SIMINFO_MCC_DIGIT LTE_MCC_DIGIT
535 
538 #define LTE_SIMINFO_MNC_DIGIT_MAX LTE_MNC_DIGIT_MAX
539 
540 #define LTE_SIMINFO_SPN_LEN (16)
541 #define LTE_SIMINFO_ICCID_LEN (10)
542 #define LTE_SIMINFO_IMSI_LEN (15)
543 #define LTE_SIMINFO_GID_LEN (128)
545 /****************************************************************************
546  * Public Types
547  ****************************************************************************/
548 
557 typedef struct lte_version
558 {
562 
566 } lte_version_t;
567 
576 typedef struct lte_getpin
577 {
582  uint8_t enable;
583 
587  uint8_t status;
588 
592 
596 
600 
604 } lte_getpin_t;
605 
614 typedef struct lte_localtime
615 {
616  int32_t year;
617  int32_t mon;
618  int32_t mday;
619  int32_t hour;
620  int32_t min;
621  int32_t sec;
622  int32_t tz_sec;
624 
634 typedef struct lte_quality
635 {
643  bool valid;
644 
647  int16_t rsrp;
648 
651  int16_t rsrq;
652 
655  int16_t sinr;
656 
659  int16_t rssi;
660 } lte_quality_t;
661 
670 typedef struct lte_cellinfo
671 {
679  bool valid;
680 
683  uint32_t phycell_id;
684 
687  uint32_t earfcn;
688 
692 
695  uint8_t mnc_digit;
696 
701 
710 typedef struct lte_edrx_setting
711 {
715  uint8_t act_type;
716 
721  bool enable;
722 
739  uint32_t edrx_cycle;
740 
759  uint32_t ptw_val;
761 
769 typedef struct lte_psm_timeval
770 {
787  uint8_t unit;
788 
791  uint8_t time_val;
793 
802 typedef struct lte_psm_setting
803 {
808  bool enable;
809 
813 
818 
819 
820 
828 typedef struct lte_apn_setting
829 {
833  int8_t *apn;
834 
840  uint8_t ip_type;
841 
847  uint8_t auth_type;
848 
862  uint32_t apn_type;
863 
867  int8_t *user_name;
868 
872  int8_t *password;
874 
882 typedef struct lte_ipaddr
883 {
888  uint8_t ip_type;
889 
893  int8_t address[LTE_IPADDR_MAX_LEN];
894 } lte_ipaddr_t;
895 
903 typedef struct lte_pdn
904 {
908  uint8_t session_id;
909 
914  uint8_t active;
915 
929  uint32_t apn_type;
930 
933  uint8_t ipaddr_num;
934 
938 
945  uint8_t ims_register;
946 
951  uint8_t data_allow;
952 
959 } lte_pdn_t;
960 
968 typedef struct lte_reject_cause
969 {
970 
977  uint8_t category;
978 
984  uint8_t value;
986 
994 typedef struct lte_nw_err_info
995 {
1003  uint8_t err_type;
1004 
1013 
1021 typedef struct lte_netinfo
1022 {
1036  uint8_t nw_stat;
1037 
1045 
1048  uint8_t pdn_num;
1049 
1053 } lte_netinfo_t;
1054 
1062 typedef struct lte_error_info
1063 {
1069  uint8_t err_indicator;
1070 
1074 
1077  int32_t err_no;
1078 
1081  uint8_t err_string[LTE_ERROR_STRING_MAX_LEN];
1082 } lte_errinfo_t;
1083 
1084 
1093 typedef struct lte_ce_setting
1094 {
1100 
1107 
1116 typedef struct lte_siminfo
1117 {
1128  uint32_t option;
1129 
1134 
1138  uint8_t mnc_digit;
1139 
1144 
1148  uint8_t spn_len;
1149 
1153  uint8_t spn[LTE_SIMINFO_SPN_LEN];
1154 
1158  uint8_t iccid_len;
1159 
1164  uint8_t iccid[LTE_SIMINFO_ICCID_LEN];
1165 
1169  uint8_t imsi_len;
1170 
1174  uint8_t imsi[LTE_SIMINFO_IMSI_LEN];
1175 
1179  uint8_t gid1_len;
1180 
1184  uint8_t gid1[LTE_SIMINFO_GID_LEN];
1185 
1189  uint8_t gid2_len;
1190 
1194  uint8_t gid2[LTE_SIMINFO_GID_LEN];
1195 } lte_siminfo_t;
1196 
1208 typedef void (*get_ver_cb_t)(uint32_t result, lte_version_t *version);
1209 
1226 typedef void (*get_phoneno_cb_t)(uint32_t result, uint8_t errcause,
1227  int8_t *phoneno);
1228 
1244 typedef void (*get_imsi_cb_t)(uint32_t result, uint8_t errcause,
1245  int8_t *imsi);
1246 
1258 typedef void (*get_imei_cb_t)(uint32_t result, int8_t *imei);
1259 
1271 typedef void (*get_pinset_cb_t)(uint32_t result, lte_getpin_t *pinset);
1272 
1284 typedef void (*set_pinenable_cb_t)(uint32_t result, uint8_t attemptsleft);
1285 
1297 typedef void (*change_pin_cb_t)(uint32_t result, uint8_t attemptsleft);
1298 
1330 typedef void (*enter_pin_cb_t)(uint32_t result,
1331  uint8_t simstat,
1332  uint8_t attemptsleft);
1333 
1344 typedef void (*get_localtime_cb_t)(uint32_t result,
1345  lte_localtime_t *localtime);
1346 
1359 typedef void (*get_operator_cb_t)(uint32_t result, int8_t *oper);
1360 
1371 typedef void (*get_edrx_cb_t)(uint32_t result, lte_edrx_setting_t *settings);
1372 
1382 typedef void (*set_edrx_cb_t)(uint32_t result);
1383 
1394 typedef void (*get_psm_cb_t)(uint32_t result, lte_psm_setting_t *settings);
1395 
1405 typedef void (*set_psm_cb_t)(uint32_t result);
1406 
1417 typedef void (*get_ce_cb_t)(uint32_t result, lte_ce_setting_t *settings);
1418 
1428 typedef void (*set_ce_cb_t)(uint32_t result);
1429 
1443 typedef void (*simstat_report_cb_t)(uint32_t simstat);
1444 
1451 typedef void (*localtime_report_cb_t)(lte_localtime_t *localtime);
1452 
1459 typedef void (*quality_report_cb_t)(lte_quality_t *quality);
1460 
1467 typedef void (*cellinfo_report_cb_t)(lte_cellinfo_t *cellinfo);
1468 
1478 typedef void (*radio_on_cb_t)(uint32_t result);
1479 
1489 typedef void (*radio_off_cb_t)(uint32_t result);
1490 
1502 typedef void (*get_netinfo_cb_t)(uint32_t result, lte_netinfo_t *info);
1503 
1517 typedef void (*get_imscap_cb_t)(uint32_t result, bool imscap);
1518 
1530 typedef void (*activate_pdn_cb_t)(uint32_t result, lte_pdn_t *pdn);
1531 
1541 typedef void (*deactivate_pdn_cb_t)(uint32_t result);
1542 
1552 typedef void (*data_allow_cb_t)(uint32_t result);
1553 
1563 typedef void (*restart_report_cb_t)(uint32_t reason);
1564 
1572 typedef void (*netinfo_report_cb_t)(lte_netinfo_t *info);
1573 
1584 typedef void (*get_siminfo_cb_t)(uint32_t result, lte_siminfo_t *siminfo);
1585 
1596 typedef void (*get_dynamic_edrx_param_cb_t)(uint32_t result,
1597  lte_edrx_setting_t *param);
1598 
1609 typedef void (*get_dynamic_psm_param_cb_t)(uint32_t result,
1610  lte_psm_setting_t *param);
1611 
1622 typedef void (*get_quality_cb_t)(uint32_t result,
1623  lte_quality_t *quality);
1624 
1625 #ifdef __cplusplus
1626 #define EXTERN extern "C"
1627 extern "C"
1628 {
1629 #else
1630 #define EXTERN extern
1631 #endif
1632 
1633 /****************************************************************************
1634  * Public Function Prototypes
1635  ****************************************************************************/
1636 
1647 int32_t lte_initialize(void);
1648 
1656 int32_t lte_finalize(void);
1657 
1681 int32_t lte_set_report_restart(restart_report_cb_t restart_callback);
1682 
1693 int32_t lte_power_on(void);
1694 
1709 int32_t lte_power_off(void);
1710 
1721 int32_t lte_radio_on(radio_on_cb_t callback);
1722 
1735 int32_t lte_radio_off(radio_off_cb_t callback);
1736 
1747 int32_t lte_get_netinfo(get_netinfo_cb_t callback);
1748 
1765 int32_t lte_activate_pdn(lte_apn_setting_t *apn, activate_pdn_cb_t callback);
1766 
1774 int32_t lte_activate_pdn_cancel(void);
1775 
1791 int32_t lte_deactivate_pdn(uint8_t session_id, deactivate_pdn_cb_t callback);
1792 
1815 int32_t lte_data_allow(uint8_t session_id, uint8_t allow,
1816  uint8_t roaming_allow, data_allow_cb_t callback);
1817 
1828 int32_t lte_get_imscap(get_imscap_cb_t callback);
1829 
1840 int32_t lte_get_version(get_ver_cb_t callback);
1841 
1852 int32_t lte_get_phoneno(get_phoneno_cb_t callback);
1853 
1864 int32_t lte_get_imsi(get_imsi_cb_t callback);
1865 
1876 int32_t lte_get_imei(get_imei_cb_t callback);
1877 
1888 int32_t lte_get_pinset(get_pinset_cb_t callback);
1889 
1907 int32_t lte_set_pinenable(bool enable, int8_t *pincode,
1908  set_pinenable_cb_t callback);
1909 
1931 int32_t lte_change_pin(int8_t target_pin, int8_t *pincode,
1932  int8_t *new_pincode, change_pin_cb_t callback);
1933 
1953 int32_t lte_enter_pin(int8_t *pincode, int8_t *new_pincode,
1954  enter_pin_cb_t callback);
1955 
1966 int32_t lte_get_localtime(get_localtime_cb_t callback);
1967 
1978 int32_t lte_get_operator(get_operator_cb_t callback);
1979 
1990 int32_t lte_get_edrx(get_edrx_cb_t callback);
1991 
2003 int32_t lte_set_edrx(lte_edrx_setting_t *settings,
2004  set_edrx_cb_t callback);
2005 
2016 int32_t lte_get_psm(get_psm_cb_t callback);
2017 
2029 int32_t lte_set_psm(lte_psm_setting_t *settings,
2030  set_psm_cb_t callback);
2031 
2042 int32_t lte_get_ce(get_ce_cb_t callback);
2043 
2055 int32_t lte_set_ce(lte_ce_setting_t *settings,
2056  set_ce_cb_t callback);
2057 
2070 int32_t lte_set_report_simstat(simstat_report_cb_t simstat_callback);
2071 
2084 int32_t lte_set_report_localtime(localtime_report_cb_t localtime_callback);
2085 
2099 int32_t lte_set_report_quality(quality_report_cb_t quality_callback,
2100  uint32_t period);
2101 
2115 int32_t lte_set_report_cellinfo(cellinfo_report_cb_t cellinfo_callback,
2116  uint32_t period);
2117 
2130 int32_t lte_set_report_netinfo(netinfo_report_cb_t netinfo_callback);
2131 
2143 int32_t lte_get_errinfo(lte_errinfo_t *info);
2144 
2163 int32_t lte_get_siminfo(uint32_t option, get_siminfo_cb_t callback);
2164 
2179 
2194 
2205 int32_t lte_get_quality(get_quality_cb_t callback);
2206 
2209 #undef EXTERN
2210 #ifdef __cplusplus
2211 }
2212 #endif
2213 
2218 #endif /* __MODULES_INCLUDE_LTE_LTE_API_H */
int32_t lte_set_report_localtime(localtime_report_cb_t localtime_callback)
int32_t lte_set_report_netinfo(netinfo_report_cb_t netinfo_callback)
uint8_t pdn_num
Definition: lte_api.h:1048
int8_t * apn
Definition: lte_api.h:833
int32_t tz_sec
Definition: lte_api.h:622
#define LTE_SIMINFO_IMSI_LEN
Definition: lte_api.h:542
void(* set_psm_cb_t)(uint32_t result)
Definition: lte_api.h:1405
void(* get_operator_cb_t)(uint32_t result, int8_t *oper)
Definition: lte_api.h:1359
int32_t lte_set_report_cellinfo(cellinfo_report_cb_t cellinfo_callback, uint32_t period)
struct lte_psm_setting lte_psm_setting_t
int8_t np_package[LTE_VER_NP_PACKAGE_LEN]
Definition: lte_api.h:565
void(* set_ce_cb_t)(uint32_t result)
Definition: lte_api.h:1428
lte_pdn_t * pdn_stat
Definition: lte_api.h:1052
struct lte_netinfo lte_netinfo_t
#define LTE_CELLINFO_MNC_DIGIT_MAX
Definition: lte_api.h:366
int32_t err_result_code
Definition: lte_api.h:1073
int32_t lte_data_allow(uint8_t session_id, uint8_t allow, uint8_t roaming_allow, data_allow_cb_t callback)
Definition: lte_api.h:634
void(* get_psm_cb_t)(uint32_t result, lte_psm_setting_t *settings)
Definition: lte_api.h:1394
int32_t lte_set_ce(lte_ce_setting_t *settings, set_ce_cb_t callback)
int32_t lte_get_phoneno(get_phoneno_cb_t callback)
Definition: lte_api.h:557
void(* radio_off_cb_t)(uint32_t result)
Definition: lte_api.h:1489
struct lte_pdn lte_pdn_t
void(* localtime_report_cb_t)(lte_localtime_t *localtime)
Definition: lte_api.h:1451
Definition: lte_api.h:710
int32_t lte_get_operator(get_operator_cb_t callback)
uint8_t gid1_len
Definition: lte_api.h:1179
Definition: lte_api.h:802
int32_t lte_set_edrx(lte_edrx_setting_t *settings, set_edrx_cb_t callback)
void(* restart_report_cb_t)(uint32_t reason)
Definition: lte_api.h:1563
Definition: lte_api.h:882
uint8_t category
Definition: lte_api.h:977
void(* deactivate_pdn_cb_t)(uint32_t result)
Definition: lte_api.h:1541
Definition: lte_api.h:1116
Definition: lte_api.h:828
int32_t lte_get_pinset(get_pinset_cb_t callback)
struct lte_edrx_setting lte_edrx_setting_t
uint8_t auth_type
Definition: lte_api.h:847
void(* change_pin_cb_t)(uint32_t result, uint8_t attemptsleft)
Definition: lte_api.h:1297
struct lte_quality lte_quality_t
void(* radio_on_cb_t)(uint32_t result)
Definition: lte_api.h:1478
void(* get_imscap_cb_t)(uint32_t result, bool imscap)
Definition: lte_api.h:1517
uint8_t ims_register
Definition: lte_api.h:945
uint32_t edrx_cycle
Definition: lte_api.h:739
void(* get_ce_cb_t)(uint32_t result, lte_ce_setting_t *settings)
Definition: lte_api.h:1417
int32_t lte_radio_on(radio_on_cb_t callback)
#define LTE_SIMINFO_SPN_LEN
Definition: lte_api.h:540
void(* get_dynamic_edrx_param_cb_t)(uint32_t result, lte_edrx_setting_t *param)
Definition: lte_api.h:1596
Definition: lte_api.h:1093
int32_t hour
Definition: lte_api.h:619
Definition: lte_api.h:614
uint8_t err_indicator
Definition: lte_api.h:1069
Definition: lte_api.h:994
uint8_t mnc_digit
Definition: lte_api.h:1138
void(* set_edrx_cb_t)(uint32_t result)
Definition: lte_api.h:1382
uint8_t nw_stat
Definition: lte_api.h:1036
bool mode_a_enable
Definition: lte_api.h:1099
uint8_t status
Definition: lte_api.h:587
void(* get_siminfo_cb_t)(uint32_t result, lte_siminfo_t *siminfo)
Definition: lte_api.h:1584
void(* set_pinenable_cb_t)(uint32_t result, uint8_t attemptsleft)
Definition: lte_api.h:1284
int32_t lte_power_off(void)
int32_t lte_set_report_simstat(simstat_report_cb_t simstat_callback)
int32_t lte_get_localtime(get_localtime_cb_t callback)
lte_psm_timeval_t ext_periodic_tau_time
Definition: lte_api.h:816
int32_t lte_get_ce(get_ce_cb_t callback)
Definition: lte_api.h:1062
int32_t lte_power_on(void)
int32_t lte_get_siminfo(uint32_t option, get_siminfo_cb_t callback)
void(* get_dynamic_psm_param_cb_t)(uint32_t result, lte_psm_setting_t *param)
Definition: lte_api.h:1609
uint8_t pin2_attemptsleft
Definition: lte_api.h:599
struct lte_apn_setting lte_apn_setting_t
int32_t lte_deactivate_pdn(uint8_t session_id, deactivate_pdn_cb_t callback)
bool valid
Definition: lte_api.h:643
int32_t lte_enter_pin(int8_t *pincode, int8_t *new_pincode, enter_pin_cb_t callback)
bool valid
Definition: lte_api.h:679
#define LTE_SIMINFO_ICCID_LEN
Definition: lte_api.h:541
int32_t lte_get_psm(get_psm_cb_t callback)
void(* simstat_report_cb_t)(uint32_t simstat)
Definition: lte_api.h:1443
uint8_t imsi_len
Definition: lte_api.h:1169
void(* get_ver_cb_t)(uint32_t result, lte_version_t *version)
Definition: lte_api.h:1208
void(* get_quality_cb_t)(uint32_t result, lte_quality_t *quality)
Definition: lte_api.h:1622
uint8_t mnc_digit
Definition: lte_api.h:695
uint32_t phycell_id
Definition: lte_api.h:683
int32_t lte_activate_pdn_cancel(void)
int32_t lte_get_edrx(get_edrx_cb_t callback)
uint32_t apn_type
Definition: lte_api.h:862
uint32_t earfcn
Definition: lte_api.h:687
int32_t lte_activate_pdn(lte_apn_setting_t *apn, activate_pdn_cb_t callback)
uint8_t ip_type
Definition: lte_api.h:888
int32_t lte_set_report_restart(restart_report_cb_t restart_callback)
void(* get_edrx_cb_t)(uint32_t result, lte_edrx_setting_t *settings)
Definition: lte_api.h:1371
uint32_t apn_type
Definition: lte_api.h:929
uint8_t enable
Definition: lte_api.h:582
void(* get_pinset_cb_t)(uint32_t result, lte_getpin_t *pinset)
Definition: lte_api.h:1271
lte_nw_err_info_t nw_err
Definition: lte_api.h:1044
#define LTE_VER_NP_PACKAGE_LEN
Definition: lte_api.h:254
uint8_t gid2_len
Definition: lte_api.h:1189
int32_t lte_get_netinfo(get_netinfo_cb_t callback)
uint8_t data_allow
Definition: lte_api.h:951
uint8_t data_roaming_allow
Definition: lte_api.h:958
struct lte_cellinfo lte_cellinfo_t
uint8_t spn_len
Definition: lte_api.h:1148
lte_reject_cause_t reject_cause
Definition: lte_api.h:1011
int16_t sinr
Definition: lte_api.h:655
int32_t min
Definition: lte_api.h:620
uint8_t puk_attemptsleft
Definition: lte_api.h:595
struct lte_reject_cause lte_reject_cause_t
void(* activate_pdn_cb_t)(uint32_t result, lte_pdn_t *pdn)
Definition: lte_api.h:1530
int32_t mon
Definition: lte_api.h:617
Definition: lte_api.h:670
uint8_t iccid_len
Definition: lte_api.h:1158
int32_t lte_get_version(get_ver_cb_t callback)
void(* cellinfo_report_cb_t)(lte_cellinfo_t *cellinfo)
Definition: lte_api.h:1467
int32_t lte_change_pin(int8_t target_pin, int8_t *pincode, int8_t *new_pincode, change_pin_cb_t callback)
uint8_t value
Definition: lte_api.h:984
Definition: lte_api.h:1021
int32_t lte_set_psm(lte_psm_setting_t *settings, set_psm_cb_t callback)
uint8_t pin_attemptsleft
Definition: lte_api.h:591
#define LTE_IPADDR_MAX_LEN
Definition: lte_api.h:460
uint8_t puk2_attemptsleft
Definition: lte_api.h:603
int32_t year
Definition: lte_api.h:616
void(* get_imei_cb_t)(uint32_t result, int8_t *imei)
Definition: lte_api.h:1258
Definition: lte_api.h:576
struct lte_siminfo lte_siminfo_t
int32_t lte_get_dynamic_edrx_param(get_dynamic_edrx_param_cb_t callback)
lte_psm_timeval_t req_active_time
Definition: lte_api.h:812
#define LTE_ERROR_STRING_MAX_LEN
Definition: lte_api.h:506
int32_t lte_radio_off(radio_off_cb_t callback)
int16_t rssi
Definition: lte_api.h:659
struct lte_nw_err_info lte_nw_err_info_t
uint32_t option
Definition: lte_api.h:1128
void(* get_netinfo_cb_t)(uint32_t result, lte_netinfo_t *info)
Definition: lte_api.h:1502
int32_t lte_get_imei(get_imei_cb_t callback)
#define LTE_PDN_IPADDR_MAX_COUNT
Definition: lte_api.h:477
#define LTE_VER_BB_PRODUCT_LEN
Definition: lte_api.h:250
int32_t lte_get_imsi(get_imsi_cb_t callback)
void(* quality_report_cb_t)(lte_quality_t *quality)
Definition: lte_api.h:1459
struct lte_getpin lte_getpin_t
uint8_t act_type
Definition: lte_api.h:715
int32_t lte_get_dynamic_psm_param(get_dynamic_psm_param_cb_t callback)
int32_t err_no
Definition: lte_api.h:1077
int32_t lte_get_errinfo(lte_errinfo_t *info)
int32_t sec
Definition: lte_api.h:621
bool mode_b_enable
Definition: lte_api.h:1105
void(* get_imsi_cb_t)(uint32_t result, uint8_t errcause, int8_t *imsi)
Definition: lte_api.h:1244
uint8_t active
Definition: lte_api.h:914
struct lte_error_info lte_errinfo_t
uint8_t ip_type
Definition: lte_api.h:840
uint8_t err_type
Definition: lte_api.h:1003
int32_t lte_get_quality(get_quality_cb_t callback)
struct lte_ce_setting lte_ce_setting_t
uint8_t session_id
Definition: lte_api.h:908
int32_t lte_get_imscap(get_imscap_cb_t callback)
int32_t mday
Definition: lte_api.h:618
void(* get_phoneno_cb_t)(uint32_t result, uint8_t errcause, int8_t *phoneno)
Definition: lte_api.h:1226
#define LTE_SIMINFO_MNC_DIGIT_MAX
Definition: lte_api.h:538
uint32_t ptw_val
Definition: lte_api.h:759
struct lte_ipaddr lte_ipaddr_t
bool enable
Definition: lte_api.h:721
Definition: lte_api.h:903
Definition: lte_api.h:769
int32_t lte_finalize(void)
int32_t lte_set_report_quality(quality_report_cb_t quality_callback, uint32_t period)
struct lte_version lte_version_t
#define LTE_SIMINFO_MCC_DIGIT
Definition: lte_api.h:534
uint8_t unit
Definition: lte_api.h:787
void(* netinfo_report_cb_t)(lte_netinfo_t *info)
Definition: lte_api.h:1572
Definition: lte_api.h:968
void(* get_localtime_cb_t)(uint32_t result, lte_localtime_t *localtime)
Definition: lte_api.h:1344
int8_t * password
Definition: lte_api.h:872
void(* data_allow_cb_t)(uint32_t result)
Definition: lte_api.h:1552
uint8_t ipaddr_num
Definition: lte_api.h:933
uint8_t time_val
Definition: lte_api.h:791
int8_t * user_name
Definition: lte_api.h:867
#define LTE_SIMINFO_GID_LEN
Definition: lte_api.h:543
#define LTE_CELLINFO_MCC_DIGIT
Definition: lte_api.h:362
int8_t bb_product[LTE_VER_BB_PRODUCT_LEN]
Definition: lte_api.h:561
int16_t rsrp
Definition: lte_api.h:647
struct lte_psm_timeval lte_psm_timeval_t
struct lte_localtime lte_localtime_t
int32_t lte_set_pinenable(bool enable, int8_t *pincode, set_pinenable_cb_t callback)
int32_t lte_initialize(void)
int16_t rsrq
Definition: lte_api.h:651
void(* enter_pin_cb_t)(uint32_t result, uint8_t simstat, uint8_t attemptsleft)
Definition: lte_api.h:1330
bool enable
Definition: lte_api.h:808