Developer World
Spresense SDK Library v2.0.1-3834d32
lte_api.h
Go to the documentation of this file.
1 /****************************************************************************
2  * modules/include/lte/lte_api.h
3  *
4  * Copyright 2018, 2019, 2020 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 
192 /****************************************************************************
193  * Included Files
194  ****************************************************************************/
195 
196 #include <stdbool.h>
197 #include <stdint.h>
198 
199 /****************************************************************************
200  * Pre-processor Definitions
201  ****************************************************************************/
202 
203 #define LTE_RESULT_OK (0)
204 #define LTE_RESULT_ERROR (1)
205 #define LTE_RESULT_CANCEL (2)
207 #define LTE_VALID (true)
208 #define LTE_INVALID (false)
210 #define LTE_ENABLE (true)
211 #define LTE_DISABLE (false)
213 #define LTE_ERR_WAITENTERPIN (1)
214 #define LTE_ERR_REJECT (2)
215 #define LTE_ERR_MAXRETRY (3)
216 #define LTE_ERR_BARRING (4)
217 #define LTE_ERR_DETACHED (5)
218 #define LTE_ERR_UNEXPECTED (255)
220 #define LTE_SESSION_ID_MIN (1)
221 #define LTE_SESSION_ID_MAX (5)
226 #define LTE_NETSTAT_NOT_REG_NOT_SEARCHING (0)
227 
230 #define LTE_NETSTAT_REG_HOME (1)
231 
235 #define LTE_NETSTAT_NOT_REG_SEARCHING (2)
236 
239 #define LTE_NETSTAT_REG_DENIED (3)
240 
243 #define LTE_NETSTAT_UNKNOWN (4)
244 
247 #define LTE_NETSTAT_REG_ROAMING (5)
248 
251 #define LTE_NETSTAT_REG_SMS_ONLY_HOME (6)
252 
255 #define LTE_NETSTAT_REG_SMS_ONLY_ROAMING (7)
256 
259 #define LTE_NETSTAT_NOT_REG_EMERGENCY (8)
260 
263 #define LTE_NETSTAT_REG_CSFB_NOT_PREF_HOME (9)
264 
267 #define LTE_NETSTAT_REG_CSFB_NOT_PREF_ROAMING (10)
268 
271 #define LTE_APN_LEN (101)
272 
275 #define LTE_APN_USER_NAME_LEN (64)
276 
279 #define LTE_APN_PASSWD_LEN (32)
280 
281 #define LTE_IPTYPE_V4 (0)
282 #define LTE_IPTYPE_V6 (1)
283 #define LTE_IPTYPE_V4V6 (2)
288 #define LTE_APN_IPTYPE_IP LTE_IPTYPE_V4
289 
293 #define LTE_APN_IPTYPE_IPV6 LTE_IPTYPE_V6
294 
298 #define LTE_APN_IPTYPE_IPV4V6 LTE_IPTYPE_V4V6
299 
300 #define LTE_APN_AUTHTYPE_NONE (0)
301 #define LTE_APN_AUTHTYPE_PAP (1)
302 #define LTE_APN_AUTHTYPE_CHAP (2)
306 #define LTE_APN_TYPE_UNKNOWN (0x01)
307 
310 #define LTE_APN_TYPE_DEFAULT (0x02)
311 
314 #define LTE_APN_TYPE_MMS (0x04)
315 
318 #define LTE_APN_TYPE_SUPL (0x08)
319 
322 #define LTE_APN_TYPE_DUN (0x10)
323 
326 #define LTE_APN_TYPE_HIPRI (0x20)
327 
330 #define LTE_APN_TYPE_FOTA (0x40)
331 
334 #define LTE_APN_TYPE_IMS (0x80)
335 
338 #define LTE_APN_TYPE_CBS (0x100)
339 
342 #define LTE_APN_TYPE_IA (0x200)
343 
346 #define LTE_APN_TYPE_EMERGENCY (0x400)
347 
350 #define LTE_NETERR_MAXRETRY (0)
351 
354 #define LTE_NETERR_REJECT (1)
355 
358 #define LTE_NETERR_NWDTCH (2)
359 
362 #define LTE_REJECT_CATEGORY_EMM (0)
363 
366 #define LTE_REJECT_CATEGORY_ESM (1)
367 
370 #define LTE_VER_BB_PRODUCT_LEN (5)
371 
374 #define LTE_VER_NP_PACKAGE_LEN (32)
375 
379 #define LTE_PIN_ENABLE LTE_ENABLE
380 
384 #define LTE_PIN_DISABLE LTE_DISABLE
385 
388 #define LTE_PINSTAT_READY (0)
389 
392 #define LTE_PINSTAT_SIM_PIN (1)
393 
396 #define LTE_PINSTAT_SIM_PUK (2)
397 
400 #define LTE_PINSTAT_PH_SIM_PIN (3)
401 
404 #define LTE_PINSTAT_PH_FSIM_PIN (4)
405 
409 #define LTE_PINSTAT_PH_FSIM_PUK (5)
410 
413 #define LTE_PINSTAT_SIM_PIN2 (6)
414 
417 #define LTE_PINSTAT_SIM_PUK2 (7)
418 
421 #define LTE_PINSTAT_PH_NET_PIN (8)
422 
426 #define LTE_PINSTAT_PH_NET_PUK (9)
427 
430 #define LTE_PINSTAT_PH_NETSUB_PIN (10)
431 
435 #define LTE_PINSTAT_PH_NETSUB_PUK (11)
436 
440 #define LTE_PINSTAT_PH_SP_PIN (12)
441 
445 #define LTE_PINSTAT_PH_SP_PUK (13)
446 
449 #define LTE_PINSTAT_PH_CORP_PIN (14)
450 
454 #define LTE_PINSTAT_PH_CORP_PUK (15)
455 
456 #define LTE_TARGET_PIN (0)
457 #define LTE_TARGET_PIN2 (1)
461 #define LTE_SIMSTAT_REMOVAL (0)
462 
465 #define LTE_SIMSTAT_INSERTION (1)
466 
469 #define LTE_SIMSTAT_WAIT_PIN_UNLOCK (2)
470 
473 #define LTE_SIMSTAT_PERSONAL_FAILED (3)
474 
478 #define LTE_SIMSTAT_ACTIVATE (4)
479 
482 #define LTE_SIMSTAT_DEACTIVATE (5)
483 
484 #define LTE_MCC_DIGIT (3)
485 #define LTE_MNC_DIGIT_MAX (3)
490 #define LTE_CELLINFO_MCC_DIGIT LTE_MCC_DIGIT
491 
495 #define LTE_CELLINFO_MNC_DIGIT_MAX LTE_MNC_DIGIT_MAX
496 
497 #define LTE_EDRX_ACTTYPE_WBS1 (0)
498 #define LTE_EDRX_ACTTYPE_NBS1 (1)
499 #define LTE_EDRX_ACTTYPE_ECGSMIOT (2)
500 #define LTE_EDRX_ACTTYPE_GSM (3)
501 #define LTE_EDRX_ACTTYPE_IU (4)
502 #define LTE_EDRX_ACTTYPE_NOTUSE (5)
504 #define LTE_EDRX_CYC_512 (0)
505 #define LTE_EDRX_CYC_1024 (1)
506 #define LTE_EDRX_CYC_2048 (2)
507 #define LTE_EDRX_CYC_4096 (3)
508 #define LTE_EDRX_CYC_6144 (4)
509 #define LTE_EDRX_CYC_8192 (5)
510 #define LTE_EDRX_CYC_10240 (6)
511 #define LTE_EDRX_CYC_12288 (7)
512 #define LTE_EDRX_CYC_14336 (8)
513 #define LTE_EDRX_CYC_16384 (9)
514 #define LTE_EDRX_CYC_32768 (10)
515 #define LTE_EDRX_CYC_65536 (11)
516 #define LTE_EDRX_CYC_131072 (12)
517 #define LTE_EDRX_CYC_262144 (13)
518 #define LTE_EDRX_PTW_128 (0)
519 #define LTE_EDRX_PTW_256 (1)
520 #define LTE_EDRX_PTW_384 (2)
521 #define LTE_EDRX_PTW_512 (3)
522 #define LTE_EDRX_PTW_640 (4)
523 #define LTE_EDRX_PTW_768 (5)
524 #define LTE_EDRX_PTW_896 (6)
525 #define LTE_EDRX_PTW_1024 (7)
526 #define LTE_EDRX_PTW_1152 (8)
527 #define LTE_EDRX_PTW_1280 (9)
528 #define LTE_EDRX_PTW_1408 (10)
529 #define LTE_EDRX_PTW_1536 (11)
530 #define LTE_EDRX_PTW_1664 (12)
531 #define LTE_EDRX_PTW_1792 (13)
532 #define LTE_EDRX_PTW_1920 (14)
533 #define LTE_EDRX_PTW_2048 (15)
537 #define LTE_PSM_T3324_UNIT_2SEC (0)
538 
541 #define LTE_PSM_T3324_UNIT_1MIN (1)
542 
545 #define LTE_PSM_T3324_UNIT_6MIN (2)
546 
550 #define LTE_PSM_T3324_UNIT_DEACT (3)
551 
554 #define LTE_PSM_T3412_UNIT_2SEC (0)
555 
558 #define LTE_PSM_T3412_UNIT_30SEC (1)
559 
562 #define LTE_PSM_T3412_UNIT_1MIN (2)
563 
566 #define LTE_PSM_T3412_UNIT_10MIN (3)
567 
570 #define LTE_PSM_T3412_UNIT_1HOUR (4)
571 
574 #define LTE_PSM_T3412_UNIT_10HOUR (5)
575 
578 #define LTE_PSM_T3412_UNIT_320HOUR (6)
579 
583 #define LTE_PSM_T3412_UNIT_DEACT (7)
584 
587 #define LTE_PSM_TIMEVAL_MIN (0)
588 
591 #define LTE_PSM_TIMEVAL_MAX (31)
592 
593 #define LTE_IPADDR_MAX_LEN (40)
597 #define LTE_PDN_SESSIONID_INVALID_ID (0)
598 
601 #define LTE_PDN_SESSIONID_MIN (LTE_PDN_SESSIONID_INVALID_ID)
602 
605 #define LTE_PDN_SESSIONID_MAX (255)
606 
607 #define LTE_PDN_DEACTIVE (0)
608 #define LTE_PDN_ACTIVE (1)
610 #define LTE_PDN_IPADDR_MAX_COUNT (2)
612 #define LTE_IMS_NOT_REGISTERED (0)
613 #define LTE_IMS_REGISTERED (1)
614 #define LTE_DATA_DISALLOW (0)
615 #define LTE_DATA_ALLOW (1)
619 #define LTE_RESTART_USER_INITIATED (0)
620 
623 #define LTE_RESTART_MODEM_INITIATED (1)
624 
627 #define LTE_ERR_INDICATOR_ERRCODE (0x01)
628 
631 #define LTE_ERR_INDICATOR_ERRNO (0x02)
632 
635 #define LTE_ERR_INDICATOR_ERRSTR (0x04)
636 
639 #define LTE_ERROR_STRING_MAX_LEN (64)
640 
643 #define LTE_SIMINFO_GETOPT_MCCMNC (1 << 0)
644 
647 #define LTE_SIMINFO_GETOPT_SPN (1 << 1)
648 
651 #define LTE_SIMINFO_GETOPT_ICCID (1 << 2)
652 
655 #define LTE_SIMINFO_GETOPT_IMSI (1 << 3)
656 
659 #define LTE_SIMINFO_GETOPT_GID1 (1 << 4)
660 
663 #define LTE_SIMINFO_GETOPT_GID2 (1 << 5)
664 
668 #define LTE_SIMINFO_MCC_DIGIT LTE_MCC_DIGIT
669 
673 #define LTE_SIMINFO_MNC_DIGIT_MAX LTE_MNC_DIGIT_MAX
674 
675 #define LTE_SIMINFO_SPN_LEN (16)
676 #define LTE_SIMINFO_ICCID_LEN (10)
677 #define LTE_SIMINFO_IMSI_LEN (15)
678 #define LTE_SIMINFO_GID_LEN (128)
680 #define LTE_PHONENO_LEN (41)
681 #define LTE_IMEI_LEN (16)
682 #define LTE_OPERATOR_LEN (17)
684 /****************************************************************************
685  * Public Types
686  ****************************************************************************/
687 
698 typedef struct lte_version
699 {
703 
707 } lte_version_t;
708 
719 typedef struct lte_getpin
720 {
725  uint8_t enable;
726 
730  uint8_t status;
731 
735 
739 
743 
747 } lte_getpin_t;
748 
759 typedef struct lte_localtime
760 {
761  int32_t year;
762  int32_t mon;
763  int32_t mday;
764  int32_t hour;
765  int32_t min;
766  int32_t sec;
767  int32_t tz_sec;
769 
781 typedef struct lte_quality
782 {
791  bool valid;
792 
795  int16_t rsrp;
796 
799  int16_t rsrq;
800 
803  int16_t sinr;
804 
807  int16_t rssi;
808 } lte_quality_t;
809 
820 typedef struct lte_cellinfo
821 {
830  bool valid;
831 
834  uint32_t phycell_id;
835 
838  uint32_t earfcn;
839 
842  uint8_t mcc[LTE_MCC_DIGIT];
843 
846  uint8_t mnc_digit;
847 
850  uint8_t mnc[LTE_MNC_DIGIT_MAX];
852 
863 typedef struct lte_edrx_setting
864 {
873  uint8_t act_type;
874 
879  bool enable;
880 
900  uint32_t edrx_cycle;
901 
923  uint32_t ptw_val;
925 
935 typedef struct lte_psm_timeval
936 {
954  uint8_t unit;
955 
958  uint8_t time_val;
960 
971 typedef struct lte_psm_setting
972 {
977  bool enable;
978 
982 
987 
988 
989 
999 typedef struct lte_apn_setting
1000 {
1004  int8_t *apn;
1005 
1011  uint8_t ip_type;
1012 
1018  uint8_t auth_type;
1019 
1033  uint32_t apn_type;
1034 
1038  int8_t *user_name;
1039 
1043  int8_t *password;
1045 
1055 typedef struct lte_ipaddr
1056 {
1061  uint8_t ip_type;
1062 
1066  int8_t address[LTE_IPADDR_MAX_LEN];
1067 } lte_ipaddr_t;
1068 
1078 typedef struct lte_pdn
1079 {
1083  uint8_t session_id;
1084 
1089  uint8_t active;
1090 
1104  uint32_t apn_type;
1105 
1108  uint8_t ipaddr_num;
1109 
1113 
1120  uint8_t ims_register;
1121 
1126  uint8_t data_allow;
1127 
1134 } lte_pdn_t;
1135 
1145 typedef struct lte_reject_cause
1146 {
1147 
1154  uint8_t category;
1155 
1161  uint8_t value;
1163 
1173 typedef struct lte_nw_err_info
1174 {
1182  uint8_t err_type;
1183 
1192 
1202 typedef struct lte_netinfo
1203 {
1217  uint8_t nw_stat;
1218 
1226 
1230  uint8_t pdn_num;
1231 
1239 } lte_netinfo_t;
1240 
1250 typedef struct lte_error_info
1251 {
1257  uint8_t err_indicator;
1258 
1262 
1265  int32_t err_no;
1266 
1269  uint8_t err_string[LTE_ERROR_STRING_MAX_LEN];
1270 } lte_errinfo_t;
1271 
1272 
1283 typedef struct lte_ce_setting
1284 {
1290 
1297 
1308 typedef struct lte_siminfo
1309 {
1320  uint32_t option;
1321 
1325  uint8_t mcc[LTE_MCC_DIGIT];
1326 
1330  uint8_t mnc_digit;
1331 
1335  uint8_t mnc[LTE_MNC_DIGIT_MAX];
1336 
1340  uint8_t spn_len;
1341 
1345  uint8_t spn[LTE_SIMINFO_SPN_LEN];
1346 
1350  uint8_t iccid_len;
1351 
1356  uint8_t iccid[LTE_SIMINFO_ICCID_LEN];
1357 
1361  uint8_t imsi_len;
1362 
1366  uint8_t imsi[LTE_SIMINFO_IMSI_LEN];
1367 
1371  uint8_t gid1_len;
1372 
1376  uint8_t gid1[LTE_SIMINFO_GID_LEN];
1377 
1381  uint8_t gid2_len;
1382 
1386  uint8_t gid2[LTE_SIMINFO_GID_LEN];
1387 } lte_siminfo_t;
1388 
1403 typedef void (*get_ver_cb_t)(uint32_t result, lte_version_t *version);
1404 
1424 typedef void (*get_phoneno_cb_t)(uint32_t result, uint8_t errcause,
1425  int8_t *phoneno);
1426 
1445 typedef void (*get_imsi_cb_t)(uint32_t result, uint8_t errcause,
1446  int8_t *imsi);
1447 
1462 typedef void (*get_imei_cb_t)(uint32_t result, int8_t *imei);
1463 
1478 typedef void (*get_pinset_cb_t)(uint32_t result, lte_getpin_t *pinset);
1479 
1494 typedef void (*set_pinenable_cb_t)(uint32_t result, uint8_t attemptsleft);
1495 
1510 typedef void (*change_pin_cb_t)(uint32_t result, uint8_t attemptsleft);
1511 
1547 typedef void (*enter_pin_cb_t)(uint32_t result,
1548  uint8_t simstat,
1549  uint8_t attemptsleft);
1550 
1564 typedef void (*get_localtime_cb_t)(uint32_t result,
1565  lte_localtime_t *localtime);
1566 
1582 typedef void (*get_operator_cb_t)(uint32_t result, int8_t *oper);
1583 
1597 typedef void (*get_edrx_cb_t)(uint32_t result, lte_edrx_setting_t *settings);
1598 
1610 typedef void (*set_edrx_cb_t)(uint32_t result);
1611 
1625 typedef void (*get_psm_cb_t)(uint32_t result, lte_psm_setting_t *settings);
1626 
1638 typedef void (*set_psm_cb_t)(uint32_t result);
1639 
1653 typedef void (*get_ce_cb_t)(uint32_t result, lte_ce_setting_t *settings);
1654 
1666 typedef void (*set_ce_cb_t)(uint32_t result);
1667 
1683 typedef void (*simstat_report_cb_t)(uint32_t simstat);
1684 
1693 typedef void (*localtime_report_cb_t)(lte_localtime_t *localtime);
1694 
1703 typedef void (*quality_report_cb_t)(lte_quality_t *quality);
1704 
1713 typedef void (*cellinfo_report_cb_t)(lte_cellinfo_t *cellinfo);
1714 
1726 typedef void (*radio_on_cb_t)(uint32_t result);
1727 
1739 typedef void (*radio_off_cb_t)(uint32_t result);
1740 
1755 typedef void (*get_netinfo_cb_t)(uint32_t result, lte_netinfo_t *info);
1756 
1773 typedef void (*get_imscap_cb_t)(uint32_t result, bool imscap);
1774 
1789 typedef void (*activate_pdn_cb_t)(uint32_t result, lte_pdn_t *pdn);
1790 
1802 typedef void (*deactivate_pdn_cb_t)(uint32_t result);
1803 
1815 typedef void (*data_allow_cb_t)(uint32_t result);
1816 
1828 typedef void (*restart_report_cb_t)(uint32_t reason);
1829 
1839 typedef void (*netinfo_report_cb_t)(lte_netinfo_t *info);
1840 
1854 typedef void (*get_siminfo_cb_t)(uint32_t result, lte_siminfo_t *siminfo);
1855 
1869 typedef void (*get_dynamic_edrx_param_cb_t)(uint32_t result,
1870  lte_edrx_setting_t *param);
1871 
1885 typedef void (*get_dynamic_psm_param_cb_t)(uint32_t result,
1886  lte_psm_setting_t *param);
1887 
1901 typedef void (*get_current_edrx_cb_t)(uint32_t result,
1902  lte_edrx_setting_t *settings);
1903 
1917 typedef void (*get_current_psm_cb_t)(uint32_t result,
1918  lte_psm_setting_t *settings);
1919 
1933 typedef void (*get_quality_cb_t)(uint32_t result,
1934  lte_quality_t *quality);
1935 
1936 #ifdef __cplusplus
1937 #define EXTERN extern "C"
1938 extern "C"
1939 {
1940 #else
1941 #define EXTERN extern
1942 #endif
1943 
1944 /****************************************************************************
1945  * Public Function Prototypes
1946  ****************************************************************************/
1947 
1958 int32_t lte_initialize(void);
1959 
1967 int32_t lte_finalize(void);
1968 
2000 int32_t lte_set_report_restart(restart_report_cb_t restart_callback);
2001 
2014 int32_t lte_power_on(void);
2015 
2032 int32_t lte_power_off(void);
2033 
2044 int32_t lte_radio_on_sync(void);
2045 
2059 int32_t lte_radio_on(radio_on_cb_t callback);
2060 
2071 int32_t lte_radio_off_sync(void);
2072 
2086 int32_t lte_radio_off(radio_off_cb_t callback);
2087 
2105 int32_t lte_get_netinfo_sync(uint8_t pdn_num, lte_netinfo_t *info);
2106 
2117 int32_t lte_get_netinfo(get_netinfo_cb_t callback);
2118 
2146 
2173 int32_t lte_activate_pdn(lte_apn_setting_t *apn, activate_pdn_cb_t callback);
2174 
2182 int32_t lte_activate_pdn_cancel(void);
2183 
2200 int32_t lte_deactivate_pdn_sync(uint8_t session_id);
2201 
2221 int32_t lte_deactivate_pdn(uint8_t session_id, deactivate_pdn_cb_t callback);
2222 
2246 int32_t lte_data_allow_sync(uint8_t session_id, uint8_t allow,
2247  uint8_t roaming_allow);
2248 
2275 int32_t lte_data_allow(uint8_t session_id, uint8_t allow,
2276  uint8_t roaming_allow, data_allow_cb_t callback);
2277 
2290 int32_t lte_get_imscap_sync(bool *imscap);
2291 
2302 int32_t lte_get_imscap(get_imscap_cb_t callback);
2303 
2314 int32_t lte_get_version_sync(lte_version_t *version);
2315 
2326 int32_t lte_get_version(get_ver_cb_t callback);
2327 
2340 int32_t lte_get_phoneno_sync(int8_t *phoneno);
2341 
2352 int32_t lte_get_phoneno(get_phoneno_cb_t callback);
2353 
2366 int32_t lte_get_imsi_sync(int8_t *imsi);
2367 
2378 int32_t lte_get_imsi(get_imsi_cb_t callback);
2379 
2392 int32_t lte_get_imei_sync(int8_t *imei);
2393 
2404 int32_t lte_get_imei(get_imei_cb_t callback);
2405 
2416 int32_t lte_get_pinset_sync(lte_getpin_t *pinset);
2417 
2428 int32_t lte_get_pinset(get_pinset_cb_t callback);
2429 
2449 int32_t lte_set_pinenable_sync(bool enable, int8_t *pincode,
2450  uint8_t *attemptsleft);
2451 
2471 int32_t lte_set_pinenable(bool enable, int8_t *pincode,
2472  set_pinenable_cb_t callback);
2473 
2499 int32_t lte_change_pin_sync(int8_t target_pin, int8_t *pincode,
2500  int8_t *new_pincode, uint8_t *attemptsleft);
2501 
2527 int32_t lte_change_pin(int8_t target_pin, int8_t *pincode,
2528  int8_t *new_pincode, change_pin_cb_t callback);
2529 
2572 int32_t lte_enter_pin_sync(int8_t *pincode, int8_t *new_pincode,
2573  uint8_t *simstat, uint8_t *attemptsleft);
2574 
2596 int32_t lte_enter_pin(int8_t *pincode, int8_t *new_pincode,
2597  enter_pin_cb_t callback);
2598 
2608 int32_t lte_get_localtime_sync(lte_localtime_t *localtime);
2609 
2620 int32_t lte_get_localtime(get_localtime_cb_t callback);
2621 
2635 int32_t lte_get_operator_sync(int8_t *oper);
2636 
2647 int32_t lte_get_operator(get_operator_cb_t callback);
2648 
2658 int32_t lte_get_edrx_sync(lte_edrx_setting_t *settings);
2659 
2670 int32_t lte_get_edrx(get_edrx_cb_t callback);
2671 
2681 int32_t lte_set_edrx_sync(lte_edrx_setting_t *settings);
2682 
2695 int32_t lte_set_edrx(lte_edrx_setting_t *settings,
2696  set_edrx_cb_t callback);
2697 
2707 int32_t lte_get_psm_sync(lte_psm_setting_t *settings);
2708 
2719 int32_t lte_get_psm(get_psm_cb_t callback);
2720 
2730 int32_t lte_set_psm_sync(lte_psm_setting_t *settings);
2731 
2744 int32_t lte_set_psm(lte_psm_setting_t *settings,
2745  set_psm_cb_t callback);
2746 
2756 int32_t lte_get_ce_sync(lte_ce_setting_t *settings);
2757 
2768 int32_t lte_get_ce(get_ce_cb_t callback);
2769 
2779 int32_t lte_set_ce_sync(lte_ce_setting_t *settings);
2780 
2793 int32_t lte_set_ce(lte_ce_setting_t *settings,
2794  set_ce_cb_t callback);
2795 
2809 int32_t lte_set_report_simstat(simstat_report_cb_t simstat_callback);
2810 
2824 int32_t lte_set_report_localtime(localtime_report_cb_t localtime_callback);
2825 
2845 int32_t lte_set_report_quality(quality_report_cb_t quality_callback,
2846  uint32_t period);
2847 
2867 int32_t lte_set_report_cellinfo(cellinfo_report_cb_t cellinfo_callback,
2868  uint32_t period);
2869 
2883 int32_t lte_set_report_netinfo(netinfo_report_cb_t netinfo_callback);
2884 
2897 int32_t lte_get_errinfo(lte_errinfo_t *info);
2898 
2917 int32_t lte_get_siminfo_sync(uint32_t option, lte_siminfo_t *siminfo);
2918 
2938 int32_t lte_get_siminfo(uint32_t option, get_siminfo_cb_t callback);
2939 
2956 
2973 
2990 
3007 
3023 int32_t lte_get_current_psm_sync(lte_psm_setting_t *settings);
3024 
3040 int32_t lte_get_current_psm(get_current_psm_cb_t callback);
3041 
3051 int32_t lte_get_quality_sync(lte_quality_t *quality);
3052 
3063 int32_t lte_get_quality(get_quality_cb_t callback);
3064 
3075 int32_t lte_get_cellinfo_sync(lte_cellinfo_t *cellinfo);
3076 
3081 #undef EXTERN
3082 #ifdef __cplusplus
3083 }
3084 #endif
3085 
3086 #endif /* __MODULES_INCLUDE_LTE_LTE_API_H */
void(* netinfo_report_cb_t)(lte_netinfo_t *info)
Definition: lte_api.h:1839
struct lte_ipaddr lte_ipaddr_t
int32_t lte_get_phoneno_sync(int8_t *phoneno)
int32_t lte_get_netinfo(get_netinfo_cb_t callback)
int32_t lte_get_current_edrx_sync(lte_edrx_setting_t *settings)
int32_t lte_set_report_quality(quality_report_cb_t quality_callback, uint32_t period)
uint8_t pdn_num
Definition: lte_api.h:1230
int8_t * apn
Definition: lte_api.h:1004
struct lte_edrx_setting lte_edrx_setting_t
void(* get_dynamic_psm_param_cb_t)(uint32_t result, lte_psm_setting_t *param)
Definition: lte_api.h:1885
#define LTE_MNC_DIGIT_MAX
Definition: lte_api.h:485
int32_t lte_radio_on_sync(void)
int32_t tz_sec
Definition: lte_api.h:767
int32_t lte_get_localtime(get_localtime_cb_t callback)
int32_t lte_get_phoneno(get_phoneno_cb_t callback)
void(* radio_off_cb_t)(uint32_t result)
Definition: lte_api.h:1739
int8_t np_package[LTE_VER_NP_PACKAGE_LEN]
Definition: lte_api.h:706
lte_pdn_t * pdn_stat
Definition: lte_api.h:1238
int32_t err_result_code
Definition: lte_api.h:1261
int32_t lte_get_cellinfo_sync(lte_cellinfo_t *cellinfo)
Definition: lte_api.h:781
void(* get_dynamic_edrx_param_cb_t)(uint32_t result, lte_edrx_setting_t *param)
Definition: lte_api.h:1869
int32_t lte_set_ce(lte_ce_setting_t *settings, set_ce_cb_t callback)
struct lte_siminfo lte_siminfo_t
int32_t lte_set_edrx_sync(lte_edrx_setting_t *settings)
Definition: lte_api.h:698
Definition: lte_api.h:863
int32_t lte_get_errinfo(lte_errinfo_t *info)
uint8_t gid1_len
Definition: lte_api.h:1371
int32_t lte_deactivate_pdn(uint8_t session_id, deactivate_pdn_cb_t callback)
Definition: lte_api.h:971
Definition: lte_api.h:1055
uint8_t category
Definition: lte_api.h:1154
void(* get_localtime_cb_t)(uint32_t result, lte_localtime_t *localtime)
Definition: lte_api.h:1564
Definition: lte_api.h:1308
int32_t lte_set_report_netinfo(netinfo_report_cb_t netinfo_callback)
Definition: lte_api.h:999
uint8_t auth_type
Definition: lte_api.h:1018
int32_t lte_get_current_psm_sync(lte_psm_setting_t *settings)
struct lte_ce_setting lte_ce_setting_t
uint8_t ims_register
Definition: lte_api.h:1120
int32_t lte_set_edrx(lte_edrx_setting_t *settings, set_edrx_cb_t callback)
uint32_t edrx_cycle
Definition: lte_api.h:900
void(* set_pinenable_cb_t)(uint32_t result, uint8_t attemptsleft)
Definition: lte_api.h:1494
Definition: lte_api.h:1283
int32_t hour
Definition: lte_api.h:764
Definition: lte_api.h:759
uint8_t err_indicator
Definition: lte_api.h:1257
int32_t lte_set_report_localtime(localtime_report_cb_t localtime_callback)
Definition: lte_api.h:1173
uint8_t mnc_digit
Definition: lte_api.h:1330
void(* cellinfo_report_cb_t)(lte_cellinfo_t *cellinfo)
Definition: lte_api.h:1713
uint8_t nw_stat
Definition: lte_api.h:1217
bool mode_a_enable
Definition: lte_api.h:1289
#define LTE_PDN_IPADDR_MAX_COUNT
Definition: lte_api.h:610
uint8_t status
Definition: lte_api.h:730
int32_t lte_get_netinfo_sync(uint8_t pdn_num, lte_netinfo_t *info)
int32_t lte_activate_pdn_cancel(void)
#define LTE_MCC_DIGIT
Definition: lte_api.h:484
int32_t lte_get_pinset(get_pinset_cb_t callback)
int32_t lte_get_quality(get_quality_cb_t callback)
lte_psm_timeval_t ext_periodic_tau_time
Definition: lte_api.h:985
struct lte_localtime lte_localtime_t
Definition: lte_api.h:1250
int32_t lte_get_operator(get_operator_cb_t callback)
void(* get_netinfo_cb_t)(uint32_t result, lte_netinfo_t *info)
Definition: lte_api.h:1755
int32_t lte_get_imscap(get_imscap_cb_t callback)
uint8_t pin2_attemptsleft
Definition: lte_api.h:742
int32_t lte_change_pin(int8_t target_pin, int8_t *pincode, int8_t *new_pincode, change_pin_cb_t callback)
#define LTE_SIMINFO_ICCID_LEN
Definition: lte_api.h:676
bool valid
Definition: lte_api.h:791
bool valid
Definition: lte_api.h:830
#define LTE_SIMINFO_SPN_LEN
Definition: lte_api.h:675
int32_t lte_get_imscap_sync(bool *imscap)
void(* get_edrx_cb_t)(uint32_t result, lte_edrx_setting_t *settings)
Definition: lte_api.h:1597
int32_t lte_data_allow(uint8_t session_id, uint8_t allow, uint8_t roaming_allow, data_allow_cb_t callback)
void(* deactivate_pdn_cb_t)(uint32_t result)
Definition: lte_api.h:1802
int32_t lte_get_quality_sync(lte_quality_t *quality)
uint8_t imsi_len
Definition: lte_api.h:1361
#define LTE_SIMINFO_GID_LEN
Definition: lte_api.h:678
int32_t lte_set_report_simstat(simstat_report_cb_t simstat_callback)
struct lte_psm_timeval lte_psm_timeval_t
uint8_t mnc_digit
Definition: lte_api.h:846
int32_t lte_get_operator_sync(int8_t *oper)
uint32_t phycell_id
Definition: lte_api.h:834
#define LTE_VER_BB_PRODUCT_LEN
Definition: lte_api.h:370
int32_t lte_get_edrx_sync(lte_edrx_setting_t *settings)
int32_t lte_get_ce_sync(lte_ce_setting_t *settings)
int32_t lte_set_ce_sync(lte_ce_setting_t *settings)
int32_t lte_enter_pin_sync(int8_t *pincode, int8_t *new_pincode, uint8_t *simstat, uint8_t *attemptsleft)
uint32_t apn_type
Definition: lte_api.h:1033
uint32_t earfcn
Definition: lte_api.h:838
int32_t lte_change_pin_sync(int8_t target_pin, int8_t *pincode, int8_t *new_pincode, uint8_t *attemptsleft)
uint8_t ip_type
Definition: lte_api.h:1061
int32_t lte_power_off(void)
uint32_t apn_type
Definition: lte_api.h:1104
struct lte_apn_setting lte_apn_setting_t
void(* get_pinset_cb_t)(uint32_t result, lte_getpin_t *pinset)
Definition: lte_api.h:1478
void(* get_ver_cb_t)(uint32_t result, lte_version_t *version)
Definition: lte_api.h:1403
int32_t lte_radio_off_sync(void)
void(* get_imei_cb_t)(uint32_t result, int8_t *imei)
Definition: lte_api.h:1462
uint8_t enable
Definition: lte_api.h:725
int32_t lte_get_current_psm(get_current_psm_cb_t callback)
lte_nw_err_info_t nw_err
Definition: lte_api.h:1225
uint8_t gid2_len
Definition: lte_api.h:1381
struct lte_psm_setting lte_psm_setting_t
uint8_t data_allow
Definition: lte_api.h:1126
uint8_t data_roaming_allow
Definition: lte_api.h:1133
uint8_t spn_len
Definition: lte_api.h:1340
#define LTE_VER_NP_PACKAGE_LEN
Definition: lte_api.h:374
int32_t lte_get_dynamic_psm_param(get_dynamic_psm_param_cb_t callback)
lte_reject_cause_t reject_cause
Definition: lte_api.h:1190
struct lte_version lte_version_t
int16_t sinr
Definition: lte_api.h:803
int32_t lte_deactivate_pdn_sync(uint8_t session_id)
int32_t min
Definition: lte_api.h:765
int32_t lte_set_pinenable_sync(bool enable, int8_t *pincode, uint8_t *attemptsleft)
void(* get_imsi_cb_t)(uint32_t result, uint8_t errcause, int8_t *imsi)
Definition: lte_api.h:1445
uint8_t puk_attemptsleft
Definition: lte_api.h:738
int32_t lte_set_report_cellinfo(cellinfo_report_cb_t cellinfo_callback, uint32_t period)
int32_t lte_get_pinset_sync(lte_getpin_t *pinset)
int32_t mon
Definition: lte_api.h:762
Definition: lte_api.h:820
uint8_t iccid_len
Definition: lte_api.h:1350
int32_t lte_get_version(get_ver_cb_t callback)
int32_t lte_set_psm(lte_psm_setting_t *settings, set_psm_cb_t callback)
int32_t lte_get_localtime_sync(lte_localtime_t *localtime)
void(* data_allow_cb_t)(uint32_t result)
Definition: lte_api.h:1815
void(* get_phoneno_cb_t)(uint32_t result, uint8_t errcause, int8_t *phoneno)
Definition: lte_api.h:1424
int32_t lte_radio_on(radio_on_cb_t callback)
#define LTE_ERROR_STRING_MAX_LEN
Definition: lte_api.h:639
uint8_t value
Definition: lte_api.h:1161
int32_t lte_get_edrx(get_edrx_cb_t callback)
Definition: lte_api.h:1202
int32_t lte_activate_pdn_sync(lte_apn_setting_t *apn, lte_pdn_t *pdn)
uint8_t pin_attemptsleft
Definition: lte_api.h:734
uint8_t puk2_attemptsleft
Definition: lte_api.h:746
struct lte_getpin lte_getpin_t
int32_t lte_get_imsi_sync(int8_t *imsi)
int32_t year
Definition: lte_api.h:761
int32_t lte_get_current_edrx(get_current_edrx_cb_t callback)
Definition: lte_api.h:719
int32_t lte_initialize(void)
lte_psm_timeval_t req_active_time
Definition: lte_api.h:981
int32_t lte_set_pinenable(bool enable, int8_t *pincode, set_pinenable_cb_t callback)
int32_t lte_get_imsi(get_imsi_cb_t callback)
void(* enter_pin_cb_t)(uint32_t result, uint8_t simstat, uint8_t attemptsleft)
Definition: lte_api.h:1547
struct lte_quality lte_quality_t
int16_t rssi
Definition: lte_api.h:807
struct lte_cellinfo lte_cellinfo_t
struct lte_reject_cause lte_reject_cause_t
uint32_t option
Definition: lte_api.h:1320
int32_t lte_activate_pdn(lte_apn_setting_t *apn, activate_pdn_cb_t callback)
void(* get_current_edrx_cb_t)(uint32_t result, lte_edrx_setting_t *settings)
Definition: lte_api.h:1901
int32_t lte_get_dynamic_edrx_param(get_dynamic_edrx_param_cb_t callback)
int32_t lte_get_psm_sync(lte_psm_setting_t *settings)
int32_t lte_get_version_sync(lte_version_t *version)
void(* change_pin_cb_t)(uint32_t result, uint8_t attemptsleft)
Definition: lte_api.h:1510
void(* get_current_psm_cb_t)(uint32_t result, lte_psm_setting_t *settings)
Definition: lte_api.h:1917
void(* get_operator_cb_t)(uint32_t result, int8_t *oper)
Definition: lte_api.h:1582
void(* get_ce_cb_t)(uint32_t result, lte_ce_setting_t *settings)
Definition: lte_api.h:1653
void(* get_siminfo_cb_t)(uint32_t result, lte_siminfo_t *siminfo)
Definition: lte_api.h:1854
int32_t lte_finalize(void)
void(* simstat_report_cb_t)(uint32_t simstat)
Definition: lte_api.h:1683
uint8_t act_type
Definition: lte_api.h:873
void(* get_imscap_cb_t)(uint32_t result, bool imscap)
Definition: lte_api.h:1773
struct lte_error_info lte_errinfo_t
int32_t lte_data_allow_sync(uint8_t session_id, uint8_t allow, uint8_t roaming_allow)
int32_t err_no
Definition: lte_api.h:1265
void(* set_edrx_cb_t)(uint32_t result)
Definition: lte_api.h:1610
int32_t lte_radio_off(radio_off_cb_t callback)
void(* set_psm_cb_t)(uint32_t result)
Definition: lte_api.h:1638
int32_t sec
Definition: lte_api.h:766
void(* radio_on_cb_t)(uint32_t result)
Definition: lte_api.h:1726
bool mode_b_enable
Definition: lte_api.h:1295
void(* activate_pdn_cb_t)(uint32_t result, lte_pdn_t *pdn)
Definition: lte_api.h:1789
struct lte_nw_err_info lte_nw_err_info_t
uint8_t active
Definition: lte_api.h:1089
uint8_t ip_type
Definition: lte_api.h:1011
void(* set_ce_cb_t)(uint32_t result)
Definition: lte_api.h:1666
void(* get_psm_cb_t)(uint32_t result, lte_psm_setting_t *settings)
Definition: lte_api.h:1625
uint8_t err_type
Definition: lte_api.h:1182
int32_t lte_get_imei_sync(int8_t *imei)
struct lte_netinfo lte_netinfo_t
int32_t lte_get_imei(get_imei_cb_t callback)
void(* restart_report_cb_t)(uint32_t reason)
Definition: lte_api.h:1828
uint8_t session_id
Definition: lte_api.h:1083
#define LTE_IPADDR_MAX_LEN
Definition: lte_api.h:593
int32_t mday
Definition: lte_api.h:763
void(* localtime_report_cb_t)(lte_localtime_t *localtime)
Definition: lte_api.h:1693
struct lte_pdn lte_pdn_t
uint32_t ptw_val
Definition: lte_api.h:923
bool enable
Definition: lte_api.h:879
int32_t lte_get_psm(get_psm_cb_t callback)
Definition: lte_api.h:1078
int32_t lte_enter_pin(int8_t *pincode, int8_t *new_pincode, enter_pin_cb_t callback)
Definition: lte_api.h:935
void(* quality_report_cb_t)(lte_quality_t *quality)
Definition: lte_api.h:1703
uint8_t unit
Definition: lte_api.h:954
int32_t lte_power_on(void)
Definition: lte_api.h:1145
int32_t lte_set_report_restart(restart_report_cb_t restart_callback)
int8_t * password
Definition: lte_api.h:1043
int32_t lte_get_siminfo(uint32_t option, get_siminfo_cb_t callback)
uint8_t ipaddr_num
Definition: lte_api.h:1108
uint8_t time_val
Definition: lte_api.h:958
int8_t * user_name
Definition: lte_api.h:1038
void(* get_quality_cb_t)(uint32_t result, lte_quality_t *quality)
Definition: lte_api.h:1933
int32_t lte_get_siminfo_sync(uint32_t option, lte_siminfo_t *siminfo)
#define LTE_SIMINFO_IMSI_LEN
Definition: lte_api.h:677
int8_t bb_product[LTE_VER_BB_PRODUCT_LEN]
Definition: lte_api.h:702
int32_t lte_set_psm_sync(lte_psm_setting_t *settings)
int16_t rsrp
Definition: lte_api.h:795
int32_t lte_get_ce(get_ce_cb_t callback)
int16_t rsrq
Definition: lte_api.h:799
bool enable
Definition: lte_api.h:977