at_cfw.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef __AT_CFW_H__
  13. #define __AT_CFW_H__
  14. #include "at_engine.h"
  15. #include "cfw.h"
  16. #include "cfw_event.h"
  17. #include "cfw_dispatch.h"
  18. #include "at_command.h"
  19. #include "at_response.h"
  20. #include "cfw_chset.h"
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23. #include <string.h>
  24. #include <ctype.h>
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. // For at module initializing
  29. // TODO: delete them, use the SA flags instead.
  30. typedef enum
  31. {
  32. AT_MODULE_INIT_NO_SIM,
  33. AT_MODULE_INIT_SIM_AUTH_READY,
  34. AT_MODULE_INIT_SIM_AUTH_WAIT_PUK1,
  35. AT_MODULE_INIT_SIM_AUTH_WAIT_PIN1,
  36. AT_MODULE_INIT_SAT_OK,
  37. AT_MODULE_INIT_SAT_ERROR,
  38. AT_MODULE_INIT_NORMAL_SIM_CARD,
  39. AT_MODULE_INIT_CHANGED_SIM_CARD,
  40. AT_MODULE_INIT_NORMAL_CHANGED_SIM_CARD,
  41. AT_MODULE_INIT_TEST_SIM_CARD,
  42. AT_MODULE_INIT_SIM_SMS_OK,
  43. AT_MODULE_INIT_SIM_SMS_ERROR,
  44. AT_MODULE_INIT_SIM_PBK_OK,
  45. AT_MODULE_INIT_SIM_PBK_ERROR,
  46. AT_MODULE_INIT_ME_SMS_OK,
  47. AT_MODULE_INIT_ME_SMS_ERROR,
  48. AT_MODULE_INIT_ME_PBK_OK,
  49. AT_MODULE_INIT_ME_PBK_ERROR,
  50. AT_MODULE_INIT_BATT_OK,
  51. AT_MODULE_NOT_INIT = 0xff
  52. } AT_MODULE_INIT_STATUS_T;
  53. #define AT_AUTO_ACT_CID 5
  54. #define AT_MUXSOCKET_NUM 8
  55. #define AT_BLUETOOTH_CHANNEL 9
  56. #define CLASS_TYPE_B 0
  57. #define CLASS_TYPE_CG 1
  58. #define AT_GPRS_ATT_NOTREG 0
  59. #define AT_GPRS_ATT_HOME_OK 1
  60. #define AT_GPRS_ATT_TRYING 2
  61. #define AT_GPRS_ATT_DNY 3
  62. #define AT_GPRS_ATT_UNKNOWN 4
  63. #define AT_GPRS_ATT_ROAM_OK 5
  64. #define AT_ACTIVE_STATUS_READY 0
  65. #define AT_ACTIVE_STATUS_UNAVAILABLE 1
  66. #define AT_ACTIVE_STATUS_UNKNOWN 2
  67. #define AT_ACTIVE_STATUS_RINGING 3
  68. #define AT_ACTIVE_STATUS_CALL_IN_PROGRESS 4
  69. #define AT_ACTIVE_STATUS_ASLEEP 5
  70. #define CC_STATE_NULL 0x00
  71. #define CC_STATE_ACTIVE 0x01
  72. #define CC_STATE_HOLD 0x02
  73. #define CC_STATE_WAITING 0x04
  74. #define CC_STATE_INCOMING 0x08
  75. #define CC_STATE_DIALING 0x10
  76. #define CC_STATE_ALERTLING 0x20
  77. #define CC_STATE_RELEASE 0x40
  78. #define AT_CC_MAX_NUM 7
  79. #define ATD_PARA_MAX_LEN 41
  80. #define AT_EPS_NW_NO_SVCE 0 // No Service
  81. #define AT_EPS_NW_FULL_SVCE 1 // Full Service
  82. #define AT_SIM_MAX_ECC_NUM 15
  83. #define AT_SIM_MAX_ECC_ALPHA_ID_LEN 25 //Dubai DU is (0x1c-4)
  84. typedef enum AT_DATA_STATE_T
  85. {
  86. AT_PPP_STATE_END,
  87. AT_PPP_STATE_START,
  88. AT_PPP_STATE_ESCAPE,
  89. AT_PPP_STATE_RESUME
  90. } AT_DATA_STATE_T;
  91. typedef struct
  92. {
  93. CFW_EVENT noSim[CONFIG_NUMBER_OF_SIM]; // DBS
  94. CFW_EVENT sim;
  95. CFW_EVENT sat;
  96. CFW_EVENT simCard;
  97. CFW_EVENT sms[CONFIG_NUMBER_OF_SIM];
  98. CFW_EVENT pbk;
  99. } CFW_INIT_INFO;
  100. #define AT_PBK_LIST_ENTRY_STEP 4
  101. #define AT_FDN_NAME_SIZE (SIM_PBK_NAME_SIZE + 1)
  102. #define AT_FDN_NUMBER_SIZE (SIM_PBK_NUMBER_SIZE + 1)
  103. typedef enum
  104. {
  105. COPS_MODE_AUTOMATIC = 0,
  106. COPS_MODE_MANUAL = 1,
  107. COPS_MODE_DEREGISTER = 2,
  108. COPS_MODE_SET_ONLY = 3,
  109. COPS_MODE_MANUAL_AUTOMATIC = 4,
  110. COPS_MODE_UNDEFINED = 5,
  111. } AT_COPS_MODE;
  112. typedef enum
  113. {
  114. COPS_FORMAT_LONG = 0,
  115. COPS_FORMAT_SHORT = 1,
  116. COPS_FORMAT_NUMERIC = 2,
  117. COPS_FORMAT_UNDEFINED = 3
  118. } AT_COPS_FORMAT;
  119. typedef enum
  120. {
  121. COPS_ACT_GSM = 0,
  122. COPS_ACT_GSM_COMPACT = 1,
  123. COPS_ACT_UTRAN = 2,
  124. COPS_ACT_GSM_EGPRS = 3,
  125. COPS_ACT_UTRAN_HSDPA = 4,
  126. COPS_ACT_UTRAN_HSUPA = 5,
  127. COPS_ACT_UTRAN_HSDPA_HSUPA = 6,
  128. COPS_ACT_EUTRAN = 7,
  129. COPS_ACT_ECGSM = 8,
  130. COPS_ACT_NBIOT = 9,
  131. COPS_ACT_UNDEFINED = 10
  132. } AT_COPS_ACT;
  133. typedef struct
  134. {
  135. uint8_t nIndex;
  136. uint8_t nTpye;
  137. uint8_t nNumber[AT_FDN_NUMBER_SIZE];
  138. uint8_t nName[AT_FDN_NAME_SIZE];
  139. } AT_FDN_PBK_RECORD;
  140. typedef struct
  141. {
  142. uint8_t nFDNSatus;
  143. uint8_t nTotalRecordNum;
  144. uint8_t nRealRecordNum;
  145. uint8_t nCurrentRecordIndx;
  146. AT_FDN_PBK_RECORD sRecord[1];
  147. } AT_FDN_PBK_LIST;
  148. typedef struct
  149. {
  150. uint8_t battchg;
  151. uint8_t signal;
  152. uint8_t service;
  153. uint8_t sounder;
  154. uint8_t message;
  155. uint8_t call;
  156. uint8_t roam;
  157. uint8_t smsfull;
  158. } atCindValue_t;
  159. typedef enum
  160. {
  161. AT_CHANNEL_CC_NONE,
  162. AT_CHANNEL_CC_DIALING,
  163. AT_CHANNEL_CC_ONLINE
  164. } atChannelCCState_t;
  165. #ifdef AT_EXT_CONF_SUPPORT
  166. typedef enum
  167. {
  168. AT_CONF_OPERATION_START = 0x01,
  169. AT_CONF_CNTR_CONN,
  170. AT_CONF_OPERATION_ADD = 4
  171. } AT_CONF_OPERATION_E;
  172. typedef struct
  173. {
  174. uint8_t participant_id;
  175. uint8_t address[TEL_NUMBER_STRING_MAX_LEN];
  176. } AT_EXT_CALL_PARTICIPANT_INFO_T;
  177. #endif
  178. typedef struct
  179. {
  180. uint8_t ussd_option;
  181. uint8_t ussd_dcs;
  182. uint8_t ussd_num;
  183. } atSsInfo_t;
  184. typedef struct
  185. {
  186. AT_MODULE_INIT_STATUS_T init_status[CONFIG_NUMBER_OF_SIM];
  187. CFW_INIT_INFO init_info;
  188. char g_gc_pwroff; //0: power on,1: power off, 2:reset
  189. atCmdEngine_t *pwroff_engine;
  190. bool setComFlag[CONFIG_NUMBER_OF_SIM];
  191. bool powerCommFlag[CONFIG_NUMBER_OF_SIM];
  192. bool gbPowerCommMsgFlag[CONFIG_NUMBER_OF_SIM];
  193. bool smsReady;
  194. bool pbkReady;
  195. bool copsFlag[CONFIG_NUMBER_OF_SIM];
  196. struct
  197. {
  198. atChannelCCState_t state;
  199. atCmdEngine_t *engine;
  200. bool alert_flag;
  201. bool emc_dailing;
  202. bool ims_call;
  203. bool last_dail_present;
  204. CFW_DIALNUMBER_V2 last_dial;
  205. char extension[ATD_PARA_MAX_LEN + 1];
  206. int extension_len;
  207. int extension_pos;
  208. osiTimer_t *extension_timer;
  209. osiTimer_t *alert_timer;
  210. } cc;
  211. char g_pCeer[64];
  212. uint8_t g_cfg_cfun[2]; // switch on/off; 5:current status is on
  213. uint8_t g_uClassType;
  214. struct
  215. {
  216. bool sms_init_done;
  217. uint8_t ring_count;
  218. uint8_t cgreg_val;
  219. uint8_t cereg_val;
  220. uint8_t cscon_mode;
  221. uint8_t cc_call;
  222. uint8_t cc_sounder;
  223. uint8_t sms_newsms;
  224. uint8_t sms_memfull; // [0] ME memfull, [1] SM memfull
  225. uint32_t edrx_value;
  226. uint32_t edrx_ptw;
  227. AT_FDN_PBK_LIST *fdn_list;
  228. AT_Gprs_CidInfo cid_info[AT_PDPCID_MAX + 1];
  229. CFW_TFT_SET tft_set[AT_PDPCID_MAX + 1];
  230. atSsInfo_t ss_info;
  231. osiTimer_t *ring_timer;
  232. osiTimer_t *newsms_timer;
  233. bool is_waiting_cnma;
  234. bool nst_mode;
  235. bool wswitch;
  236. uint8_t cmolr_enable;
  237. uint8_t cmolre_format;
  238. uint8_t subscribe;
  239. } sim[CONFIG_NUMBER_OF_SIM];
  240. } atCfwCtx_t;
  241. extern atCfwCtx_t gAtCfwCtx;
  242. typedef struct _AT_CS_STAUTS
  243. {
  244. uint32_t nParam1;
  245. uint8_t nType;
  246. } AT_CS_STAUTS;
  247. // #define NW_PREFERRED_OPERATOR_FORMAT_NUMERIC 2
  248. #define NW_PREFERRED_OPERATOR_FORMAT_ALPHANUMERIC_LONG 0
  249. // #define NW_GETPREFERREDOPERATORS_CALLER_READ 0
  250. #define NW_GETPREFERREDOPERATORS_CALLER_SET 1
  251. #define CFW_REGISTER_EVENT(ev) ev, _on##ev
  252. void atCfwInit(void);
  253. void atCfwPowerOn(const osiEvent_t *event);
  254. void atCfwGcInit(void);
  255. void atCfwNwInit(void);
  256. void atCfwCcInit(void);
  257. void atCfwGprsInit(void);
  258. uint32_t atCfwSmsInit(uint16_t nUTI, uint8_t nSim);
  259. void AT_PBK_Init(uint8_t nSim);
  260. void atCfwSsInit(void);
  261. void atCfwLocInit(void);
  262. void atCfwLcsInit(void);
  263. void atCfwSmsInitEx(void);
  264. #ifdef CONFIG_CONCAT_SMS_SUPPORT
  265. void atSmsInitConcatMsg(uint8_t nSim, uint8_t nStorage);
  266. #endif
  267. /**
  268. * Register sim card writing/updating count function
  269. *
  270. * \return
  271. * - NULL
  272. */
  273. void atSimOperRegister(void);
  274. uint8_t atGetEpsRegistrationStatus(uint8_t psStatus);
  275. /**
  276. * whether cc is active (dialing or online) in any channel
  277. *
  278. * \return
  279. * - true if any channel is in dailing or online
  280. * - false if all channels are offline
  281. */
  282. bool atCfwCcIsActive(void);
  283. /**
  284. * whether cc is active (dialing or online) in specified channel
  285. *
  286. * \param engine the command engine
  287. * \return
  288. * - true if the channel is in dailing or online
  289. * - false if the channel is offline
  290. */
  291. bool atCfwCcIsChannelActive(atCmdEngine_t *engine);
  292. /**
  293. * whether cc is permitted in specified channel
  294. *
  295. * CC can only work in one channel at any time. So, if cc is active
  296. * and the specified channel is not the active channel, cc is not
  297. * allowed.
  298. *
  299. * \param engine the command engine
  300. * \return
  301. * - true if cc is permitted on this channel
  302. * - false if cc is not allowed on this channel
  303. */
  304. bool atCfwCcIsPermitted(atCmdEngine_t *engine);
  305. /**
  306. * whether cc is permitted in specified channel
  307. *
  308. * Besides the channel is permitted for cc, this channel can't be
  309. * in dialing state.
  310. *
  311. * \param engine the command engine
  312. * \return
  313. * - true if dail is permitted
  314. * - false if dail is not allowed
  315. */
  316. bool atCfwCcIsDialPermitted(atCmdEngine_t *engine);
  317. /**
  318. * get the dialing command engine
  319. *
  320. * \return
  321. * - dailing command engine
  322. * - NULL if no channels are in dailing mode
  323. */
  324. atCmdEngine_t *atCfwDialingEngine(void);
  325. /**
  326. * set cc to offline state
  327. *
  328. * When cc is already in offline state, nothing will be done
  329. */
  330. void atCfwCcSetOffline(void);
  331. /**
  332. * set cc state to dialing state on specified channel
  333. *
  334. * \param engine the command engine
  335. * \param emc true for emergency call
  336. */
  337. void atCfwCcSetDialing(atCmdEngine_t *engine, bool emc);
  338. /**
  339. * dail finish on the dailing channel
  340. *
  341. * After dail channel dailing finished, the channel will come
  342. * to online state.
  343. *
  344. * It is used in asynchronous event handling. So, there are no
  345. * parameter for the channel.
  346. */
  347. void atCfwCcDailFinished(void);
  348. /**
  349. * set cc state to dialing state on specified channel
  350. *
  351. * It is used at MT call, and answer successed.
  352. *
  353. * \param engine the command engine
  354. */
  355. void atCfwCcSetOnline(atCmdEngine_t *engine);
  356. #define AT_SetCmeErrorCode(n) atCfwToCmeError(n)
  357. atCindValue_t atCfwGetIndicator(uint8_t nSim);
  358. uint32_t atCfwPhoneActiveStatus(uint8_t nSim);
  359. void atCfwGprsSetPCid(uint8_t cid, uint8_t pcid, uint8_t nsim);
  360. void atEnterPPPState(atCommand_t *cmd, uint8_t cid);
  361. typedef enum
  362. {
  363. AT_DISABLE_COMM = 0x00, //don't start
  364. AT_ENABLE_COMM, // start stack
  365. AT_CHECK_COMM,
  366. } AT_COMM_MODE;
  367. typedef struct
  368. {
  369. bool is_police_support;
  370. bool is_ambulance_support;
  371. bool is_fire_brigade_support;
  372. bool is_marine_guard_support;
  373. bool is_mountain_rescue_support;
  374. bool is_man_init_ecall_support;
  375. bool is_auto_init_ecall_support;
  376. bool reserve;
  377. } AT_EMG_SERV_CATG_VAL_T;
  378. typedef struct
  379. {
  380. AT_EMG_SERV_CATG_VAL_T emg_serv_catg_val;
  381. uint16_t emg_num_len;
  382. uint8_t emg_num[20];
  383. } AT_EMG_NUM_T;
  384. typedef AT_EMG_NUM_T EMG_NUM_ARR_T[10];
  385. typedef struct
  386. {
  387. uint8_t emg_num_list_num;
  388. EMG_NUM_ARR_T emg_num_arr;
  389. } AT_EMG_NUM_LIST_T;
  390. typedef struct
  391. {
  392. uint8_t plmn[3];
  393. uint8_t lenOfNumList;
  394. AT_EMG_NUM_LIST_T nw_emc_num_info;
  395. } AT_NW_EMC_NUM_LIST_INFO;
  396. typedef struct
  397. {
  398. uint8_t emg_num[3];
  399. bool alpha_id_flag;
  400. uint8_t alpha_id_len;
  401. uint8_t alpha_id[AT_SIM_MAX_ECC_ALPHA_ID_LEN];
  402. bool ecc_category_flag;
  403. uint8_t ecc_category;
  404. } AT_SIM_ECC_T;
  405. typedef AT_SIM_ECC_T SIM_ECC_ARR[AT_SIM_MAX_ECC_NUM];
  406. typedef struct
  407. {
  408. uint8_t validate_num;
  409. SIM_ECC_ARR sim_emc_num_info;
  410. } AT_SIM_EMC_NUM_LIST_INFO;
  411. /**
  412. * Check whether dial number is prohibited by FDN feature
  413. *
  414. * @param bcd dial number BCD
  415. * @param bcd_len dial number BCD length
  416. * @param nType dial number type
  417. * @param nSim SIM
  418. * @return
  419. * - true if FDN feature is enabled and the dial number not in FDN list
  420. */
  421. bool atFDNProhibit(const uint8_t *bcd, uint8_t bcd_len, uint8_t nTpye, uint8_t nSim);
  422. bool atCheckCfwEvent(const osiEvent_t *event, uint32_t expected);
  423. void atCfwSimHotPlugCB(int num, bool connect);
  424. #define RETURN_CMS_CFW_ERR(engine, cfw_err) AT_CMD_RETURN(atCmdRespCmsError(engine, atCfwToCmsError(cfw_err)))
  425. #define RETURN_CME_CFW_ERR(engine, cfw_err) AT_CMD_RETURN(atCmdRespCmeError(engine, atCfwToCmeError(cfw_err)))
  426. void _onEV_CFW_SAT_CMDTYPE_IND(const osiEvent_t *event);
  427. void _onEV_CFW_SAT_RESPONSE_RSP(const osiEvent_t *event);
  428. void atSetPocMasterCard(CFW_SIM_ID nSimID);
  429. CFW_SIM_ID atGetPocMasterCard(void);
  430. uint32_t atSetJammingDetect(uint8_t bEnable, CFW_SIM_ID nSim);
  431. /**
  432. * reference 3GPP 23.038 SMS Data Coding Scheme
  433. * GDCI -> General Data Coding indication
  434. * DCMC -> Data coding/message class
  435. */
  436. // 7 bit coding
  437. #define GDCI_CODE_7BIT_NO_CLASS 0x00
  438. #define GDCI_CODE_7BIT_CLASS_0 0x10
  439. #define GDCI_CODE_7BIT_CLASS_1 0x11
  440. #define GDCI_CODE_7BIT_CLASS_2 0x12
  441. #define GDCI_CODE_7BIT_CLASS_3 0x13
  442. #define DCMC_CODE_7BIT_CLASS_0 0xF0
  443. #define DCMC_CODE_7BIT_CLASS_1 0xF1
  444. #define DCMC_CODE_7BIT_CLASS_2 0xF2
  445. #define DCMC_CODE_7BIT_CLASS_3 0xF3
  446. // 8 bit coding
  447. #define GDCI_CODE_8BIT_NO_CLASS 0x04
  448. #define GDCI_CODE_8BIT_CLASS_0 0x14
  449. #define GDCI_CODE_8BIT_CLASS_1 0x15
  450. #define GDCI_CODE_8BIT_CLASS_2 0x16
  451. #define GDCI_CODE_8BIT_CLASS_3 0x17
  452. #define DCMC_CODE_8BIT_CLASS_0 0xF4
  453. #define DCMC_CODE_8BIT_CLASS_1 0xF5
  454. #define DCMC_CODE_8BIT_CLASS_2 0xF6
  455. #define DCMC_CODE_8BIT_CLASS_3 0xF7
  456. // UCS2 bit coding
  457. #define GDCI_CODE_UCS2_NO_CLASS 0x08
  458. #define GDCI_CODE_UCS2_CLASS_0 0x18
  459. #define GDCI_CODE_UCS2_CLASS_1 0x19
  460. #define GDCI_CODE_UCS2_CLASS_2 0x1A
  461. #define GDCI_CODE_UCS2_CLASS_3 0x1B
  462. /*
  463. * Check if Call is running,
  464. * local audio application not allowed when,when call is running
  465. */
  466. uint8_t AT_CC_GetCCCount(uint8_t sim);
  467. void atGetSimEccInfo(uint8_t nSimID);
  468. #ifdef CONFIG_QUEC_PROJECT_FEATURE
  469. uint8_t AT_CC_GetCurrentCall(CFW_CC_CURRENT_CALL_INFO_V2 call_info[AT_CC_MAX_NUM], uint8_t *cnt, uint8_t sim);
  470. #else
  471. #ifdef CONFIG_SOC_8910
  472. uint8_t AT_CC_GetCurrentCall(CFW_CC_CURRENT_CALL_INFO_V2 call_info[AT_CC_MAX_NUM], uint8_t *cnt, uint8_t sim);
  473. #else
  474. uint8_t AT_CC_GetCurrentCall(CFW_CC_CURRENT_CALL_INFO call_info[AT_CC_MAX_NUM], uint8_t *cnt, uint8_t sim);
  475. #endif
  476. #endif
  477. typedef enum
  478. {
  479. AT_CUS_URC_RLC,
  480. AT_CUS_URC_ENGMODE,
  481. AT_CUS_URC_PDCP,
  482. AT_CUS_URC_PHR,
  483. } AT_CUS_URC_FLAG;
  484. #define AT_CUS_URC_ON(offset) (((gAtSetting.cus_urc_flag >> offset) & 0x01) == 1)
  485. #define AT_NW_FAILED_EMM_OR_ESM_INVALID_CAUSE (0xFF)
  486. #define AT_NW_FAILED_PROCEDURE_EMMMSGTYPE (1 << 0)
  487. #define AT_NW_FAILED_PROCEDURE_ESMMSGTYPE (1 << 1)
  488. #define AT_NW_FAILED_PROCEDURE_EMMCAUSE (1 << 2)
  489. #define AT_NW_FAILED_PROCEDURE_ESMCAUSE (1 << 3)
  490. #define AT_NW_EMM_ATTACH_REJ 0x44
  491. #define AT_NW_EPS_EMM_ESM_FAILURE 0x13
  492. #define AT_NW_ESM_PDN_CONNECT_REJ 0xD1 /*network reject UE for PDN connectivity*/
  493. #ifdef __cplusplus
  494. }
  495. #endif
  496. #define SIM_TYPE_TSIM 0x00 /* it presents SIM card as a physical entity, we call it true SIM. */
  497. #define SIM_TYPE_SSIM 0x11 /* it presents SIM card as a library, we call it local soft SIM. */
  498. #define SIM_TYPE_CSIM 0x21 /* it presents SIM card as a library but some security data was \
  499. stored in remote entity(a server), we call it cloud SIM. */
  500. #endif