| ll | e1d5d7c | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 1 | /*============================================================================= | 
| ll | b15599d | 2022-04-01 07:50:08 +0000 | [diff] [blame] | 2 | #     FileName: lynq_sim.h | 
| ll | e1d5d7c | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 3 | #     Desc: about SIMAPI | 
| ll | b15599d | 2022-04-01 07:50:08 +0000 | [diff] [blame] | 4 | #     Author: lei | 
| ll | e1d5d7c | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 5 | #     Version: V1.0 | 
| ll | b15599d | 2022-04-01 07:50:08 +0000 | [diff] [blame] | 6 | #     LastChange: 2022-03-31 | 
| ll | e1d5d7c | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 7 | #     History: | 
| ll | ba425bd | 2022-03-17 02:23:00 +0000 | [diff] [blame] | 8 | # If you need to use any API under lynq_sim, you must first call the lynq_sim_init() function to initialize these functions. | 
| ll | e1d5d7c | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 9 | =============================================================================*/ | 
|  | 10 | #ifndef __LYNQ_SIM__ | 
|  | 11 | #define __LYNQ_SIM__ | 
|  | 12 | #ifdef __cplusplus | 
|  | 13 | extern "C" { | 
|  | 14 | #endif | 
|  | 15 |  | 
|  | 16 | int lynq_get_sim_status(int *card_status); | 
|  | 17 | int lynq_get_imsi(char buf[]); | 
| ll | e1d5d7c | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 18 | int lynq_sim_init(int utoken); | 
|  | 19 | int lynq_sim_deinit(void); | 
|  | 20 | int lynq_enable_pin(char pin[]); | 
|  | 21 | int lynq_disable_pin(char pin[]); | 
|  | 22 | int lynq_get_iccid(char buf[]); | 
|  | 23 | int lynq_query_pin_lock(char *pin,int buf[]); | 
|  | 24 | int lynq_verify_pin(char *pin); | 
|  | 25 | int lynq_change_pin(char *old_pin, char *new_pin); | 
|  | 26 | int lynq_unlock_pin(char *puk, char *pin); | 
|  | 27 | int lynq_query_phone_number(char buf[]); | 
| rjw | 5d2a50e | 2022-02-28 15:01:49 +0800 | [diff] [blame] | 28 | int lynq_switch_card(int slot); | 
| ll | 887a017 | 2022-03-09 03:13:31 +0000 | [diff] [blame] | 29 | int lynq_screen(int num); | 
| q.huang | d3b254d | 2022-10-19 16:39:29 +0800 | [diff] [blame] | 30 | int lynq_get_imei(char buf[]); | 
| q.huang | 1f2a225 | 2022-10-12 11:39:36 +0800 | [diff] [blame] | 31 | int lynq_get_imei_and_sv(char imei[],char sv[]); | 
| ll | ba425bd | 2022-03-17 02:23:00 +0000 | [diff] [blame] | 32 |  | 
|  | 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 | */ | 
|  | 52 | int lynq_req_sim_io(int list[5], char *path, char *data, char *pin2, char *aidPtr, int sw[2], char *simResponse); | 
|  | 53 |  | 
| ll | b15599d | 2022-04-01 07:50:08 +0000 | [diff] [blame] | 54 | /** | 
|  | 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 | */ | 
|  | 61 | int 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 | */ | 
|  | 68 | int lynq_get_version(char buf[]); | 
|  | 69 |  | 
| ll | e6cc393 | 2022-08-18 06:06:39 -0700 | [diff] [blame] | 70 | /** | 
|  | 71 | * @brief sim power on/off | 
|  | 72 | * | 
|  | 73 | */ | 
|  | 74 | int lynq_sim_power(int mode); | 
|  | 75 |  | 
| ll | 88f0078 | 2022-10-04 10:16:28 +0800 | [diff] [blame] | 76 | /** | 
|  | 77 | * @brief reset modem | 
|  | 78 | * | 
|  | 79 | */ | 
|  | 80 | int lynq_reset_modem(void); | 
| ll | e1d5d7c | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 81 |  | 
|  | 82 |  | 
|  | 83 | #ifdef __cplusplus | 
|  | 84 | } | 
|  | 85 | #endif | 
|  | 86 |  | 
|  | 87 | #endif | 
|  | 88 |  |