Update LYNQ test
Change-Id: I9e434803f0cce9f24048f2fbc5eed2d26fa33503
diff --git a/mbtk/include/lynq/libpoweralarm.h b/mbtk/include/lynq/libpoweralarm.h
new file mode 100755
index 0000000..4110fba
--- /dev/null
+++ b/mbtk/include/lynq/libpoweralarm.h
@@ -0,0 +1,36 @@
+/*******************************************************
+*
+* @brief: none
+* @details: add libpoweralarm api
+* @author: l.yang
+* @date: 2023.8.21
+* @version: V1.0
+* @copyright:Copyright (c) MobileTek
+*
+*********************************************/
+
+#ifndef _LYNQ_POWERALARM_
+#define _LYNQ_POWERALARM_
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+typedef int (*lynq_wakealarm_add_cb)(unsigned int src_id, int rtc_id);
+int lynq_rtc_service_init(void);
+int lynq_rtc_service_deinit(void);
+ssize_t poweralarm(char *buffer,int src_id);
+ssize_t wakealarm(char *buffer,int src_id,int rtc_id,lynq_wakealarm_add_cb wakealarm_notify );
+ssize_t cancel_wakealarm(int src_id, int rtc_id);
+
+int lynq_set_wakealarm(unsigned long time_sec,int src_id,int rtc_id,lynq_wakealarm_add_cb wakealarm_notify );
+int lynq_set_poweralarm(unsigned long time_sec,int src_id);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
diff --git a/mbtk/include/lynq/lynq-adc.h b/mbtk/include/lynq/lynq-adc.h
index 0af4d5d..a0051cc 100755
--- a/mbtk/include/lynq/lynq-adc.h
+++ b/mbtk/include/lynq/lynq-adc.h
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+// #include <sc_bsp.h>
#ifdef __cplusplus
extern "C" {
diff --git a/mbtk/include/lynq/lynq-gpio.h b/mbtk/include/lynq/lynq-gpio.h
index 5af9f50..b5377c5 100755
--- a/mbtk/include/lynq/lynq-gpio.h
+++ b/mbtk/include/lynq/lynq-gpio.h
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+//#include <sc_bsp.h>
#ifdef __cplusplus
extern "C" {
diff --git a/mbtk/include/lynq/lynq-qser-autosuspend.h b/mbtk/include/lynq/lynq-qser-autosuspend.h
index 37adfc7..5d4b91d 100755
--- a/mbtk/include/lynq/lynq-qser-autosuspend.h
+++ b/mbtk/include/lynq/lynq-qser-autosuspend.h
@@ -53,6 +53,7 @@
typedef struct
{
char lock_name[MAX_LOCK_NUM][64];
+ int lock_pid[MAX_LOCK_NUM];
} LOCK_TABLE;
int read_lock_table(void);
@@ -63,8 +64,9 @@
int qser_wakelock_lock(int fd);
int qser_wakelock_unlock(int fd);
int qser_wakelock_destroy(int fd);
-int qser_whitelist_get(char* whitelish);
-int qser_whitelist_set(char* whitelish);
+
+int qser_whitelist_set(char *whitelist);
+int qser_whitelist_get(char *whitelist);
#ifdef __cplusplus
diff --git a/mbtk/include/lynq/lynq-qser-fota.h b/mbtk/include/lynq/lynq-qser-fota.h
index 34be9aa..2a8cfd6 100755
--- a/mbtk/include/lynq/lynq-qser-fota.h
+++ b/mbtk/include/lynq/lynq-qser-fota.h
@@ -18,6 +18,7 @@
int lynq_fota_set_addr_value(char *value,int size);
int lynq_fota_nrestart(void);
int lynq_rock_main(int first_run);
+int lynq_read_process(void);
#ifdef __cplusplus
}
diff --git a/mbtk/include/lynq/lynq-qser-usb.h b/mbtk/include/lynq/lynq-qser-usb.h
new file mode 100755
index 0000000..97428d4
--- /dev/null
+++ b/mbtk/include/lynq/lynq-qser-usb.h
@@ -0,0 +1,25 @@
+/*******************************************************
+*
+* @brief: Add usb api
+* @details: add liblynq-qser-usb api
+* @author: wz.wang
+* @date: 2024.2.18
+* @version: V1.0
+* @copyright:Copyright (c) MobileTek
+*
+*********************************************/
+#ifndef LYNQ_QSER_USB
+#define LYNQ_QSER_USB
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int qser_get_usb_usermode_net_state(void);
+int qser_get_usb_usermode_adb_state(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
diff --git a/mbtk/include/lynq/lynq-qser-voice.h b/mbtk/include/lynq/lynq-qser-voice.h
index 8748ae3..668d6ce 100755
--- a/mbtk/include/lynq/lynq-qser-voice.h
+++ b/mbtk/include/lynq/lynq-qser-voice.h
@@ -111,6 +111,8 @@
);
+int qser_voice_set_dtmf(const char callnum);
+
/*
Usage 1 (register callback and wait for new call in, then answer):
1, QSER_Voice_Call_Client_Init
@@ -131,6 +133,83 @@
*/
+#ifdef ECALL_SUPPORT
+
+#define QSER_MSD_MAX_LENGTH 140
+
+typedef enum{
+ E_QSER_VOICE_ECALL_SET_NUMBER = 0, /* Set Number */
+ E_QSER_VOICE_ECALL_SET_URI = 1, /* Set Uri */
+}E_QSER_VOICE_ECALL_SET_TYPE_T;
+
+typedef enum{
+ E_QSER_VOICE_ECALL_CAT_MANUAL = 0, /* Manual Emergency eCall */
+ E_QSER_VOICE_ECALL_CAT_AUTO = 1, /* Automatic Emergency eCall */
+}E_QSER_VOICE_ECALL_CATEGORY_T;
+
+
+typedef enum{
+ E_QSER_VOICE_ECALL_TEST = 0, /* Test eCall */
+ E_QSER_VOICE_ECALL_EMERGENCY = 1, /* Emergency eCall */
+ E_QSER_VOICE_ECALL_RECONFIG = 2, /* Reconfiguration eCall */
+}E_QSER_VOICE_ECALL_VARIANT_T;
+
+typedef enum{
+ E_QSER_VOICE_ECALL_IND_SENDING_START = 1,
+ E_QSER_VOICE_ECALL_IND_SENDING_MSD = 2,
+ E_QSER_VOICE_ECALL_IND_LLACK_RECEIVED = 3,
+ E_QSER_VOICE_ECALL_IND_ALACK_POSITIVE_RECEIVED = 4,
+ E_QSER_VOICE_ECALL_IND_ALACK_CLEARDOWN_RECEIVED = 5,
+ E_QSER_VOICE_ECALL_IND_DAILING = 9,
+ E_QSER_VOICE_ECALL_IND_ALERTING = 10,
+ E_QSER_VOICE_ECALL_IND_ACTIVE = 11,
+ E_QSER_VOICE_ECALL_IND_DISCONNECTED = 12,
+ E_QSER_VOICE_ECALL_IND_IMS_ACTIVE = 13,
+ E_QSER_VOICE_ECALL_IND_IMS_DISCONNECTED = 14,
+ E_QSER_VOICE_ECALL_IND_ABNORMAL_HANGUP=15,
+ E_QSER_VOICE_ECALL_IND_IMS_MSD_ACK = 20,
+ E_QSER_VOICE_ECALL_IND_IMS_UPDATE_MSD = 21,
+ E_QSER_VOICE_ECALL_IND_IMS_IN_BAND_TRANSFER = 22,
+ E_QSER_VOICE_ECALL_IND_IMS_MSD_NACK = 23,
+ E_QSER_VOICE_ECALL_IND_IMS_SRVCC = 24,
+ E_QSER_VOICE_ECALL_IND_ONLY_DEREGISTRATION = 31,
+ E_QSER_VOICE_ECALL_IND_MAY_DEREGISTER = 32,
+ E_QSER_VOICE_ECALL_IND_PSAP_CALLBACK_START = 40,
+ E_QSER_VOICE_ECALL_IND_PSAP_CALLBACK_IMS_UPDATE_MSD = 41,
+ E_QSER_VOICE_ECALL_IND_SENDING_START_IN_VOICE=8000,
+ E_QSER_VOICE_ECALL_IND_T2_TIMER_OUT = 9000,
+ E_QSER_VOICE_ECALL_IND_T5_TIMER_OUT = 9001,
+ E_QSER_VOICE_ECALL_IND_T6_TIMER_OUT = 9002,
+ E_QSER_VOICE_ECALL_IND_T7_TIMER_OUT = 9003,
+ E_QSER_VOICE_ECALL_IND_REDIAL_TIMER_OUT = 9004,
+ E_QSER_VOICE_ECALL_IND_AUTO_ANS_TIMER_OUT = 9005,
+ E_QSER_VOICE_ECALL_IND_AUTO_ANS_IMS_TIMER_OUT = 9006,
+ E_QSER_VOICE_ECALL_IND_UNSPECIFIED = 0xffff,
+}E_QSER_VOICE_ECALL_INDICATION_T;
+
+typedef void (*QSER_ECall_IndHandlerFunc_t)
+(
+ int callid,
+ E_QSER_VOICE_ECALL_INDICATION_T ind,
+ void *contextPtr
+);
+
+int qser_voice_set_test_num(voice_client_handle_type* h_voice,E_QSER_VOICE_ECALL_SET_TYPE_T type, const char *test_num, int test_num_length);
+int qser_voice_fast_ecall(voice_client_handle_type* h_voice,
+ int *call_id,
+ E_QSER_VOICE_ECALL_CATEGORY_T cat,
+ E_QSER_VOICE_ECALL_VARIANT_T variant,
+ const char *addr,
+ int addr_length,
+ const unsigned char *msd_data,
+ int msd_length); //msd_length should <= QSER_MSD_MAX_LENGTH
+int qser_voice_set_msd( int callid, const unsigned char *msd_data, int msd_length); // msd_length should <= QSER_MSD_MAX_LENGTH
+int qser_voice_add_ecall_indhandler(voice_client_handle_type* h_voice,
+ QSER_ECall_IndHandlerFunc_t handlerPtr,
+ void* contextPtr);
+
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/mbtk/include/lynq/lynq-qser-wifi.h b/mbtk/include/lynq/lynq-qser-wifi.h
new file mode 100755
index 0000000..fa021c0
--- /dev/null
+++ b/mbtk/include/lynq/lynq-qser-wifi.h
@@ -0,0 +1,81 @@
+/*******************************************************
+*
+* @brief: Add wifi api
+* @details: add liblynq-qser-wifi api
+* @author: wz.wang
+* @date: 2024.3.15
+* @version: V1.0
+* @copyright:Copyright (c) MobileTek
+*
+*********************************************/
+#ifndef LYNQ_QSER_WIFI
+#define LYNQ_QSER_WIFI
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ LYNQ_WIFI_AP_INDEX_AP0 = 0, /* Index 0 of AP/AP-STA/AP-AP Mode */
+ LYNQ_WIFI_AP_INDEX_AP1 /* Index 1 of AP/AP-STA/AP-AP Mode */
+} lynq_wifi_ap_index_e;
+
+typedef enum
+{
+ LYNQ_WIFI_MODE_MIN = -1,
+ LYNQ_WIFI_MODE_80211B = 0,
+ LYNQ_WIFI_MODE_80211BG,
+ LYNQ_WIFI_MODE_80211BGN,
+ LYNQ_WIFI_MODE_80211A,
+ LYNQ_WIFI_MODE_80211AN,
+ LYNQ_WIFI_MODE_80211AC,
+ LYNQ_WIFI_MODE_80211BGNAX_2G,
+ LYNQ_WIFI_AP_MODE_MAX
+} lynq_wifi_mode_type_e;
+
+typedef enum LYNQ_WIFI_BANDWIDTH_ENUM
+{
+ LYNQ_WIFI_BANDWIDTH_MIN = -1,
+ LYNQ_WIFI_BANDWIDTH_HT20 = 0,
+ LYNQ_WIFI_BANDWIDTH_HT40,
+ LYNQ_WIFI_BANDWIDTH_HT80,
+ LYNQ_WIFI_BANDWIDTH_MAX
+} lynq_wifi_bandwidth_type_e;
+
+typedef enum
+{
+ LYNQ_WIFI_AUTH_MIN = -1,
+ LYNQ_WIFI_AUTH_OPEN = 0,
+ LYNQ_WIFI_AUTH_WPA_PSK,
+ LYNQ_WIFI_AUTH_WPA2_PSK, //AES
+ LYNQ_WIFI_AUTH_WPA_WPA2_PSK_BOTH, //TKIP & AES
+ LYNQ_WIFI_AUTH_WPA3_PSK, //AES
+ LYNQ_WIFI_AUTH_WPA2_WPA3_PSK_BOTH, //AES
+ LYNQ_WIFI_AUTH_MAX
+} lynq_wifi_auth_e;
+
+int qser_wifi_enable(void);
+int qser_wifi_disable(void);
+int qser_wifi_ap_ssid_set(lynq_wifi_ap_index_e idx, const char *ssid);
+int qser_wifi_ap_ssid_get(lynq_wifi_ap_index_e idx, char *ssid);
+int qser_wifi_ap_mode_set(lynq_wifi_ap_index_e idx, lynq_wifi_mode_type_e mode);
+int qser_wifi_ap_mode_get(lynq_wifi_ap_index_e idx, lynq_wifi_mode_type_e *mode);
+int qser_wifi_ap_bandwidth_set(lynq_wifi_ap_index_e idx, lynq_wifi_bandwidth_type_e bandwidth);
+int qser_wifi_ap_bandwidth_get(lynq_wifi_ap_index_e idx, lynq_wifi_bandwidth_type_e *bandwidth);
+int qser_wifi_ap_channel_set(lynq_wifi_ap_index_e idx, const char *country_code, int channel);
+int qser_wifi_ap_channel_get(lynq_wifi_ap_index_e idx, char *country_code, int *channel);
+int qser_wifi_ap_auth_set(lynq_wifi_ap_index_e idx, lynq_wifi_auth_e auth_mode, const char * auth_passwd);
+int qser_wifi_ap_auth_get(lynq_wifi_ap_index_e idx, lynq_wifi_auth_e *auth_mode, char * auth_passwd);
+int qser_wifi_ap_max_sta_set(lynq_wifi_ap_index_e idx, int max_sta_num);
+int qser_wifi_ap_max_sta_get(lynq_wifi_ap_index_e idx, int *max_sta_num);
+int qser_wifi_ap_start(lynq_wifi_ap_index_e idx);
+int qser_wifi_ap_stop(lynq_wifi_ap_index_e idx);
+int qser_wifi_ap_restart(lynq_wifi_ap_index_e idx);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
diff --git a/mbtk/include/lynq/lynq_qser_gnss.h b/mbtk/include/lynq/lynq_qser_gnss.h
new file mode 100755
index 0000000..9eead07
--- /dev/null
+++ b/mbtk/include/lynq/lynq_qser_gnss.h
@@ -0,0 +1,134 @@
+#ifndef __LYNQ_GNSS_H__
+#define __LYNQ_GNSS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+struct mbtk_gnss_handle_t
+{
+ int dev_fd;
+ pthread_t uart_pthread;
+ pthread_t gnss_pthread;
+ gnss_handler_func_t gnss_handler_func;
+ int mode; // 0 - stop, 1 - single, 2 - periodic, 3 - start
+ pthread_mutex_t _cond_mutex;
+ int reset_state;
+ int inited;
+ ring_buffer_t ring_buffer;
+ int getap_status;
+ char *rb;
+
+#if TTFF_TEST
+ pthread_t ttff_pid;
+ int location_state;
+#endif
+ /********************
+ save handle's adr
+ phandle = &handle
+ handle = mbtk_gnss_handle
+ *********************/
+ uint32_t *phandle; // handle's adr
+};
+
+typedef struct
+{
+ uint32_t size; /**< Set to the size of mcm_gps_sv_info_t. */
+ int prn; /**< Pseudo-random number for the SV. */
+ float snr; /**< Signal-to-noise ratio. */
+ float elevation; /**< Elevation of the SV in degrees. */
+ float azimuth; /**< Azimuth of the SV in degrees. */
+}QL_LOC_SV_INFO_T; /* Type */
+
+struct login_information /*Used To Stored User Information*/
+{
+ char* host;
+ char* id;
+ char* password;
+};
+
+static struct login_information *login_information_t = NULL;
+
+#define QL_LOC_GPS_SUPPORT_SVS_MAX 32 /** Maximum number of satellites in view. */
+typedef struct
+{
+ uint32_t size; /**< Set to the size of mcm_gps_sv_status_t. */
+ int num_svs; /**< Number of SVs currently visible. */
+ QL_LOC_SV_INFO_T sv_list[QL_LOC_GPS_SUPPORT_SVS_MAX]; /**< Contains an array of SV information. */
+ uint32_t ephemeris_mask; /**< Bitmask indicating which SVs have ephemeris data. */
+ uint32_t almanac_mask; /**< Bitmask indicating which SVs have almanac data. */
+ uint32_t used_in_fix_mask; /**< Bitmask indicating which SVs were used for computing the most recent position fix. */
+}QL_LOC_SV_STATUS_T; /* Type */
+
+typedef enum
+{
+ LYNQ_POS_MODE_STANDALONE = 0, /**< Mode for running GPS standalone (no assistance). */
+ LYNQ_POS_MODE_MS_BASED = 1, /**< AGPS MS-Based mode. */
+ LYNQ_POS_MODE_MS_ASSISTED = 2, /**< AGPS MS-Assisted mode. */
+}LYNQ_POS_MODE_T;
+
+typedef enum
+{
+ LYNQ_POS_RECURRENCE_PERIODIC = 0, /**< Receive GPS fixes on a recurring basis at a specified period. */
+ LYNQ_POS_RECURRENCE_SINGLE = 1, /**< Request a single-shot GPS fix. */
+}LYNQ_POS_RECURRENCE_T;
+
+struct LYNQ_POS_MODE_INFO_T
+{
+ LYNQ_POS_MODE_T mode; /* Position mode. */
+ LYNQ_POS_RECURRENCE_T recurrence; /* Recurrence */
+};
+
+
+#endif
+typedef struct
+{
+ uint32_t year; // 大于1980
+ uint32_t month; // 1-12
+ uint32_t day; // 1-31
+ uint32_t hour; // 0-23
+ uint32_t minute; // 0-59
+ uint32_t second; // 0-59
+ uint32_t millisecond; // 0-999
+}LYNQ_INJECT_TIME_INTO_T; /* Message */
+
+
+typedef enum {
+ LOC_IND_STATUS_INFO_ON,//E_MT_LOC_MSG_ID_STATUS_INFO = 0,
+ LOC_IND_LOCATION_INFO_ON,//E_MT_LOC_MSG_ID_LOCATION_INFO,
+ LOC_IND_SV_INFO_ON,//E_MT_LOC_MSG_ID_SV_INFO,
+ LOC_IND_NMEA_INFO_ON,//E_MT_LOC_MSG_ID_NMEA_INFO,
+ LOC_IND_CAP_INFO_ON,//E_MT_LOC_MSG_ID_CAPABILITIES_INFO,
+ LOC_IND_AGPS_DATA_CONN_CMD_REQ_ON,//E_MT_LOC_MSG_ID_AGPS_STATUS,
+ LOC_IND_NI_NFY_USER_RESP_REQ_ON,//E_MT_LOC_MSG_ID_NI_NOTIFICATION,
+ LOC_IND_XTRA_DATA_REQ_ON,//E_MT_LOC_MSG_ID_XTRA_REPORT_SERVER,
+}msg_t;
+
+typedef enum {
+ DELETE_NOTHING = 0, /**< Delete nothing. */
+ DELETE_EPHEMERIS = 1, /**< Delete ephemeris data. */
+ DELETE_ALMANAC = 2, /**< Delete almanac data. */
+ DELETE_POSITION_TIME = 3, /**< Delete position and time data. */
+ DELETE_UTC = 4, /**< Delete UTC data. */
+ DELETE_ALL = 5, /**< Delete all location data. */
+}DELETE_AIDING_DATA_TYPE_T;
+
+typedef void ( *lynq_atsvc_incb )( const char *input,const int length);
+typedef void ( *lynq_atsvc_outcb )(char *output, int out_max_size, int mode);
+lynq_atsvc_incb lynq_register_gnss(lynq_atsvc_outcb out_cb);
+
+int qser_Gnss_Init(uint32_t *h_gnss);
+int qser_Gnss_Deinit(uint32_t h_gnss);
+int qser_AddRxIndMsgHandler(gnss_handler_func_t handler_ptr,uint32_t h_gnss);
+int qser_Set_Indications(uint32_t h_gnss,e_msg_id_t type);
+int qser_Gnss_Start(uint32_t h_gnss);
+int qser_Gnss_Stop(uint32_t h_gnss);
+int qser_Gnss_Set_Frequency(uint32_t h_gnss, int frequency);
+int qser_Gnss_Delete_Aiding_Data(uint32_t h_gnss,DELETE_AIDING_DATA_TYPE_T flags);
+int qser_Gnss_Server_Configuration(char *host, char *id, char *password);
+int qser_Gnss_InjectTime(uint32_t h_gnss,LYNQ_INJECT_TIME_INTO_T *time_info);
+int qser_firmware_update(uint32_t h_gnss);
+int qser_Gnss_injectEphemeris(uint32_t h_gnss);
+int qser_Gnss_download_tle();
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/mbtk/include/lynq/lynq_qser_network.h b/mbtk/include/lynq/lynq_qser_network.h
index 35d4292..61d68f0 100755
--- a/mbtk/include/lynq/lynq_qser_network.h
+++ b/mbtk/include/lynq/lynq_qser_network.h
@@ -36,6 +36,12 @@
E_QSER_NW_ROAM_STATE_TYPE_T roaming_pref; /**< Roaming preference.*/
}QSER_NW_CONFIG_INFO_T;
+typedef enum
+{
+ E_QSER_NW_IMS_MODE_OFF = 0, /**< close ims. */
+ E_QSER_NW_IMS_MODE_VOLTE_ENABLE = 1, /**< support volte. */
+}E_QSER_NW_IMS_MODE_TYPE_T;
+
/** Configures the OOS (out of service) settings that define the MCM network interface. */
#define QSER_NW_OOS_CFG_TYPE_FAST_SCAN 0x00 /**< fast net scan */
#define QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN 0x01 /**< full band scan */
@@ -68,10 +74,13 @@
//defined for QSER_NW_EventRegister
#define NW_IND_VOICE_REG_EVENT_IND_FLAG (1 << 0) /**< msg format : QSER_NW_VOICE_REG_EVENT_IND_T */
-#define NW_IND_DATA_REG_EVENT_IND_FLAG (1 << 1) /**< msg format : QSER_NW_DATA_REG_EVENT_IND_T */
-#define NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG (1 << 2) /**< msg format : QSER_NW_SINGNAL_EVENT_IND_T */
+#define NW_IND_DATA_REG_EVENT_IND_FLAG (1 << 1) /**< msg format : QSER_NW_DATA_REG_EVENT_IND_T */
+#define NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG (1 << 2) /**< msg format : QSER_NW_SINGNAL_EVENT_IND_T */
+//#define NW_IND_CELL_ACCESS_STATE_CHG_EVENT_IND_FLAG (1 << 3) /**< msg format : QL_MCM_NW_CELL_ACCESS_STATE_EVENT_IND_T */
+//#define NW_IND_NITZ_TIME_UPDATE_EVENT_IND_FLAG (1 << 4) /**< msg format : QL_MCM_NW_NITZ_TIME_EVENT_IND_T */
+#define NW_IND_IMS_REG_EVENT_IND_FLAG (1 << 5) /**< msg format : NULL */
-typedef struct
+typedef struct
{
char long_eons[512 + 1]; /**< Long EONS.*/
char short_eons[512 + 1]; /**< Short EONS.*/
@@ -208,8 +217,18 @@
QSER_NW_3GPP2_REG_INFO_T data_registration_details_3gpp2; /**< Data registration details for 3GPP2. */
}QSER_NW_REG_STATUS_INFO_T;
+typedef enum
+{
+ E_QSER_NW_IMS_SERVICE_NONE = 0x0000, /**< Not registered */
+ E_QSER_NW_IMS_SERVICE_REGISTERED = 0x0001, /**< Registered*/
+}E_QSER_NW_IMS_SERVICE_TYPE_T;
-typedef struct
+typedef struct
+{
+ E_QSER_NW_IMS_SERVICE_TYPE_T registration_state; /**< Registration state.*/
+}QSER_NW_IMS_REG_STATUS_INFO_T;
+
+typedef struct
{
int8_t rssi; /**< RSSI in dBm. Indicates received signal strength. A signed value; -125 or lower indicates no signal.*/
}QSER_NW_GSM_SIGNAL_INFO_T;
@@ -379,27 +398,33 @@
int qser_nw_set_config
(
nw_client_handle_type h_nw,
- QSER_NW_CONFIG_INFO_T *pt_info
+ QSER_NW_CONFIG_INFO_T *pt_info
+);
+
+int qser_nw_set_ims_enable
+(
+ nw_client_handle_type h_nw,
+ E_QSER_NW_IMS_MODE_TYPE_T ims_mode
);
int qser_nw_set_oos_config
(
nw_client_handle_type h_nw,
- QSER_NW_OOS_CONFIG_INFO_T *pt_info
+ QSER_NW_OOS_CONFIG_INFO_T *pt_info
);
int qser_nw_get_oos_config
(
nw_client_handle_type h_nw,
- QSER_NW_OOS_CONFIG_INFO_T *pt_info
+ QSER_NW_OOS_CONFIG_INFO_T *pt_info
);
-/*
+
int qser_nw_event_register
(
nw_client_handle_type h_nw,
uint32_t bitmask // bit OR of NW_IND_xxxx_EVENT_ON
);
-*/
+
int qser_nw_get_operator_name
(
nw_client_handle_type h_nw,
@@ -409,7 +434,13 @@
int qser_nw_get_reg_status
(
nw_client_handle_type h_nw,
- QSER_NW_REG_STATUS_INFO_T *pt_info
+ QSER_NW_REG_STATUS_INFO_T *pt_info
+);
+
+int qser_nw_get_ims_reg_status
+(
+ nw_client_handle_type h_nw,
+ QSER_NW_IMS_REG_STATUS_INFO_T *pt_info
);
int qser_nw_get_signal_strength
diff --git a/mbtk/include/lynq/lynq_qser_sim.h b/mbtk/include/lynq/lynq_qser_sim.h
index e1cada7..f49e611 100755
--- a/mbtk/include/lynq/lynq_qser_sim.h
+++ b/mbtk/include/lynq/lynq_qser_sim.h
@@ -183,6 +183,11 @@
QSER_SIM_CARD_ALL_APP_INFO_T card_app_info; /**< Stores all relevant application information. */
}QSER_SIM_CARD_STATUS_INFO_T;
+typedef QSER_SIM_CARD_STATUS_INFO_T* QSER_SIM_MsgRef;
+/* Callback function registered to qser_sms_addrxmsghandler, msgRef contains the detail msg infor */
+typedef void (*QSER_SIM_RxMsgHandlerFunc_t)(QSER_SIM_MsgRef msgRef);
+
+
int qser_sim_client_init(sim_client_handle_type *ph_sim);
int qser_sim_client_deinit(sim_client_handle_type h_sim);
@@ -389,11 +394,9 @@
int
*/
/*=========================================================================*/
-int qser_sim_getimei
-(
- sim_client_handle_type h_sim,
- char *imei
-);
+int qser_sim_getimei(sim_client_handle_type h_sim, char *imei);
+int qser_get_imei_and_sv(sim_client_handle_type h_sim,char *imei, char*sv);
+
/*===========================================================================
@@ -427,10 +430,8 @@
int
*/
/*=========================================================================*/
-int qser_reset_modem
-(
- sim_client_handle_type h_sim
-);
+int qser_reset_modem(sim_client_handle_type h_sim);
+
/*===========================================================================
@@ -445,11 +446,8 @@
int
*/
/*=========================================================================*/
-int qser_get_version
-(
- sim_client_handle_type h_sim,
- char *buf
-);
+int qser_get_version(sim_client_handle_type h_sim, char *buf);
+
/*===========================================================================
@@ -464,10 +462,10 @@
int
*/
/*=========================================================================*/
-int qser_reset_sim
-(
- sim_client_handle_type h_sim
-);
+int qser_reset_sim(sim_client_handle_type h_sim);
+
+int qser_sim_addrxmsghandler(QSER_SIM_RxMsgHandlerFunc_t handlerPtr);
+
#ifdef __cplusplus
}
#endif
diff --git a/mbtk/include/lynq/lynq_qser_sms.h b/mbtk/include/lynq/lynq_qser_sms.h
index b8f2c03..7276fca 100755
--- a/mbtk/include/lynq/lynq_qser_sms.h
+++ b/mbtk/include/lynq/lynq_qser_sms.h
@@ -192,11 +192,7 @@
int qser_sms_client_deinit(sms_client_handle_type h_sms);
/* Delete the SMS specified in the pt_sms_storage */
-int qser_sms_deletefromstorage(sms_client_handle_type h_sms, QSER_sms_storage_info_t *pt_sms_storage);
-
-/* List the SMS sequence numbers specified in pt_sms_storage for deletion
-*/
-int qser_sms_deletefromstoragelist( sms_client_handle_type h_sms, char* del_list);
+int qser_sms_deletefromstorage(sms_client_handle_type h_sms, QSER_sms_storage_info_t *pt_sms_storage);
/* Send sms PDU.
*/
diff --git a/mbtk/include/lynq/lynq_qser_thermal.h b/mbtk/include/lynq/lynq_qser_thermal.h
old mode 100644
new mode 100755
index 5bcc81b..d776dde
--- a/mbtk/include/lynq/lynq_qser_thermal.h
+++ b/mbtk/include/lynq/lynq_qser_thermal.h
@@ -1,12 +1,12 @@
-#ifndef __LYNQ_QSER_THERMAL_H__
-#define __LYNQ_QSER_THERMAL_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int get_thermal_zone(int *numbers, int size);
-#ifdef __cplusplus
-}
-#endif
-#endif
-
+#ifndef _LYNQ_QSER_THERMAL_H_
+#define _LYNQ_QSER_THERMAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define MAX_SIZE 100
+int get_thermal_zone(int *numbers, int size);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/mbtk/include/lynq/lynq_systime.h b/mbtk/include/lynq/lynq_systime.h
index f1d4805..4ea1053 100755
--- a/mbtk/include/lynq/lynq_systime.h
+++ b/mbtk/include/lynq/lynq_systime.h
@@ -14,6 +14,7 @@
#include <string.h>
#include <stdlib.h>
#include <time.h>
+#include "lynq_uci.h"
#ifndef _LYNQ_SYSTIME_H_
#define _LYNQ_SYSTIME_H_
diff --git a/mbtk/include/lynq/lynq_uci.h b/mbtk/include/lynq/lynq_uci.h
new file mode 100755
index 0000000..0a08c31
--- /dev/null
+++ b/mbtk/include/lynq/lynq_uci.h
@@ -0,0 +1,38 @@
+#ifndef _LYNQ_UCI_H_
+#define _LYNQ_UCI_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <uci.h>
+
+#define LYNQ_UCI_MAX_LEN 128
+#define LYNQ_UCI_SUCCESS 0
+#define LYNQ_UCI_ERROR 1
+#define LYNQ_UCI_FILE "lynq_uci"
+#define LYNQ_UCI_RO_FILE "lynq_uci_ro"
+
+//static struct uci_context * ctx = NULL;
+
+int lynq_del(char *option);
+#if UCI_SUPPORT
+ static int uci_get_value(struct uci_option *o, char *out_buf);
+#endif //uci_support
+int lynq_uci_get(const char *arg, char *out_buf);
+
+int lynq_uci_set(const char *arg);
+
+int lynq_add_section(char *section_type, char *section);
+
+int lynq_set_value(char *section, char *key, char *value);
+
+int lynq_get_value(char *file, char *section, char *key, char *tmp);
+
+
+int lynq_load_config(char *filename);
+
+#ifdef __cplusplus
+}
+#endif
+#endif