blob: ac00626287083f133dfc84ff1ec6f00275782ee3 [file] [log] [blame]
lle1d5d7c2022-01-18 12:34:30 +00001/*=============================================================================
llb15599d2022-04-01 07:50:08 +00002# FileName: lynq_sim.h
lle1d5d7c2022-01-18 12:34:30 +00003# Desc: about SIMAPI
llb15599d2022-04-01 07:50:08 +00004# Author: lei
lle1d5d7c2022-01-18 12:34:30 +00005# Version: V1.0
llb15599d2022-04-01 07:50:08 +00006# LastChange: 2022-03-31
lle1d5d7c2022-01-18 12:34:30 +00007# History:
llba425bd2022-03-17 02:23:00 +00008# If you need to use any API under lynq_sim, you must first call the lynq_sim_init() function to initialize these functions.
lle1d5d7c2022-01-18 12:34:30 +00009=============================================================================*/
10#ifndef __LYNQ_SIM__
11#define __LYNQ_SIM__
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16int lynq_get_sim_status(int *card_status);
17int lynq_get_imsi(char buf[]);
lle1d5d7c2022-01-18 12:34:30 +000018int lynq_sim_init(int utoken);
19int lynq_sim_deinit(void);
20int lynq_enable_pin(char pin[]);
21int lynq_disable_pin(char pin[]);
22int lynq_get_iccid(char buf[]);
23int lynq_query_pin_lock(char *pin,int buf[]);
24int lynq_verify_pin(char *pin);
25int lynq_change_pin(char *old_pin, char *new_pin);
26int lynq_unlock_pin(char *puk, char *pin);
27int lynq_query_phone_number(char buf[]);
rjw5d2a50e2022-02-28 15:01:49 +080028int lynq_switch_card(int slot);
ll887a0172022-03-09 03:13:31 +000029int lynq_screen(int num);
q.huangbe2d6932022-10-19 16:39:29 +080030int lynq_get_imei(char buf[]);
q.huang1f2a2252022-10-12 11:39:36 +080031int lynq_get_imei_and_sv(char imei[],char sv[]);
llba425bd2022-03-17 02:23:00 +000032
33/**
34 * @brief Request SIM I/O operation.
35 * This is similar to the TS 27.007 "restricted SIM" operation
36 * where it assumes all of the EF selection will be done by the callee.
37 * @param list type: [IN] list[0]:one of the commands listed for TS 27.007 +CRSM.(command)
38 * type: [IN] list[1]:EF id(fileid)
39 * type: [IN] list[2]:offset(p1)
40 * type: [IN] list[3]:offset(p2)
41 * type: [IN] list[4]:response len,sometimes needn't care(p3)
42 * @param path type: [IN] "pathid" from TS 27.007 +CRSM command.
43 type: [IN] Path is in hex asciii format eg "7f205f70"
44 type: [IN] Path must always be provided.
45 * @param data type: [IN] May be NULL
46 * @param pin2 type: [IN] May be NULL
47 * @param aidPtr type: [IN] AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
48 * @param sw type: [OUT]
49 * @param simResponse type: [OUT] response
50 * @return int
51 */
52int lynq_req_sim_io(int list[5], char *path, char *data, char *pin2, char *aidPtr, int sw[2], char *simResponse);
53
llb15599d2022-04-01 07:50:08 +000054/**
55 * @brief
56 * @param options type: [IN] [options] define whether you want to halt, power-off, or reboot the machine.May be NULL
57 * @param time type: [IN] [time] specifies when you want the shutdown to perform.May be NULL
58 * @param message type: [IN] [message] adds a message that announces the shutdown.May be NULL
59 * @return int
60 */
61int lynq_shutdown(char options[], char time[], char message[]);
62
63/**
64 * @brief get currnet version of mobiletek
65 * @param buf type: [out] My Param doc
66 * @return int
67 */
68int lynq_get_version(char buf[]);
69
lle6cc3932022-08-18 06:06:39 -070070/**
71 * @brief sim power on/off
72 *
73 */
74int lynq_sim_power(int mode);
75
ll88f00782022-10-04 10:16:28 +080076/**
77 * @brief reset modem
78 *
79 */
80int lynq_reset_modem(void);
lle1d5d7c2022-01-18 12:34:30 +000081
ll71a113b2022-10-21 18:07:25 +080082/**
83 * @brief factory test to both radio on/off
84 *
85 */
86int lynq_factory_radio_state(int num);
lhee0d3b32024-04-25 03:54:48 -070087/**
88 * @brief set default sim card
89 * @param slot: type [IN] <slot> sim card slot
90 * @return int
91 * 0:success
92 * other:fail
93 */
94int lynq_set_default_sim(const int slot);
ll71a113b2022-10-21 18:07:25 +080095
lle1d5d7c2022-01-18 12:34:30 +000096
97#ifdef __cplusplus
98}
99#endif
100
101#endif
102