Add basic change for v1453

Change-Id: I9497a61bbc3717f66413794a4e7dee0347c0bc33
diff --git a/mbtk/include/lynq/liblog.h b/mbtk/include/lynq/liblog.h
new file mode 100755
index 0000000..840b43d
--- /dev/null
+++ b/mbtk/include/lynq/liblog.h
@@ -0,0 +1,41 @@
+#ifndef __LIBLOG_H__
+#define __LIBLOG_H__
+
+#include <unistd.h>
+#include "mbtk_log.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum
+{
+    LOG_UNSET = -1,
+    LOG_VERBOSE = 2,
+    LOG_ERROR = 3, 
+    LOG_WARNING = 4,
+    LOG_INFO = 6,
+    LOG_DEBUG = 7, 
+    LOG_LEVEL_MAX = 9
+}log_level_enum;
+
+void lynq_log_global_output(log_level_enum Level,const char *format,...);
+void lynq_log_configuration_init(const char *log_name);
+const char* lynq_read_log_version();
+
+//log level api
+int lynq_set_log_level(const char * module_name, log_level_enum level);
+int lynq_get_log_level(const char * module_name, log_level_enum *level);
+int lynq_set_special_log_level(const char * exe_name, const char * module_name, log_level_enum level);
+int lynq_get_special_log_level(const char * exe_name, const char * module_name, log_level_enum *level);
+int lynq_notify_recalc_log_level(pid_t pid);
+int lynq_write_log_to_file_now();
+int lynq_stop_record_log(int value);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  //__LOG_H__
diff --git a/mbtk/include/lynq/liblynq-at-common.h b/mbtk/include/lynq/liblynq-at-common.h
new file mode 100755
index 0000000..5ca8ca8
--- /dev/null
+++ b/mbtk/include/lynq/liblynq-at-common.h
@@ -0,0 +1,14 @@
+#ifndef LIBLYNQ_AT_COMMON_H
+#define LIBLYNQ_AT_COMMON_H 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+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_at_common(lynq_atsvc_outcb out_cb);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
\ No newline at end of file
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
new file mode 100755
index 0000000..a0051cc
--- /dev/null
+++ b/mbtk/include/lynq/lynq-adc.h
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+// #include <sc_bsp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum ADC_CHANNEL_ENUM
+{
+    QADC_NONE = 0,
+    ADC0 =1,
+    ADC1 =2,
+    ADC2 =3,
+    QADC_END
+}ADC_CHANNEL_E;
+
+int qser_adc_show(ADC_CHANNEL_E qadc);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/mbtk/include/lynq/lynq-gpio.h b/mbtk/include/lynq/lynq-gpio.h
new file mode 100755
index 0000000..39eed04
--- /dev/null
+++ b/mbtk/include/lynq/lynq-gpio.h
@@ -0,0 +1,30 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+//#include <sc_bsp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MAX_GPIO_NUM        (200)
+// static void *test_gpio_handle[MAX_GPIO_NUM]={NULL};
+
+int lynq_gpio_init(int gpio, int direction, int value, int pullsel);
+
+int lynq_gpio_deinit(int gpio);
+
+int lynq_gpio_direction_set(int gpio, int direction);
+
+int lynq_gpio_value_set(int gpio, int value);
+
+int lynq_gpio_value_get(int gpio);
+
+int lynq_gpio_pullsel_set(int gpio, int pullsel);
+
+int lynq_gpio_pullsel_get(int gpio);
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/mbtk/include/lynq/lynq-irq.h b/mbtk/include/lynq/lynq-irq.h
new file mode 100755
index 0000000..4ad03c5
--- /dev/null
+++ b/mbtk/include/lynq/lynq-irq.h
@@ -0,0 +1,177 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+
+struct sc_irq_info {
+	unsigned int	line;
+	unsigned int	type;
+};
+
+#define SC_IRQ_IOC_MAGIC            'I'
+
+/*ioctl cmd usd by device*/
+#define SC_IRQ_INSTALL              _IOW(SC_IRQ_IOC_MAGIC, 1, char *)
+#define SC_IRQ_SET_TYPE             _IOW(SC_IRQ_IOC_MAGIC, 2, char *)
+#define SC_IRQ_SET_WAKE             _IOW(SC_IRQ_IOC_MAGIC, 3, char *)
+#define SC_IRQ_GET_WAKE             _IOW(SC_IRQ_IOC_MAGIC, 4, char *)
+#define SC_IRQ_UNINSTALL            _IOW(SC_IRQ_IOC_MAGIC, 5, char *)
+
+#define SC_IRQ_GET_STATUS           _IOW(SC_IRQ_IOC_MAGIC, 6, char *)
+#define SC_IRQ_CLEAR_STATUS         _IOW(SC_IRQ_IOC_MAGIC, 7, char *)
+
+#define SC_IRQ_DEV                  "/dev/sc_irq"
+
+
+
+/*----------------------------------------------------------*/
+struct sc_pm_info {
+	unsigned int	sleep_time;		/* ms */
+	unsigned int	wake_event;
+};
+
+#define SC_PM_WL_EVENT_EXT0         ((unsigned int)1 << 0)
+#define SC_PM_WL_EVENT_EXT1         ((unsigned int)1 << 1) 
+#define SC_PM_WL_EVENT_EXT2         ((unsigned int)1 << 2)
+#define SC_PM_WL_EVENT_EXT3         ((unsigned int)1 << 3)
+#define SC_PM_WL_EVENT_EXT4         ((unsigned int)1 << 4)
+#define SC_PM_WL_EVENT_EXT5         ((unsigned int)1 << 5)
+#define SC_PM_WL_EVENT_EXT6         ((unsigned int)1 << 6)
+#define SC_PM_WL_EVENT_EXT7         ((unsigned int)1 << 7)
+
+#define SC_PM_IOC_MAGIC             'P'
+
+/*ioctl cmd usd by device*/
+#define SC_PM_WL_SET                _IOW(SC_PM_IOC_MAGIC, 1, char *)
+#define SC_PM_WL_CLEAR              _IOW(SC_PM_IOC_MAGIC, 2, char *)
+#define SC_PM_WL_GET                _IOW(SC_PM_IOC_MAGIC, 3, char *)
+
+#define SC_PM_DEV                   "/dev/sc_pm"
+
+
+typedef void (*irq_handler)(void);
+
+#define SC_LIBIRQ_EXT0						(0)
+#define SC_LIBIRQ_EXT1						(1)
+#define SC_LIBIRQ_EXT2						(2)
+#define SC_LIBIRQ_EXT3						(3)
+#define SC_LIBIRQ_EXT4						(4)
+#define SC_LIBIRQ_EXT5						(5)
+#define SC_LIBIRQ_EXT6						(6)
+#define SC_LIBIRQ_EXT7						(7)
+#define SC_LIBIRQ_EXT8						(8)
+#define SC_LIBIRQ_EXT9						(9)
+#define SC_LIBIRQ_EXT10						(10)
+#define SC_LIBIRQ_EXT11						(11)
+#define SC_LIBIRQ_EXT12						(12)
+#define SC_LIBIRQ_EXT13						(13)
+#define SC_LIBIRQ_EXT14						(14)
+#define SC_LIBIRQ_EXT15						(15)
+#define SC_LIBIRQ_MAX						(200)
+
+#define SC_LIBIRQ_TYPE_RISING				(0)
+#define SC_LIBIRQ_TYPE_FALLING				(1)
+#define SC_LIBIRQ_TYPE_LEVEL_HIGH			(2)
+#define SC_LIBIRQ_TYPE_LEVEL_LOW			(3)
+#define SC_LIBIRQ_TYPE_MAX					(4)
+
+/*
+ *  Add a handler for an interrupt line.
+ *
+ *  line      		:  The interrupt line
+ *  handler         :  Function to be called when the IRQ occurs.
+ *  trig_type		:  rising edge or fallling edge
+ *
+ *  return 0 if succeed, others failed
+ */
+int sc_irq_install(unsigned int line, irq_handler handler, int trig_type);
+
+/*
+ *  free an interrupt allocated with sc_irq_install.
+ *
+ *  line      		:  The interrupt line
+ *
+ *  return 0 if succeed, others failed
+ */
+int sc_irq_uninstall(unsigned int line);
+
+/*
+ *  set the irq trigger type for an irq.
+ *
+ *  line      		:  The interrupt line
+ *  trig_type		:  rising edge or fallling edge
+ *
+ *  return 0 if succeed, others failed
+ */
+int sc_irq_set_type(unsigned int line, int trig_type);
+
+/*
+ *  get the irq trigger type for an irq.
+ *
+ *  line      		:  The interrupt line
+ *  trig_type		:  edge or level type
+ *
+ *  return 0 if succeed, others failed
+ */
+int sc_irq_get_type(unsigned int line, int *trig_type);
+
+/*
+ *  control irq power management wakeup.
+ *
+ *  line      		:  The interrupt line
+ *  en				:  enable/disable power management wakeup
+ *
+ *  return 0 if succeed, others failed
+ */
+int sc_irq_set_wake(unsigned int line, int en);
+
+/*
+ *  get the irq awake status for an irq.
+ *
+ *  line      		:  The interrupt line
+ *  en				:  enable/disable power management wakeup
+ *
+ *  return 0 if succeed, others failed
+ */
+int sc_irq_get_wake(unsigned int line, int *en);
+
+typedef enum 
+{
+    Rising_edge_trigger = 0,//:上升沿触发
+    Falling_edge_trigger = 1,//:下降沿触发
+    High_level_trigger = 2,//:高电平触发
+    Low_level_trigger = 3,//:低电平触发
+
+}trig_type_e;
+
+
+//int line_gpio[15]={-1,48,49,50,51,52,53,54,119,128,129,-1,131,-1,125};//this is the line match gpio
+int line_gpio[4]={21, 22, 23 ,24};//this is the line match gpio
+
+typedef void (*irq_handler)(void);
+
+int lynq_irq_install(int line, irq_handler irq_handler, trig_type_e trig_type);
+
+int lynq_irq_uninstall(int line);
+
+int lynq_irq_set_type(int line, int trig_type);
+
+int lynq_irq_get_type(int line);
+
+int lynq_irq_set_wake(int line, int en);
+
+int lynq_irq_get_wake(int line);
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/mbtk/include/lynq/lynq-qser-audio.h b/mbtk/include/lynq/lynq-qser-audio.h
new file mode 100755
index 0000000..d5a6f20
--- /dev/null
+++ b/mbtk/include/lynq/lynq-qser-audio.h
@@ -0,0 +1,44 @@
+/*******************************************************
+*
+* @brief: Add audio api
+* @details:  add liblynq-qser-audio api
+* @author:   yu.dong
+* @date:     2023.9.28
+* @version:  V1.0
+* @copyright:Copyright (c) MobileTek
+*
+*********************************************/
+#ifndef LYNQ_QSER_AUDIO
+#define LYNQ_QSER_AUDIO
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*_cb_onPlayer)(int);
+
+int qser_AudPlayer_Open(char* device, _cb_onPlayer cb_fun);
+int qser_AudPlayer_PlayFrmFile(int hdl, const char *fd, int offset);
+int qser_AudPlayer_PlayPcmBuf(const unsigned char *pcm_data, int data_size, int period_size,
+                                int period_count, int num_channels, int sample_rate, int ownerid);
+int qser_AudPlayer_Pause(int hdl);
+int qser_AudPlayer_Resume(int hdl);
+void qser_AudPlayer_Stop(int hdl);
+void qser_AudPlayer_Close(int hdl);
+
+int qser_AudRecorder_Open(char* device, _cb_onPlayer cb_fun);
+int qser_AudRecorder_StartRecord(int hdl, const char *fd, int offset);
+int qser_AudRecorder_StartRecord_Custom(char *file, int period_size, int period_count,
+            int num_channels, int sample_rate);
+int qser_AudRecorder_Pause(void);
+int qser_AudRecorder_Resume(void);
+void qser_AudRecorder_Stop(void);
+void qser_AudRecorder_Close(void);
+
+void qser_Audio_Deinit(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
diff --git a/mbtk/include/lynq/lynq-qser-autosuspend.h b/mbtk/include/lynq/lynq-qser-autosuspend.h
new file mode 100755
index 0000000..118f7ac
--- /dev/null
+++ b/mbtk/include/lynq/lynq-qser-autosuspend.h
@@ -0,0 +1,81 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MAX_LOCK_NUM 128
+
+#define E_READ -2
+#define E_WRITE -3
+#define E_TABLE_FULL -4
+#define E_LOCK_EXIST -5
+#define E_INPUT_ERROR -6
+
+typedef enum
+{
+    E_QL_LPM_FALLING = 0, /* Falling, Means wakeupin falling to wakeup the module, or wakeupout falling to wakeup mcu
+. */
+    E_QL_LPM_RISING = 1, /* Rising, Means  wakeupin rising to wakeup the module,  or wakeupout rising to wakeup  mcu.
+*/
+}qser_lpm_edge_t;
+
+typedef int qser_lpm_pin_t;
+
+
+typedef struct{
+    qser_lpm_pin_t wakeupin_pin;
+    qser_lpm_edge_t wakeupin_edge;
+}qser_lpm_wakeupin_data_t;
+
+typedef struct{
+    qser_lpm_pin_t wakeupout_pin;
+    qser_lpm_edge_t wakeupout_edge;
+}qser_lpm_wakeupout_data_t;
+
+
+typedef void (*qser_lpm_Handler_t)
+(
+    qser_lpm_edge_t lpm_edge
+);
+
+typedef struct{
+    qser_lpm_wakeupin_data_t wakeupin;
+    qser_lpm_wakeupout_data_t wakeupout;
+}qser_pm_cfg_t;
+
+
+typedef struct
+{
+    char lock_name[MAX_LOCK_NUM][64];
+    int lock_pid[MAX_LOCK_NUM];
+} LOCK_TABLE;
+
+typedef void (*mbtk_info_callback_func)(const void* data, int data_len);
+
+int read_lock_table(void);
+int qser_lpm_init(qser_lpm_Handler_t qser_lpm_handler, qser_pm_cfg_t *qser_lpm_cfg);
+int qser_lpm_deinit(void);
+int qser_autosuspend_enable(char enable);
+int qser_wakelock_create(const char *name, size_t len);
+int qser_wakelock_lock(int fd);
+int qser_wakelock_unlock(int fd);
+int qser_wakelock_destroy(int fd);
+
+int qser_whitelist_set(char *whitelist);
+int qser_whitelist_get(char *whitelist);
+
+//static void* suspend_timer_thread_run(void* arg);
+//int suspend_timer_timer_init(void);
+int qser_suspend_timer_set(int time, mbtk_info_callback_func cb);
+
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/mbtk/include/lynq/lynq-qser-fota.h b/mbtk/include/lynq/lynq-qser-fota.h
new file mode 100755
index 0000000..bbc674c
--- /dev/null
+++ b/mbtk/include/lynq/lynq-qser-fota.h
@@ -0,0 +1,36 @@
+/*******************************************************

+* 

+* @brief:

+* @details:  add fota upgrade api

+* @author:   l.yang

+* @date:     2023.8.3

+* @version:  V1.0

+* @copyright:Copyright (c) MobileTek 

+*

+*********************************************/

+#ifndef LYNQ_QSER_FOTA

+#define LYNQ_QSER_FOTA 

+#ifdef __cplusplus

+extern "C" {

+#endif

+

+

+/*******************************************************************************

+* @brief get reboot upgrade status 

+  @param 

+    NULL

+  @return 

+        if reboot the other system successfully return 1, else return 0

+ *******************************************************************************/

+int lynq_get_reboot_upgrade_status(void);

+int lynq_get_upgrade_status(void);

+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

+}

+#endif

+#endif

+

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
new file mode 100755
index 0000000..668d6ce
--- /dev/null
+++ b/mbtk/include/lynq/lynq-qser-voice.h
@@ -0,0 +1,218 @@
+/**
+ *@file     qser_voice.h
+ *@date     2017-11-30
+ *@author
+ *@brief
+ */
+
+
+#ifndef __LYNQ_QSER_VOICE_H__
+#define __LYNQ_QSER_VOICE_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "mbtk_type.h"
+
+typedef enum
+{
+    E_QSER_VCALL_EXTERNAL_SLOT_1,
+    E_QSER_VCALL_EXTERNAL_SLOT_2,
+    E_QSER_VCALL_EMBEDDED,
+    E_QSER_VCALL_REMOTE,
+    E_QSER_VCALL_ID_MAX
+}E_QSER_VCALL_ID_T;
+
+typedef enum
+{
+    E_QSER_VOICE_CALL_STATE_INCOMING      = 0x0000, /**< MT incoming; CC setup. */
+    E_QSER_VOICE_CALL_STATE_DIALING       = 0x0001, /**< Dialing state. */
+    E_QSER_VOICE_CALL_STATE_ALERTING      = 0x0002, /**< MT call waiting; MO alterting. */
+    E_QSER_VOICE_CALL_STATE_ACTIVE        = 0x0003, /**< Call is active. */
+    E_QSER_VOICE_CALL_STATE_HOLDING       = 0x0004, /**< Call is on hold. */
+    E_QSER_VOICE_CALL_STATE_END           = 0x0005, /**< Call is disconnected. */
+    E_QSER_VOICE_CALL_STATE_WAITING       = 0x0006, /**< Call is waiting. */
+}qser_voice_call_state_t;
+
+typedef enum
+{
+    E_QSER_VOICE_CALL_WAITING_VOICE_ENABLED       = 0, /**<  Voice call waiting enabled. */
+    E_QSER_VOICE_CALL_WAITING_DISABLED            = 1, /**<  Voice call waiting disabled. */
+}E_QSER_VOICE_CALL_WAITING_SERVICE_T;
+
+typedef struct
+{
+    E_QSER_VOICE_CALL_WAITING_SERVICE_T   waiting_service;
+}qser_voice_call_waiting_service_t;
+
+typedef qser_voice_call_state_t E_QSER_VOICE_CALL_STATE_T;
+
+typedef uint32_t voice_client_handle_type;
+
+/* Callback function registered via QSER_Voice_Call_AddStateHandler;
+   This will be called if any stated changed of call_id
+*/
+typedef void (*QSER_VoiceCall_StateHandlerFunc_t)
+(
+    int                     caLOCAL_C_INCLUDESll_id,
+    char*                   phone_num,
+    E_QSER_VOICE_CALL_STATE_T state,
+    void                    *contextPtr
+);
+
+/* Init voice module and return h_voice, this should be called before any other APIs */
+int qser_voice_call_client_init(voice_client_handle_type  *ph_voice);
+
+/* DeInit voice module and release resources, this should be called at last */
+int qser_voice_call_client_deinit(voice_client_handle_type h_voice);
+
+/* Add callback function, if any call state changed, handlerPtr will be called to notify App */
+int qser_voice_call_addstatehandler(voice_client_handle_type          h_voice,
+                                  QSER_VoiceCall_StateHandlerFunc_t   handlerPtr,
+                                  void*                             contextPtr);
+
+/* Remove callback function, won't receive any notify anymore */
+int qser_voice_call_removestatehandle(voice_client_handle_type       h_voice);
+
+/* Start call and return call_id, this can be used in the later */
+int qser_voice_call_start(voice_client_handle_type    h_voice,
+                        E_QSER_VCALL_ID_T             simId,
+                        char*                       phone_number,   ///< [IN] Destination identifier for the voice
+                        int                         *call_id);       ///< [OUT] call id
+
+/* End call of call_id, which returned by QSER_Voice_Call_Start or callback func register via QSER_Voice_Call_AddStateHandler */
+int qser_voice_call_end(  voice_client_handle_type    h_voice,
+                        int                         call_id);        ///< [IN] call id, return by QSER_Voice_Start
+
+/* Answer the call of call_id, which returned by callback func register via QSER_Voice_Call_AddStateHandler */
+int qser_voice_call_answer(voice_client_handle_type    h_voice,
+                         int                         call_id );
+
+int qser_voice_call_switch_waiting_or_holding_and_active(voice_client_handle_type h_voice);
+
+//set voice speech volume
+int qser_voice_set_speech_volume(const int volume);
+
+//Get voice speech volume
+int qser_voice_get_speech_volume(int *volume);
+
+//Set voice call waiting
+int qser_voice_call_setwaiting
+(
+    int                                 h_voice,
+    qser_voice_call_waiting_service_t e_service
+);
+
+//Get voice call waiting status
+int qser_voice_call_getwaitingstatus
+(
+    int                                 h_voice,
+    qser_voice_call_waiting_service_t *pe_service
+);
+
+
+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
+2, QSER_Voice_Call_AddStateHandler(pf_cb)
+3, wait for new call arrive, pf_cb will pass the call_id to app.
+4, QSER_Voice_Call_Answer(call_id)
+5, QSER_Voice_Call_End
+6, QSER_Voice_Call_Client_Deinit
+
+
+Usage 2 (call out):
+1, QSER_Voice_Call_Client_Init
+2, QSER_Voice_Call_AddStateHandler(pf_cb)
+3, QSER_Voice_Call_Start
+4, QSER_Voice_Call_End
+5, QSER_Voice_Call_Client_Deinit
+
+
+*/
+
+#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
+
+#endif // __QSER_VOICE_H__
+
diff --git a/mbtk/include/lynq/lynq_alarm.h b/mbtk/include/lynq/lynq_alarm.h
new file mode 100755
index 0000000..b9a9d02
--- /dev/null
+++ b/mbtk/include/lynq/lynq_alarm.h
@@ -0,0 +1,23 @@
+/*
+* qser_alarm.h
+*
+* QSER alarm header.
+*
+* Author : lb
+* Date   : 2023/11/23 10:45:44
+*/
+#ifndef _QSER_ALARM_H
+#define _QSER_ALARM_H
+#include "mbtk_type.h"
+
+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);
+
+#endif /* _QSER_ALARM_H */
diff --git a/mbtk/include/lynq/lynq_autosuspend.h b/mbtk/include/lynq/lynq_autosuspend.h
new file mode 100755
index 0000000..efd1219
--- /dev/null
+++ b/mbtk/include/lynq/lynq_autosuspend.h
@@ -0,0 +1,37 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <unistd.h>
+#include <dlfcn.h>
+#include <pthread.h>
+#include <stdbool.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+struct time_info_t
+{
+    long sleep_start_time;
+    long wakeup_time;
+};
+
+int lynq_autosleep_enable(void);
+int lynq_autosleep_disable(void);
+int lynq_wait_wakeup_event(long *sleep_start_time, long * wakeup_time);
+
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int lynq_set_lpmode(int lp_mode);
+int release_wake_lock(char *name);
+int acquire_wake_lock(int lock, char *name);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/mbtk/include/lynq/lynq_call.h b/mbtk/include/lynq/lynq_call.h
new file mode 100755
index 0000000..3bb398f
--- /dev/null
+++ b/mbtk/include/lynq/lynq_call.h
@@ -0,0 +1,181 @@
+#ifndef LYNQ_CALL_H

+#define LYNQ_CALL_H 1

+#ifdef __cplusplus

+extern "C" {

+#endif

+#define LYNQ_PHONE_NUMBER_MAX 32

+#define INDEX_IS_NUMBER( alpha_char )   \

+   ( ( (alpha_char >= '0') && (alpha_char <= '9') ) ? 1 : 0 )

+#define LYNQ_CALL_MAX 3

+#define LYNQ_CALL_FAIL_VENDOR_CAUSE 64

+#define MAX_IP_LENGTH 128

+#define MAX_VLAN_INFO_LENGTH 32

+#define MAX_SSRC_INFO_LENGTH 10   /*2^32=4294967296, 10 digit*/

+

+typedef enum {

+    LYNQ_CALL_FAIL_UNOBTAINABLE_NUMBER = 1,

+    LYNQ_CALL_FAIL_NORMAL = 16,

+    LYNQ_CALL_FAIL_BUSY = 17,

+    LYNQ_CALL_FAIL_CONGESTION = 34,

+    LYNQ_CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,

+    LYNQ_CALL_FAIL_CALL_BARRED = 240,

+    LYNQ_CALL_FAIL_FDN_BLOCKED = 241,

+    LYNQ_CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,

+    LYNQ_CALL_FAIL_IMEI_NOT_ACCEPTED = 243,

+    LYNQ_CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */

+    LYNQ_CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,

+    LYNQ_CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,

+    LYNQ_CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,

+    LYNQ_CALL_FAIL_CDMA_DROP = 1001,

+    LYNQ_CALL_FAIL_CDMA_INTERCEPT = 1002,

+    LYNQ_CALL_FAIL_CDMA_REORDER = 1003,

+    LYNQ_CALL_FAIL_CDMA_SO_REJECT = 1004,

+    LYNQ_CALL_FAIL_CDMA_RETRY_ORDER = 1005,

+    LYNQ_CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,

+    LYNQ_CALL_FAIL_CDMA_PREEMPTED = 1007,

+    LYNQ_CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed

+                                            during emergency callback mode */

+    LYNQ_CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */

+    LYNQ_CALL_FAIL_ERROR_UNSPECIFIED = 0xffff

+} lynq_last_call_fail_cause_t;

+typedef struct

+{

+    lynq_last_call_fail_cause_t cause_code;

+    char vendor_cause[LYNQ_CALL_FAIL_VENDOR_CAUSE];

+}lynqLastCallFailCause;

+int lynq_init_call(int uToken);

+int lynq_deinit_call();

+int lynq_call(int *handle,char addr[]);

+int lynq_call_answer();

+int lynq_call_hungup(int*handle);

+int lynq_call_hungup_all();

+int lynq_set_auto_answercall(const int mode);

+int lynq_get_mute_mic(int *status);

+int lynq_set_mute_mic(const int enable);

+int lynq_get_speech_volume(int *volume);

+int lynq_set_speech_volume(const int volume);

+int lynq_incall_record_start(const char* file_path);

+int lynq_incall_record_stop();

+int lynq_set_DTMF(const char callnum);

+int lynq_set_DTMF_volume(const int volume);

+int lynq_get_current_call_state(int *handle,    int *call_state,int *toa,int *direction,char addr[]);

+/*lei add for T8TSK-17 2022/7/20*/

+int lynq_switch_waiting_or_holding_and_active(void);

+int lynq_hangup_waiting_or_background(void);

+int lynq_hangup_foreground_resume_background(void);

+

+/* add for T106bug-213 2023/9/18 */

+void lynq_release_wait_call();

+

+/*lei add for API-163/API-164 2023/1/3*/

+/**

+ * @brief                  wait_call_state_change

+ *                        

+ * @param  handle            call_id            

+ * @return int

+ */

+int lynq_wait_call_state_change(int *handle);

+/*lei add for API-163/API-164 2023/1/3*/

+/*lei add for T8TSK-17 2022/7/20*/

+

+#ifdef ECALL_SUPPORT

+typedef enum{

+    LYNQ_ECALL_SET_NUMBER = 0,     /* Set Number */

+    LYNQ_ECALL_SET_URI = 1,      /* Set Uri */   

+}LYNQ_ECall_Set_Type;

+

+typedef enum{

+    LYNQ_EMER_CAT_MANUAL_ECALL = 0,      /* Manual Emergency eCall */

+    LYNQ_EMER_CAT_AUTO_ECALL = 1,     /*  Automatic Emergency eCall */

+}LYNQ_ECall_Category;

+

+typedef enum{

+    LYNQ_ECALL_TEST = 0,     /* Test eCall */

+    LYNQ_ECALL_EMERGENCY = 1,      /* Emergency eCall */

+    LYNQ_ECALL_RECONFIG = 2,     /*  Reconfiguration eCall */

+    LYNQ_ECALL_MO_MAX=3,

+    LYNQ_ECALL_CALLBACK = 3,     /*  Callback eCall */

+    LYNQ_ECALL_VAR_MAX, 

+    LYNQ_ECALL_VAR_NONE=LYNQ_ECALL_VAR_MAX,

+}LYNQ_ECall_Variant;

+

+typedef enum{

+    LYNQ_ECALL_SENDING_START = 1,

+    LYNQ_ECALL_SENDING_MSD = 2,

+    LYNQ_ECALL_LLACK_RECEIVED = 3,

+    LYNQ_ECALL_ALACK_POSITIVE_RECEIVED = 4,

+    LYNQ_ECALL_ALACK_CLEARDOWN_RECEIVED = 5,

+    LYNQ_ECALL_DAILING = 9,

+    LYNQ_ECALL_ALERTING = 10,

+    LYNQ_ECALL_ACTIVE = 11,

+    LYNQ_ECALL_DISCONNECTED = 12,

+    LYNQ_ECALL_IMS_ACTIVE = 13,

+    LYNQ_ECALL_IMS_DISCONNECTED = 14,

+    LYNQ_ECALL_ABNORMAL_HANGUP=15,

+    LYNQ_ECALL_IMS_MSD_ACK = 20,

+    LYNQ_ECALL_IMS_UPDATE_MSD = 21,

+    LYNQ_ECALL_IMS_IN_BAND_TRANSFER = 22,

+    LYNQ_ECALL_IMS_MSD_NACK = 23,

+    LYNQ_ECALL_IMS_SRVCC = 24,

+    LYNQ_ECALL_ONLY_DEREGISTRATION = 31,

+    LYNQ_ECALL_MAY_DEREGISTER = 32,

+    LYNQ_ECALL_PSAP_CALLBACK_START = 40,

+    LYNQ_ECALL_PSAP_CALLBACK_IMS_UPDATE_MSD = 41,

+    LYNQ_ECALL_SENDING_START_IN_VOICE=8000,    

+    LYNQ_ECALL_T2_TIMER_OUT = 9000,

+    LYNQ_ECALL_T5_TIMER_OUT = 9001,

+    LYNQ_ECALL_T6_TIMER_OUT = 9002,

+    LYNQ_ECALL_T7_TIMER_OUT = 9003,

+    LYNQ_ECALL_REDIAL_TIMER_OUT = 9004,    

+    LYNQ_ECALL_AUTO_ANS_TIMER_OUT = 9005,

+    LYNQ_ECALL_AUTO_ANS_IMS_TIMER_OUT = 9006,

+    LYNQ_ECALL_UNSPECIFIED = 0xffff,

+}LYNQ_ECall_Indication;

+

+int lynq_set_test_num(LYNQ_ECall_Set_Type type, const char *test_num, int test_num_length);

+int lynq_fast_ecall(int* handle, LYNQ_ECall_Category lynq_ecall_cat, LYNQ_ECall_Variant lynq_ecall_variant,  const char *addr, int addr_length, const unsigned char *msd_data, int msd_length);

+int lynq_set_msd(int* handle, const unsigned char *msd_data, int msd_length);

+int lynq_set_ivs(int enable);

+int lynq_ivs_push_msd();

+int lynq_wait_ecall_indication(int* handle, LYNQ_ECall_Indication *eCall_Indication);

+#endif

+

+/*Audio Path setting begin*/

+typedef enum{

+    AUDIO_MODE_CODEC = 0,     /* Codec */

+    AUDIO_MODE_RTP = 1,      /* RTP */       

+}LYNQ_Audio_Mode;

+

+typedef enum{

+    RTP_CLIENT = 0,     

+    RTP_SERVER =1,

+    RTP_MODE_MAX

+}LYNQ_Rtp_Mode;

+

+typedef enum{

+    Rtp_Ssrc_random = 0,     

+    Rtp_Ssrc_specific =1,   

+}LYNQ_Rtp_Ssrc_Mode;

+

+/*set*/

+int lynq_set_voice_audio_mode(const LYNQ_Audio_Mode audio_mode); 

+int lynq_set_remote_rtp_ip(const char* ip, const int ip_length);

+int lynq_set_vlan_info(const char* vlan_info, const int vlan_info_length);

+int lynq_set_rtp_port(const LYNQ_Rtp_Mode rtp_mode, const int port);

+int lynq_set_rtp_param(const int clock_rate,const int channels,const int latency); //only for client

+int lynq_set_call_rtp_ssrc(const LYNQ_Rtp_Ssrc_Mode ssrc_mode, const unsigned int ssrc);

+

+/*get*/

+LYNQ_Audio_Mode lynq_get_voice_audio_mode();

+int lynq_get_remote_rtp_ip(char* ip, const int ip_length);

+int lynq_get_vlan_info(char* vlan_info, const int vlan_info_length);

+int lynq_get_rtp_port(const LYNQ_Rtp_Mode rtp_mode, int* port);

+int lynq_get_rtp_param(int* clock_rate,int* channels, int* latency);//only for client

+int lynq_get_call_rtp_ssrc(int* ssrc_mod, unsigned int* ssrc);

+/*Audio Path setting end*/

+

+void lynq_set_test_mode(const int test_mode);

+#ifdef __cplusplus

+}

+#endif

+#endif

diff --git a/mbtk/include/lynq/lynq_chip_id.h b/mbtk/include/lynq/lynq_chip_id.h
new file mode 100755
index 0000000..4908ecf
--- /dev/null
+++ b/mbtk/include/lynq/lynq_chip_id.h
@@ -0,0 +1,34 @@
+/**@file lynq-systime.h

+ *

+ * @brief Sync systime form each time source.

+ *

+ * @author sj.zhang

+ *

+ * @date 2023-08-14

+ *

+ * @version V1.0

+ *

+ * @copyright Copyright (c) MobileTek

+ */

+

+#ifndef _LYNQ_CHIP_ID_H_

+#define _LYNQ_CHIP_ID_H_

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+/**@brief get chip id.

+*

+* @param void

+*

+* @return

+*      0:success

+*      other:failure

+*/

+int lynq_get_chip_id(char *chip_id);

+

+#ifdef __cplusplus

+}

+#endif

+#endif

diff --git a/mbtk/include/lynq/lynq_data.h b/mbtk/include/lynq/lynq_data.h
new file mode 100755
index 0000000..1ee15ba
--- /dev/null
+++ b/mbtk/include/lynq/lynq_data.h
@@ -0,0 +1,82 @@
+#ifndef LYNQ_DATA_H
+#define LYNQ_DATA_H 
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define LYNQ_APN_CHANNEL_MAX 10
+#define LYNQ_PDP_TYPE_MAX_LEN 16
+#define LYNQ_IFACE_NAME_MAX_LEN 50
+#define LYNQ_APN_MAX_LEN 50
+#define LYNQ_TYPE_MAX_LEN 50
+#define LYNQ_ADDRESSES_MAX_LEN 100
+#define LYNQ_DNSES_MAX_LEN 256
+#define LYNQ_GATEWAYS_MAX_LEN 50
+#define LYNQ_PCSCF_MAX_LEN 256
+#define LYNQ_APN_TYPE_MAX_LEN 50
+#define LYNQ_PDP_ADDR_MAX_LEN 64
+#define LYNQ_DNS_ADDR_MAX_LEN 256
+#define LYNQ_GETWAYS_ADDR_MAX_LEN 64
+#define LYNQ_POXY_ADDR_MAX_LEN 64
+
+
+typedef struct {
+    int            status;     /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
+    int            suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
+                                           back-off timer value RIL wants to override the one
+                                           pre-configured in FW.
+                                           The unit is miliseconds.
+                                           The value < 0 means no value is suggested.
+                                           The value 0 means retry should be done ASAP.
+                                           The value of INT_MAX(0x7fffffff) means no retry. */
+    int            cid;        /* Context ID, uniquely identifies this call */
+    int            active;     /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
+    char           type[LYNQ_PDP_TYPE_MAX_LEN];       /* One of the PDP_type values in TS 27.007 section 10.1.1.
+                                   For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
+                                   PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
+                                   such as "IP" or "IPV6" */
+    char           ifname[LYNQ_IFACE_NAME_MAX_LEN];     /* The network interface name */
+    char           addresses[LYNQ_PDP_ADDR_MAX_LEN];  /* A space-delimited list of addresses with optional "/" prefix length,
+                                   e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
+                                   May not be empty, typically 1 IPv4 or 1 IPv6 or
+                                   one of each. If the prefix length is absent the addresses
+                                   are assumed to be point to point with IPv4 having a prefix
+                                   length of 32 and IPv6 128. */
+    char           dnses[LYNQ_DNS_ADDR_MAX_LEN];      /* A space-delimited list of DNS server addresses,
+                                   e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+                                   May be empty. */
+    char           gateways[LYNQ_GETWAYS_ADDR_MAX_LEN];   /* A space-delimited list of default gateway addresses,
+                                   e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+                                   May be empty in which case the addresses represent point
+                                   to point connections. */
+    char           pcscf[LYNQ_POXY_ADDR_MAX_LEN];    /* the Proxy Call State Control Function address
+                                 via PCO(Protocol Configuration Option) for IMS client. */
+    int            mtu;        /* MTU received from network
+                                   Value <= 0 means network has either not sent a value or
+                                   sent an invalid value */
+} lynq_data_call_response_v11_t;
+
+typedef struct
+{
+    int index;
+    char apn[LYNQ_APN_MAX_LEN];
+    char apnType[LYNQ_APN_TYPE_MAX_LEN];
+}lynq_apn_info;
+
+int lynq_init_data(int uToken);
+int lynq_deinit_data();
+int lynq_setup_data_call(int *handle);
+int lynq_deactive_data_call(int *handle);
+int lynq_setup_data_call_sp(int *handle,char *apn,char *apnType,char *user,char *password,char *authType,char *normalProtocol,char *roamingProtocol);
+int lynq_setup_data_call_sp_t106(int *handle,char *apn,char *apnType,char *user,char *password,char *authType,char *normalProtocol,char *roamingProtocol);
+//int lynq_deactive_data_call_sp(int *handle,char *apnType);
+int lynq_get_data_call_list(int *handle,lynq_data_call_response_v11_t *dataCallList);
+int lynq_wait_data_call_state_change(int *handle);
+int lynq_modify_apn_db(const int cmd,char *id,char *mcc,char *mnc,char *apn,char *apntype,char *user,char *password,char *normalprotocol,char *roamingprotocol,char *carrier,char *out);
+int lynq_reset_apn(char *result);
+int lynq_get_apn_table(int *size,lynq_apn_info **list);
+void lynq_release_wait_data_call();
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/mbtk/include/lynq/lynq_deflog.h b/mbtk/include/lynq/lynq_deflog.h
new file mode 100755
index 0000000..fd45185
--- /dev/null
+++ b/mbtk/include/lynq/lynq_deflog.h
@@ -0,0 +1,211 @@
+#ifndef __LYNQ_DEFLOG_H__

+#define __LYNQ_DEFLOG_H__

+#include "liblog.h"

+

+#ifdef __cplusplus

+extern "C" {

+#endif

+

+typedef void (*LYNQ_WRITE_LOG_PTR)(log_level_enum level, const char *format, ...);

+extern LYNQ_WRITE_LOG_PTR lynq_write_log;

+LYNQ_WRITE_LOG_PTR lynq_log_function_init(const char *log_name);

+

+int lynq_syslog_set_file_size(int value);

+int lynq_syslog_get_file_size(void);

+int lynq_syslog_set_file_rotate(int value);

+int lynq_syslog_get_file_rotate(void);

+

+#ifdef __cplusplus

+}

+#endif

+#define lynq_log_verbose(fmt, args...)  \

+    do{ \

+        char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_VERBOSE_LEVEL, "%s#%s: " fmt, ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define lynq_log_error(fmt, args...)  \

+    do{ \

+		char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_ERR_LEVEL, "%s#%s: " fmt, ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define lynq_log_warning(fmt, args...)  \

+    do{ \

+        char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_WARN_LEVEL, "%s#%s: " fmt, ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define lynq_log_info(fmt, args...)  \

+    do{ \

+        char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_INFO_LEVEL, "%s#%s: " fmt, ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define lynq_log_debug(fmt, args...)  \

+    do{ \

+        char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_DEBUG_LEVEL, "%s#%s: " fmt "\n", ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define LYVERBLOG(fmt, args...)  \

+    do{ \

+        char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_VERBOSE_LEVEL, "%s#%s: " fmt, ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define LYERRLOG(fmt, args...)  \

+    do{ \

+		char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_ERR_LEVEL, "%s#%s: " fmt, ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define LYWARNLOG(fmt, args...)  \

+    do{ \

+        char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_WARN_LEVEL, "%s#%s: " fmt, ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define LYINFLOG(fmt, args...)  \

+    do{ \

+        char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_INFO_LEVEL, "%s#%s: " fmt, ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+

+#define LYDBGLOG(fmt, args...)  \

+    do{ \

+        char *file_ptr_1001 = __FILE__; \

+        char *ptr_1001 = file_ptr_1001 + strlen(file_ptr_1001) - 1;   \

+        char line_1001[10] = {0}; \

+        sprintf(line_1001, "%d", __LINE__); \

+        while(ptr_1001 >= file_ptr_1001 && *ptr_1001){ \

+            if(*ptr_1001 == '/') \

+                 break; \

+            ptr_1001--; \

+        } \

+        mbtk_log(LOG_DEBUG_LEVEL, "%s#%s: " fmt "\n", ptr_1001 + 1, line_1001, ##args); \

+    } while(0)

+// #define lynq_log_verbose(...)  do { lynq_write_log(LOG_VERBOSE,__VA_ARGS__);} while (0)

+// #define lynq_log_error(...)  do {lynq_write_log(LOG_ERROR,__VA_ARGS__);} while (0)

+// #define lynq_log_warning(...)  do {lynq_write_log(LOG_WARNING,__VA_ARGS__);} while (0)

+// #define lynq_log_info(...)  do {lynq_write_log(LOG_INFO,__VA_ARGS__);} while (0)

+// #define lynq_log_debug(...)  do {lynq_write_log(LOG_DEBUG,__VA_ARGS__);} while (0)

+

+// #define LYVERBLOG(...)  do {lynq_write_log(LOG_VERBOSE,__VA_ARGS__);} while (0)

+// #define LYERRLOG(...)  do {lynq_write_log(LOG_ERROR,__VA_ARGS__);} while (0)

+// #define LYWARNLOG(...)  do {lynq_write_log(LOG_WARNING,__VA_ARGS__);} while(0)

+// #define LYINFLOG(...)  do {lynq_write_log(LOG_INFO,__VA_ARGS__);} while (0)

+// #define LYDBGLOG(...)  do {lynq_write_log(LOG_DEBUG,__VA_ARGS__);} while (0)

+

+// // just for comcompatibility, do nothing

+// #define LYLOGSET(a) do{;}while(0)

+// #define LYLOGEINIT(Y) do{;}while(0)

+

+// #ifndef ALOGV

+// #define ALOGV(...) do {lynq_write_log(LOG_VERBOSE,__VA_ARGS__);} while (0)

+// #endif

+

+// #ifndef ALOGE

+// #define ALOGE(...) do {lynq_write_log(LOG_ERROR,__VA_ARGS__);} while (0)

+// #endif

+

+// #ifndef ALOGW

+// #define ALOGW(...) do {lynq_write_log(LOG_WARNING,__VA_ARGS__);} while (0)

+// #endif

+

+// #ifndef ALOGI

+// #define ALOGI(...) do {lynq_write_log(LOG_INFO,__VA_ARGS__);} while (0)

+// #endif

+

+// #ifndef ALOGD

+// #define ALOGD(...) do {lynq_write_log(LOG_DEBUG,__VA_ARGS__);} while (0)

+// #endif

+

+#define DEFINE_LYNQ_LIB_LOG(tag) \

+    LYNQ_WRITE_LOG_PTR __attribute__ ((visibility ("hidden"))) lynq_write_log = NULL; \

+    void __attribute__((constructor)) tag##_init() \

+    { \

+        lynq_write_log = lynq_log_function_init(#tag); \

+    }

+

+#define DEFINE_LYNQ_EXE_LOG(tag) \

+    LYNQ_WRITE_LOG_PTR __attribute__ ((visibility ("hidden"))) lynq_write_log = NULL; \

+    void __attribute__((constructor)) tag##_init() \

+    { \

+        lynq_write_log = lynq_log_function_init(#tag); \

+        lynq_log_configuration_init(#tag); \

+    }

+

+#endif  //__LYNQ_DEFLOG_H__

diff --git a/mbtk/include/lynq/lynq_gnss.h b/mbtk/include/lynq/lynq_gnss.h
new file mode 100755
index 0000000..893f6a8
--- /dev/null
+++ b/mbtk/include/lynq/lynq_gnss.h
@@ -0,0 +1,120 @@
+/*
+* qser_gnss.h
+*
+* QSER GNSS header file.
+*
+* Author : lb
+* Date   : 2023/11/23 11:13:18
+*/
+#ifndef _QSER_GNSS_H
+#define _QSER_GNSS_H
+#include "mbtk_type.h"
+#include "mbtk_gnss.h"
+#include "mbtk_log.h"
+
+typedef unsigned int Uint_t;
+#define MOPEN_GNSS_NMEA_MAX_LENGTH  255                 /* NMEA string maximum length. */
+
+#define QSER_LEN_MAX 128
+
+typedef enum
+{
+    E_MT_LOC_MSG_ID_LOCATION_INFO = 1, /**< pv_data = & mopen_location_info_t */
+    E_MT_LOC_MSG_ID_NMEA_INFO = 3, /**< pv_data = & mopen_gnss_nmea_info_t */
+} e_msg_id_t;
+
+typedef enum {
+	QSER_GNSS_ERROR_SUCCESS = 0,
+    QSER_GNSS_ERROR_FAIL,
+} qser_gnss_error_e;
+
+typedef void (*gnss_handler_func_t)
+(
+    Uint_t *h_loc,
+    e_msg_id_t e_msg_id, //消息 ID
+    void *pv_data, //消息内容,取决于 ID,如下说明
+    void *context_ptr //用于区分哪个返回的消息
+)/* lynq_AddRxIndMsgHandler_t*/;
+
+typedef void (*gnss_async_func_t)(qser_gnss_error_e state);
+
+typedef struct
+{
+    char host[QSER_LEN_MAX];
+    char id[QSER_LEN_MAX];
+    char passwd[QSER_LEN_MAX];
+}qser_agps_info;
+
+typedef struct
+{
+    int64_t     timestamp;                              /**<   System Timestamp, marked for when got the nmea data */
+    int         length;                                 /**<   NMEA string length. */
+    char        nmea[MOPEN_GNSS_NMEA_MAX_LENGTH + 1];   /**<   NMEA string.*/
+}mopen_gnss_nmea_info_t;  /* Message */
+
+typedef struct
+{
+    uint32_t    size;                   /**<   Set to the size of mcm_gps_location_t. */
+    int flags;                          /**<   Contains GPS location flags bits. */
+    int position_source;                /**<   Provider indicator for HYBRID or GPS. */ //功能暂未实现,可不用添加进结构体
+    double      latitude;               /**<   Latitude in degrees. */
+    double      longitude;              /**<   Longitude in degrees. */
+    double      altitude;               /**<   Altitude in meters above the WGS 84 reference ellipsoid. */
+    float       speed;                  /**<   Speed in meters per second. */
+    float       bearing;                /**<   Heading in degrees. */ //功能暂未实现,可不用添加进结构体
+    float       accuracy;               /**<   Expected accuracy in meters. */ //功能暂未实现,可不用添加进结构体
+    int64_t     timestamp;              /**<   Timestamp for the location fix in UTC million-second base.  */
+    int32_t     is_indoor;              /**<   Location is indoors. */ //功能暂未实现,可不用添加进结构体
+    float       floor_number;           /**<   Indicates the floor number. */
+}mopen_location_info_t;//功能暂未实现,可不用添加进结构体
+
+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 {
+    DELETE_NOTHING = 0, /*不删除数据*/
+    DELETE_EPHEMERIS = 1, /*删除星历*/
+    DELETE_ALMANAC = 2, /*删除历书*/
+    DELETE_POSITION_TIME = 3, /*删除时间和位置信息. */
+    DELETE_UTC = 4, /*删除 UTC 时间*/
+    DELETE_ALL = 5 /*删除所有*/
+} DELETE_AIDING_DATA_TYPE_T;
+
+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_Set_Async_Callback(gnss_async_func_t cb);
+
+int qser_Gnss_Start (uint32_t h_gnss);
+
+int qser_Gnss_Start_Async(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_InjectTime (uint32_t h_gnss,LYNQ_INJECT_TIME_INTO_T *time_info);
+
+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_download_tle();
+
+int qser_Gnss_injectEphemeris(uint32_t h_gnss);
+
+
+#endif /* _QSER_GNSS_H */
diff --git a/mbtk/include/lynq/lynq_led.h b/mbtk/include/lynq/lynq_led.h
new file mode 100755
index 0000000..c95282b
--- /dev/null
+++ b/mbtk/include/lynq/lynq_led.h
@@ -0,0 +1,12 @@
+#ifndef LYNQ_LED_H

+#define LYNQ_LED_H 1

+#ifdef __cplusplus

+extern "C" {

+#endif

+

+int lynq_set_netled_on(const int test_mode);

+int lynq_set_statusled_on(const int test_mode);

+#ifdef __cplusplus

+}

+#endif

+#endif

diff --git a/mbtk/include/lynq/lynq_network.h b/mbtk/include/lynq/lynq_network.h
new file mode 100755
index 0000000..e878e6b
--- /dev/null
+++ b/mbtk/include/lynq/lynq_network.h
@@ -0,0 +1,147 @@
+#ifndef LYNQ_NETWORK_H

+#define LYNQ_NETWORK_H 

+#ifdef __cplusplus

+extern "C" {

+#endif

+#define MODEM_GEN97 1

+#define CELLINFO_MAX_NUM  10

+#define LY_RECOVER_TIMER_INTERVAL 128

+#define MAX_CELLINFO_ITEM_NUMBER 32

+#define MAX_OOS_CFG_ITEM_NUMBER 32

+/*T800 platform support gsm,wcdma lte,nr */

+typedef struct{

+    int gw_sig_valid; /*1 valid,1 invalid*/

+    int rssi;         /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */

+    int wcdma_sig_valid;/*1 valid,0 invalid*/

+    int wcdma_signalstrength;

+    int rscp;        /* The Received Signal Code Power in dBm multipled by -1.

+                      * Range : 25 to 120

+                      * INT_MAX: 0x7FFFFFFF denotes invalid value.

+                      * Reference: 3GPP TS 25.123, section 9.1.1.1 */

+    int ecno;        /* Valid values are positive integers.  This value is the actual Ec/Io multiplied

+                      * by -10.  Example: If the actual Ec/Io is -12.5 dB, then this response value

+                      * will be 125.*/

+    int lte_sig_valid;/*1 valid,0 invalid*/

+    int lte_signalstrength;                      

+    int rsrp;        /* The current Reference Signal Receive Power in dBm multipled by -1.

+                      * Range: 44 to 140 dBm

+                      * INT_MAX: 0x7FFFFFFF denotes invalid value.

+                      * Reference: 3GPP TS 36.133 9.1.4 */

+    int rsrq;        /* The current Reference Signal Receive Quality in dB multiplied by -1.

+                      * Range: 20 to 3 dB.

+                      * INT_MAX: 0x7FFFFFFF denotes invalid value.

+                      * Reference: 3GPP TS 36.133 9.1.7 */

+    int rssnr;       /* The current reference signal signal-to-noise ratio in 0.1 dB units.

+                      * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).

+                      * INT_MAX : 0x7FFFFFFF denotes invalid value.

+                      * Reference: 3GPP TS 36.101 8.1.1 */

+    int nr_sig_valid;/*1 valid,0 invalid*/

+    int ssRsrp;      /* SS(Synchronization Signal) reference signal received power, multipled by -1.

+                      * Reference: 3GPP TS 38.215.

+                      * Range [44, 140], INT_MAX means invalid/unreported.*/

+    int ssRsrq;      /* SS reference signal received quality, multipled by -1.

+                      * Reference: 3GPP TS 38.215.

+                      * Range [3, 20], INT_MAX means invalid/unreported.*/

+    int ssSinr;      /* SS signal-to-noise and interference ratio.

+                      * Reference: 3GPP TS 38.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.

+                      * Range [-23, 40], INT_MAX means invalid/unreported.*/

+    int csiRsrp;     /* CSI reference signal received power, multipled by -1.

+                      * Reference: 3GPP TS 38.215.

+                      * Range [44, 140], INT_MAX means invalid/unreported.*/

+    int csiRsrq;     /* CSI reference signal received quality, multipled by -1.

+                      * Reference: 3GPP TS 38.215.

+                      * Range [3, 20], INT_MAX means invalid/unreported.*/

+    int csiSinr;     /* CSI signal-to-noise and interference ratio.

+                      * Reference: 3GPP TS 138.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.

+                      * Range [-23, 40], INT_MAX means invalid/unreported.*/

+}signalStrength_t;

+

+typedef enum { 

+    NETWORK_RADIO_ON_TYPE_CFUN_0=0,  

+    NETWORK_RADIO_ON_TYPE_NORMAL_MODE=1,

+    NETWORK_RADIO_ON_TYPE_FLIGHT_MODE=4,

+}lynq_network_radio_on_type;  

+

+int lynq_network_init(int utoken);

+int lynq_network_deinit(void);

+int lynq_query_operater(char *OperatorFN,char *OperatorSH,char *MccMnc);

+int lynq_query_network_selection_mode(int *netselMode);

+int lynq_set_network_selection_mode(const char *mode,const char* mccmnc);

+int lynq_query_available_network(char *OperatorFN,char *OperatorSH,char *MccMnc,char * NetStatus);

+int lynq_query_registration_state(const char *type,int* regState,int* imsRegState,char * LAC,char * CID,int *netType,int *radioTechFam,int *netRejected);

+int lynq_query_prefferred_networktype(int *preNetType);

+int lynq_set_prefferred_networktype(const int preffertype);

+int lynq_query_cell_info(uint64_t cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int earfcn[CELLINFO_MAX_NUM],int * realNum);

+int lynq_set_unsol_cell_info_listrate(const int rate);

+int lynq_set_band_mode(const int bandmode);

+int lynq_query_available_bandmode(int availBanMode[]);

+int lynq_radio_on(const lynq_network_radio_on_type type);

+int lynq_query_radio_state(int *radio_state);

+int lynq_query_radio_tech(int* radioTech);

+int lynq_solicited_signal_strength(signalStrength_t *solSigStren);

+int lynq_set_ims(const int ims_mode);

+int lynq_wait_signalchanges(int *handle);

+int lynq_get_urc_info(const int handle,signalStrength_t *solSigStren,int *slot_id);

+

+typedef enum {  

+  LYNQ_CELL_INFO_TYPE_GSM    = 2,  

+  LYNQ_CELL_INFO_TYPE_WCDMA  = 3,

+  LYNQ_CELL_INFO_TYPE_LTE    = 4, 

+  LYNQ_CELL_INFO_TYPE_NR    = 5

+} lynq_network_cell_info_type;

+

+int lynq_query_serve_cell_info(int serve_cell_info[MAX_CELLINFO_ITEM_NUMBER], int * valid_number);

+

+typedef enum {

+    NETWORK_STATE_BUFFER_TYPE_VOICE_REG,

+    NETWORK_STATE_BUFFER_TYPE_DATA_REG,

+    NETWORK_STATE_BUFFER_TYPE_IMS_REG,

+    NETWORK_STATE_BUFFER_TYPE_MAX,

+}lynq_network_state_buffer_type;    

+int lynq_set_state_buffer_valid_period_of_network(lynq_network_state_buffer_type type,int valid_period);

+int lynq_get_state_buffer_valid_period_of_network(lynq_network_state_buffer_type type);

+#ifdef MODEM_GEN97

+/**@brief set or get OOS recover timer interval

+* @param mode [IN] <mode>:

+*  0:set

+*  1:get

+* @param interval [IN] <interval>: the recovery timer interval.

+*  field:

+*    T1,T2,...,T23:integer value 0~0xFFFFFFFF

+*    The length of time in seconds.

+*    defualt interval: 20,20,60,60,60,60,90,90,90,90,90,90,180,180,180,180,180,180,360,360,360,360,360

+* @param result [OUT] <result>: the recovery timer interval,when the mode is 1, this parameter is valid.

+

+* @return

+*  0:success

+*  other:failure

+*/

+int lynq_oos_recover_timer_interval(int mode, char interval[LY_RECOVER_TIMER_INTERVAL],char result[LY_RECOVER_TIMER_INTERVAL]);

+/**@brief set deep sleep recover timer interval

+

+* @param recovery_threshold [IN] <recovery_threshold>: valid range 2-10  //After performing several rounds of normal recovery, deep sleep mode optimization will be applied

+

+* @param fullband_timer [IN] <fullband_timer>:valid range 90-360 //fullband intervarl length in deep sleep mode

+

+* @param sniffer_timer [IN] <sniffer_timer>:valid range 10-60 // sniffe intervarl length in deep sleep mode.

+

+* @param inactive_mode [IN] <inactive_mode>:

+*  0 Exit inactive mode 

+*  1 enter inactive mode

+

+* @return

+*  0:success

+*  other:failure

+*/

+int lynq_oos_deep_sleep_recover_timer_interval(int recovery_threshold,int fullband_timer,int sniffer_timer,int inactive_mode);

+#endif

+#if (defined MOBILETEK_TARGET_PLATFORM_T106) || (defined MODEM_GEN97)

+int lynq_set_oos_net_scan_cfg(int config_list[MAX_OOS_CFG_ITEM_NUMBER], int valid_num);

+int lynq_get_oos_net_scan_cfg(int config_list[MAX_OOS_CFG_ITEM_NUMBER], int* valid_num);

+#endif

+void lynq_set_test_mode(const int test_mode);

+#ifdef __cplusplus

+}

+#endif

+

+#endif

diff --git a/mbtk/include/lynq/lynq_qser_data.h b/mbtk/include/lynq/lynq_qser_data.h
new file mode 100755
index 0000000..f2cff6f
--- /dev/null
+++ b/mbtk/include/lynq/lynq_qser_data.h
@@ -0,0 +1,288 @@
+#ifndef __LYNQ_QSER_DATA_H__
+#define __LYNQ_QSER_DATA_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <stdbool.h>
+#include <netinet/in.h>
+
+typedef enum {
+	QSER_DATA_CALL_ERROR_NONE = 0,
+	QSER_DATA_CALL_ERROR_INVALID_PARAMS,
+	QSER_DATA_CALL_ERROR_NO_INIT,
+	QSER_DATA_CALL_ERROR_PDP_ACTIVATE,
+	QSER_DATA_CALL_ERROR_PDP_NO_ACTIVATE,
+	QSER_DATA_CALL_ERROR_IDX_NO_EXIST,
+	QSER_DATA_CALL_ERROR_UNKNOWN,
+} qser_data_call_error_e;
+
+typedef enum {
+	QSER_DATA_CALL_DISCONNECTED = 0,            /*!< call is disconnected */
+	QSER_DATA_CALL_CONNECTED,                   /*!< call is connected */
+} qser_data_call_state_e;
+
+typedef enum {
+	QSER_DATA_CALL_TYPE_IPV4 = 0,           /*!< IPv4 call. */
+	QSER_DATA_CALL_TYPE_IPV6,               /*!< IPv6 call. */
+	QSER_DATA_CALL_TYPE_IPV4V6,             /*!< IPv4 and IPv6 call (Only used call start or stop). */
+} qser_data_call_ip_family_e;
+
+typedef enum {
+	QSER_APN_PDP_TYPE_IPV4 = 0,
+	QSER_APN_PDP_TYPE_PPP,
+	QSER_APN_PDP_TYPE_IPV6,
+	QSER_APN_PDP_TYPE_IPV4V6,
+} qser_apn_pdp_type_e;
+
+typedef enum {
+	QSER_APN_AUTH_PROTO_DEFAULT = 0,
+	QSER_APN_AUTH_PROTO_NONE,
+	QSER_APN_AUTH_PROTO_PAP,
+	QSER_APN_AUTH_PROTO_CHAP,
+	QSER_APN_AUTH_PROTO_PAP_CHAP,
+} qser_apn_auth_proto_e;
+
+#define QSER_APN_MAX_LIST 8
+#define QSER_APN_NAME_SIZE 64
+#define QSER_APN_USERNAME_SIZE 32
+#define QSER_APN_PASSWORD_SIZE 32
+#define QSER_APN_TYPE_SIZE 16
+
+struct v4_address_status {
+	struct in_addr ip;                    /*!< Public IPv4 address. */
+	struct in_addr gateway;               /*!< Public IPv4 gateway. */
+	struct in_addr pri_dns;               /*!< Primary Domain Name Service IP address. */
+	struct in_addr sec_dns;               /*!< Secondary Domain Name Service IP address. */
+};
+
+struct v6_address_status {
+	struct in6_addr ip;                   /*!< Public IPv6 address. */
+	struct in6_addr gateway;              /*!< Public IPv6 gateway. */
+	struct in6_addr pri_dns;              /*!< Primary Domain Name Service IPv6 address. */
+	struct in6_addr sec_dns;              /*!< Secondary Domain Name Service IPv6 address. */
+};
+
+typedef struct {
+	char profile_idx;                               /*!< UMTS/CMDA profile ID. */
+	char name[16];                                  /*!< Interface Name. */
+	qser_data_call_ip_family_e ip_family;             /*!< IP version. */
+	qser_data_call_state_e state;                     /*!< The dial status. */
+	qser_data_call_error_e err;                       /*!< The Reason code after data call disconnected. */
+	struct v4_address_status v4;            /*!< IPv4 information. */
+	struct v6_address_status v6;            /*!< IPv6 information. */
+} qser_data_call_state_s;
+
+/*
+ *!< Client callback function used to post event indications.
+ */
+typedef void (*qser_data_call_evt_cb_t)(qser_data_call_state_s *state);
+
+typedef struct {
+	char profile_idx;                        /*!< UMTS/CMDA profile ID. */
+	bool reconnect;                          /*!< Whether to re-dial after disconnecting the network. */
+	qser_data_call_ip_family_e ip_family;      /*!< IP version. */
+	char cdma_username[QSER_APN_USERNAME_SIZE];     /*!< Username used during data network authentication. */
+	char cdma_password[QSER_APN_PASSWORD_SIZE];     /*!< Password to be used during data network authentication. */
+} qser_data_call_s;
+
+struct pkt_stats {
+	unsigned long pkts_tx;              /*!< Number of packets transmitted. */
+	unsigned long pkts_rx;              /*!< Number of packets received. */
+	long long bytes_tx;                 /*!< Number of bytes transmitted. */
+	long long bytes_rx;                 /*!< Number of bytes received. */
+	unsigned long pkts_dropped_tx;      /*!< Number of transmit packets dropped. */
+	unsigned long pkts_dropped_rx;      /*!< Number of receive packets dropped. */
+};
+
+struct v4_info {
+	char name[16];                          /*!< Interface Name. */
+	qser_data_call_state_e state;             /*!< The dial status. */
+	bool reconnect;                         /*!< re-dial flag. */
+	struct v4_address_status addr;          /*!< IPv4 IP Address information. */
+	struct pkt_stats stats;                 /*!< IPv4 statics */
+};
+
+struct v6_info {
+	char name[16];                          /*!< Interface Name. */
+	qser_data_call_state_e state;             /*!< The dial status. */
+	bool reconnect;                         /*!< re-dial flag. */
+	struct v6_address_status addr;          /*!< IPv6 IP Address information. */
+	struct pkt_stats stats;                 /*!< IPv6 statics */
+};
+
+typedef struct {
+	char profile_idx;                        /*!< UMTS/CDMA profile ID. */
+	qser_data_call_ip_family_e ip_family;      /*!< IP version. */
+	struct v4_info v4;                       /*!< IPv4 information */
+	struct v6_info v6;                       /*!< IPv6 information */
+} qser_data_call_info_s;
+
+typedef struct {
+	unsigned char profile_idx;              /*!< UMTS/CDMA profile ID. range: 0 - 7*/
+	qser_apn_pdp_type_e pdp_type;             /*!< Packet Data Protocol (PDP) type specifies the type of data payload
+	                                             exchanged over the airlink when the packet data session is
+	                                             established with this profile. */ 
+	qser_apn_auth_proto_e auth_proto;         /*!< Authentication Protocol. */
+	char apn_name[QSER_APN_NAME_SIZE + 1];        /*!< A string parameter that is a logical name used to select the GGSN
+	                                             and external packet data network. */ 
+	char username[QSER_APN_USERNAME_SIZE + 1];    /*!< Username used during data network authentication. */
+	char password[QSER_APN_PASSWORD_SIZE + 1];    /*!< Password to be used during data network authentication. */
+    char apn_type[QSER_APN_TYPE_SIZE + 1];
+} qser_apn_info_s;
+
+typedef struct {
+	qser_apn_pdp_type_e pdp_type;             /*!< Packet Data Protocol (PDP) type specifies the type of data payload
+						  exchanged over the airlink when the packet data session is
+						  established with this profile. */ 
+	qser_apn_auth_proto_e auth_proto;         /*!< Authentication Protocol. */
+	char apn_name[QSER_APN_NAME_SIZE + 1];        /*!< A string parameter that is a logical name used to select the GGSN
+						  and external packet data network. */ 
+	char username[QSER_APN_USERNAME_SIZE + 1];    /*!< Username used during data network authentication. */
+	char password[QSER_APN_PASSWORD_SIZE + 1];    /*!< Password to be used during data network authentication. */
+    char apn_type[QSER_APN_TYPE_SIZE + 1];
+} qser_apn_add_s;
+
+typedef struct {
+	int cnt;
+	qser_apn_info_s apn[QSER_APN_MAX_LIST];
+} qser_apn_info_list_s;
+
+
+/**
+ * Initialization data call module, and callback function registered.
+ *
+ * @param [in] evt_cb           callback fucntion
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_data_call_init(qser_data_call_evt_cb_t evt_cb);
+
+/**
+ * Destroy data call module, and unregister callback funciton
+ *
+ * @param 
+ *   None
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern void qser_data_call_destroy(void);
+
+/**
+ * Starts a data call. If profile index is zero, it will call CDMA profile.
+ *
+ * @param [in] data_call        The data call parameters
+ * @param [out] error           Error code returned by data call 
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_data_call_start(qser_data_call_s *data_call, qser_data_call_error_e *err);
+
+/**
+ * Starts a data call. If profile index is zero, it will call CDMA profile.
+ *
+ * @param [in] data_call        The data call parameters
+ * @param [out] error           Error code returned by data call 
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_data_call_start_async(qser_data_call_s *data_call, qser_data_call_error_e *err);
+
+/**
+ * Stop a data call.
+ *
+ * @param [in] profile_idx      UMTS/CDMA profile ID
+ * @param [in] ip_family        IP Version
+ * @param [out] error           Error code returned by data call 
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_data_call_stop(char profile_idx, qser_data_call_ip_family_e ip_family, qser_data_call_error_e *err);
+
+/**
+ * Get a data call information.
+ *
+ * @param [in] profile_idx      UMTS/CDMA profile ID
+ * @param [in] ip_family        IP Version
+ * @param [out] info            The Data Call information
+ * @param [out] error           Error code returned by data call 
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_data_call_info_get(char profile_idx,
+				 qser_data_call_ip_family_e ip_family,
+				 qser_data_call_info_s *info,
+				 qser_data_call_error_e *err);
+
+/**
+ * Changes the settings in a configured profile. 
+ *
+ * @param [in] apn      the profile information.
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned, such apn not exist.
+ * 
+ */
+extern int qser_apn_set(qser_apn_info_s *apn);
+
+/**
+ * Retrieves the settings from a configured profile.
+ *
+ * @param [in] profile_idx        UMTS/CDMA profile ID
+ * @param [out] apn               the profile information.
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_apn_get(unsigned char profile_idx, qser_apn_info_s *apn);
+
+/**
+ * Retrieves the settings from a configured profile.
+ *
+ * @param [in] apn               the profile information.
+ * @param [out] profile_idx        UMTS/CDMA profile ID
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_apn_add(qser_apn_add_s *apn, unsigned char *profile_idx);
+
+/**
+ * Delete a configured profile.
+ *
+ * @param [in] profile_idx        UMTS/CDMA profile ID
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_apn_del(unsigned char profile_idx);
+
+/**
+ * Retrieves the settings from a configured profile list.
+ *
+ * @param [out] apn_list          the profile list information.
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_apn_get_list(qser_apn_info_list_s *apn_list);
+#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
new file mode 100755
index 0000000..f99df6c
--- /dev/null
+++ b/mbtk/include/lynq/lynq_qser_network.h
@@ -0,0 +1,474 @@
+/**
+ *@file     QSER_nw.h
+ *@date     2018-02-22
+ *@author
+ *@brief
+ */
+#ifndef __LYNQ_QSER_NETWORK_H__
+#define __LYNQ_QSER_NETWORK_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include "mbtk_type.h"
+
+typedef uint32_t nw_client_handle_type;
+
+
+#define QSER_NW_MODE_NONE     0x00    /**<  No network. */
+#define QSER_NW_MODE_GSM      0x01    /**<  Include GSM networks. */
+#define QSER_NW_MODE_WCDMA    0x02    /**<  Include WCDMA networks. */
+#define QSER_NW_MODE_CDMA     0x04    /**<  Include CDMA networks. */
+#define QSER_NW_MODE_EVDO     0x08    /**<  Include EVDO networks. */
+#define QSER_NW_MODE_LTE      0x10    /**<  Include LTE networks. */
+#define QSER_NW_MODE_TDSCDMA  0x20    /**<  Include TDSCDMA networks. */
+
+typedef enum
+{
+    E_QSER_NW_ROAM_STATE_OFF  = 0,    /**<  None, or roaming indicator off. */
+    E_QSER_NW_ROAM_STATE_ON   = 1     /**<  Roaming indicator on. */
+}E_QSER_NW_ROAM_STATE_TYPE_T;
+
+/** Configures the settings that define the MCM network interface. */
+typedef struct
+{
+    /*  Configuration parameters for MCM network registration Network registration details Technology dependent network registration details */
+    uint64_t                        preferred_nw_mode;  /**<   Preferred network mode for connections; a bitmask of QSER_NW_MODE_xxxx.*/
+    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 */
+
+typedef struct
+{
+    /*    Configuration parameters for MCM network fast network scan when OOS (out of service)*/
+    char                        enable;
+    uint16_t                    time_interval;
+}QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T;
+
+typedef struct
+{
+    /*    Configuration parameters for MCM network full band network scan when OOS (out of service)*/
+    int t_min;
+    int t_step;
+    int t_num;
+    int t_max;
+}QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T;
+
+
+typedef struct
+{
+    char                        type;  /**<   QSER_NW_OOS_CFG_TYPE_xxxx.*/
+    union {
+    QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T  fast_can_info;       // 00
+    QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T full_band_scan_info;     // 01
+  } u;
+}QSER_NW_OOS_CONFIG_INFO_T;
+
+//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_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
+{
+    char long_eons[512 + 1];    /**<   Long EONS.*/
+    char short_eons[512 + 1];   /**<   Short EONS.*/
+    char mcc[10];            /**<   Mobile country code.*/
+    char mnc[10];            /**<   Mobile network code.*/
+}QSER_NW_OPERATOR_NAME_INFO_T;
+
+typedef enum
+{
+    E_QSER_NW_RADIO_TECH_TD_SCDMA = 1,
+    E_QSER_NW_RADIO_TECH_GSM      = 2,    /**<  GSM; only supports voice. */
+    E_QSER_NW_RADIO_TECH_HSPAP    = 3,    /**<  HSPA+. */
+    E_QSER_NW_RADIO_TECH_LTE      = 4,    /**<  LTE. */
+    E_QSER_NW_RADIO_TECH_EHRPD    = 5,    /**<  EHRPD. */
+    E_QSER_NW_RADIO_TECH_EVDO_B   = 6,    /**<  EVDO B. */
+    E_QSER_NW_RADIO_TECH_HSPA     = 7,    /**<  HSPA. */
+    E_QSER_NW_RADIO_TECH_HSUPA    = 8,    /**<  HSUPA. */
+    E_QSER_NW_RADIO_TECH_HSDPA    = 9,    /**<  HSDPA. */
+    E_QSER_NW_RADIO_TECH_EVDO_A   = 10,   /**<  EVDO A. */
+    E_QSER_NW_RADIO_TECH_EVDO_0   = 11,   /**<  EVDO 0. */
+    E_QSER_NW_RADIO_TECH_1xRTT    = 12,   /**<  1xRTT. */
+    E_QSER_NW_RADIO_TECH_IS95B    = 13,   /**<  IS95B. */
+    E_QSER_NW_RADIO_TECH_IS95A    = 14,   /**<  IS95A. */
+    E_QSER_NW_RADIO_TECH_UMTS     = 15,   /**<  UMTS. */
+    E_QSER_NW_RADIO_TECH_EDGE     = 16,   /**<  EDGE. */
+    E_QSER_NW_RADIO_TECH_GPRS     = 17,   /**<  GPRS. */
+    E_QSER_NW_RADIO_TECH_NONE     = 18    /**<  No technology selected. */
+}E_QSER_NW_RADIO_TECH_TYPE_T;
+
+
+typedef enum
+{
+    E_QSER_NW_TECH_DOMAIN_NONE    = 0,    /**<  None. */
+    E_QSER_NW_TECH_DOMAIN_3GPP    = 1,    /**<  3GPP. */
+    E_QSER_NW_TECH_DOMAIN_3GPP2   = 2,    /**<  3GPP2. */
+}E_QSER_NW_TECH_DOMAIN_TYPE_T;
+
+typedef enum
+{
+    E_QSER_NW_IMSI_UNKNOWN_HLR_DENY_REASON                    = 1, /**<  IMSI unknown in HLR. */
+    E_QSER_NW_ILLEGAL_MS_DENY_REASON                          = 2, /**<  Illegal MS. */
+    E_QSER_NW_IMSI_UNKNOWN_VLR_DENY_REASON                    = 3, /**<  IMSI unknown in VLR. */
+    E_QSER_NW_IMEI_NOT_ACCEPTED_DENY_REASON                   = 4, /**<  IMEI not accepted. */
+    E_QSER_NW_ILLEGAL_ME_DENY_REASON                          = 5, /**<  Illegal ME. */
+    E_QSER_NW_PLMN_NOT_ALLOWED_DENY_REASON                    = 6, /**<  PLMN not allowed. */
+    E_QSER_NW_LA_NOT_ALLOWED_DENY_REASON                      = 7, /**<  Location area not allowed. */
+    E_QSER_NW_ROAMING_NOT_ALLOWED_LA_DENY_REASON              = 8, /**<  Roaming not allowed in this location area. */
+    E_QSER_NW_NO_SUITABLE_CELLS_LA_DENY_REASON                = 9, /**<  No suitable cells in location area. */
+    E_QSER_NW_NETWORK_FAILURE_DENY_REASON                     = 10, /**<  Network failure. */
+    E_QSER_NW_MAC_FAILURE_DENY_REASON                         = 11, /**<  MAC failure. */
+    E_QSER_NW_SYNCH_FAILURE_DENY_REASON                       = 12, /**<  Sync failure. */
+    E_QSER_NW_CONGESTION_DENY_REASON                          = 13, /**<  Congestion. */
+    E_QSER_NW_GSM_AUTHENTICATION_UNACCEPTABLE_DENY_REASON     = 14, /**<  GSM authentication unacceptable. */
+    E_QSER_NW_NOT_AUTHORIZED_CSG_DENY_REASON                  = 15, /**<  Not authorized in this CSG. */
+    E_QSER_NW_SERVICE_OPTION_NOT_SUPPORTED_DENY_REASON        = 16, /**<  Service option not supported. */
+    E_QSER_NW_REQ_SERVICE_OPTION_NOT_SUBSCRIBED_DENY_REASON   = 17, /**<  Requested service option not subscribed. */
+    E_QSER_NW_CALL_CANNOT_BE_IDENTIFIED_DENY_REASON           = 18, /**<  Call cannot be identified. */
+    E_QSER_NW_SEMANTICALLY_INCORRECT_MSG_DENY_REASON          = 19, /**<  Semantically incorrect message. */
+    E_QSER_NW_INVALID_MANDATORY_INFO_DENY_REASON              = 20, /**<  Invalid mandatory information. */
+    E_QSER_NW_MSG_TYPE_NON_EXISTENT_DENY_REASON               = 21, /**<  Message type non-existent or not implemented. */
+    E_QSER_NW_INFO_ELEMENT_NON_EXISTENT_DENY_REASON           = 22, /**<  Message type not compatible with the protocol state. */
+    E_QSER_NW_CONDITIONAL_IE_ERR_DENY_REASON                  = 23, /**<  Conditional IE error. */
+    E_QSER_NW_MSG_INCOMPATIBLE_PROTOCOL_STATE_DENY_REASON     = 24, /**<  Message not compatible with the protocol state. */
+    E_QSER_NW_PROTOCOL_ERROR_DENY_REASON                      = 25, /**<  Unspecified protocol error. */
+}E_QSER_NW_DENY_REASON_TYPE_T;
+
+
+typedef enum
+{
+    E_QSER_NW_SERVICE_NONE     = 0x0000,  /**<  Not registered or no data. */
+    E_QSER_NW_SERVICE_LIMITED  = 0x0001,  /**<  Registered; emergency service only. */
+    E_QSER_NW_SERVICE_FULL     = 0x0002,  /**<  Registered, full service. */
+}E_QSER_NW_SERVICE_TYPE_T;
+
+typedef struct
+{
+    E_QSER_NW_TECH_DOMAIN_TYPE_T  tech_domain;        /**<   Technology, used to determine the structure type  tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/
+    E_QSER_NW_RADIO_TECH_TYPE_T   radio_tech;         /**<   Radio technology; see #nw_radio_tech_t_v01.*/
+    E_QSER_NW_ROAM_STATE_TYPE_T   roaming;            /**<   0 -- Off, 1 -- Roaming (3GPP2 has extended values).*/
+    E_QSER_NW_DENY_REASON_TYPE_T  deny_reason;        /**<   Set when registration state is #nw_deny_reason_t_v01.*/
+    E_QSER_NW_SERVICE_TYPE_T      registration_state; /**<   Registration state.*/
+}QSER_NW_COMMON_REG_INFO_T;
+
+
+typedef struct
+{
+    E_QSER_NW_TECH_DOMAIN_TYPE_T  tech_domain;        /**<   Technology, used to determine the structure type  tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/
+    E_QSER_NW_RADIO_TECH_TYPE_T   radio_tech;         /**<   Radio technology; see #nw_radio_tech_t_v01.*/
+    char                            mcc[10];           /**<   Mobile country code.*/
+    char                            mnc[10];           /**<   Mobile network code.*/
+    E_QSER_NW_ROAM_STATE_TYPE_T   roaming;            /**<   0 -- Off, 1 -- Roaming (3GPP2 has extended values).*/
+    uint8_t                         forbidden;          /**<   Forbidden: 0 -- No, 1 -- Yes.*/
+    uint32_t                        cid;                /**<   Cell ID for the registered 3GPP system.*/
+    uint16_t                        lac;                /**<   Locatin area code for the registered 3GPP system.*/
+    uint16_t                        psc;                /**<   Primary scrambling code (WCDMA only); 0 -- None.*/
+    uint16_t                        tac;                /**<   Tracking area code information for LTE.*/
+}QSER_NW_3GPP_REG_INFO_T;
+
+
+typedef struct
+{
+    E_QSER_NW_TECH_DOMAIN_TYPE_T  tech_domain;        /**<   Technology, used to determine structure type  tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/
+    E_QSER_NW_RADIO_TECH_TYPE_T   radio_tech;         /**<   Radio technology; see #nw_radio_tech_t_v01.*/
+    char                            mcc[3+1];           /**<   Mobile country code.*/
+    char                            mnc[3+1];           /**<   Mobile network code.*/
+    E_QSER_NW_ROAM_STATE_TYPE_T   roaming;            /**<   Roaming status; see #nw_roam_state_t_v01.*/
+    uint8_t                         forbidden;          /**<   Forbidden: 0 -- No, 1 -- Yes.*/
+    uint8_t                         inPRL;              /**<   0 -- Not in PRL, 1 -- In PRL.*/
+    uint8_t                         css;                /**<   Concurrent services supported: 0 -- No, 1 -- Yes.*/
+    uint16_t                        sid;                /**<   CDMA system ID.*/
+    uint16_t                        nid;                /**<   CDMA network ID.*/
+    uint16_t                        bsid;               /**<   Base station ID. @newpagetable */
+}QSER_NW_3GPP2_REG_INFO_T;
+
+/** Gets the status associated with the connection of \<id\>. */
+typedef struct
+{
+    uint8_t                         voice_registration_valid;               /**< Must be set to TRUE if voice_registration is being passed. */
+    QSER_NW_COMMON_REG_INFO_T     voice_registration;                     /**<   Voice registration. */
+
+    uint8_t                         data_registration_valid;                /**< Must be set to TRUE if data_registration is being passed. */
+    QSER_NW_COMMON_REG_INFO_T     data_registration;                      /**<   Data registration. */
+
+    uint8_t                         voice_registration_details_3gpp_valid;  /**< Must be set to TRUE if voice_registration_details_3gpp is being passed. */
+    QSER_NW_3GPP_REG_INFO_T       voice_registration_details_3gpp;        /**<   Voice registration details for 3GPP. */
+
+    uint8_t                         data_registration_details_3gpp_valid;   /**< Must be set to TRUE if data_registration_details_3gpp is being passed. */
+    QSER_NW_3GPP_REG_INFO_T       data_registration_details_3gpp;         /**<   Data registration details for 3GPP. */
+
+    uint8_t                         voice_registration_details_3gpp2_valid; /**< Must be set to TRUE if voice_registration_details_3gpp2 is being passed. */
+    QSER_NW_3GPP2_REG_INFO_T      voice_registration_details_3gpp2;       /**<   Voice registration details for 3GPP2. */
+
+    uint8_t                         data_registration_details_3gpp2_valid;  /**< Must be set to TRUE if data_registration_details_3gpp2 is being passed. */
+    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
+{
+    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;
+
+
+typedef struct
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/
+    int16_t     ecio;       /**<   Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
+}QSER_NW_WCDMA_SIGNAL_INFO_T;
+
+typedef struct
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Ec.    a signed value; -125 or lower indicates no signal.*/
+    int8_t      rscp;       /**<   RSCP in dBm.*/
+    int16_t     ecio;       /**<   Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
+    int8_t      sinr;       /**<   Measured SINR in dB. @newpagetable */
+}QSER_NW_TDSCDMA_SIGNAL_INFO_T;
+
+typedef struct
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/
+    int8_t      rsrq;       /**<   RSRQ value in dB (signed integer value), as measured by L1. Range: -3 to -20 (-3 equals -3 dB, -20 equals -20 dB).*/
+    int16_t      rsrp;       /**<   Current RSRP in dBm, as measured by L1. Range: -44 to -140 (-44 equals -44 dBm, -140 equals -140 dBm).*/
+    int16_t      snr;        /**<   SNR level as a scaled integer in units of 0.1 dB; e.g., -16 dB has a value of -160 and 24.6 dB has a value of 246.*/
+}QSER_NW_LTE_SIGNAL_INFO_T;
+
+typedef struct
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.*/
+    int16_t     ecio;       /**<   Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
+}QSER_NW_CDMA_SIGNAL_INFO_T;
+
+typedef struct
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.*/
+    int16_t     ecio;       /**<   Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
+    int8_t      sinr;       /**<   SINR level.*/
+    int32_t     io;         /**<   Received IO in dBm. */
+}QSER_NW_HDR_SIGNAL_INFO_T;
+
+typedef struct
+{
+    int16_t     ssRsrp;   /* SS(Synchronization Signal) reference signal received power, multipled by -1.
+                      * Reference: 3GPP TS 38.215.
+                      * Range [44, 140], INT_MAX means invalid/unreported.*/
+    int16_t     ssRsrq;   /* SS reference signal received quality, multipled by -1.
+                      * Reference: 3GPP TS 38.215.
+                      * Range [3, 20], INT_MAX means invalid/unreported.*/
+    int16_t     ssSinr;   /* SS signal-to-noise and interference ratio.
+                      * Reference: 3GPP TS 38.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.
+                      * Range [-23, 40], INT_MAX means invalid/unreported.*/
+    int16_t     csiRsrp;  /* CSI reference signal received power, multipled by -1.
+                      * Reference: 3GPP TS 38.215.
+                      * Range [44, 140], INT_MAX means invalid/unreported.*/
+    int16_t     csiRsrq;  /* CSI reference signal received quality, multipled by -1.
+                      * Reference: 3GPP TS 38.215.
+                      * Range [3, 20], INT_MAX means invalid/unreported.*/
+    int16_t     csiSinr;  /* CSI signal-to-noise and interference ratio.
+                      * Reference: 3GPP TS 138.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.
+                      * Range [-23, 40], INT_MAX means invalid/unreported.*/
+}QSER_NW_NR_SIGNAL_INFO_T;
+
+
+/** Gets signal strength information. */
+typedef struct
+{
+    uint8_t                         gsm_sig_info_valid;         /**< Must be set to TRUE if gsm_sig_info is being passed. */
+    QSER_NW_GSM_SIGNAL_INFO_T     gsm_sig_info;               /**<   GSM signal information. */
+    uint8_t                         wcdma_sig_info_valid;       /**< Must be set to TRUE if wcdma_sig_info is being passed. */
+    QSER_NW_WCDMA_SIGNAL_INFO_T   wcdma_sig_info;             /**<   WCDMA signal information. */
+    uint8_t                         tdscdma_sig_info_valid;     /**< Must be set to TRUE if tdscdma_sig_info is being passed. */
+    QSER_NW_TDSCDMA_SIGNAL_INFO_T tdscdma_sig_info;           /**<   TDSCDMA signal information. */
+    uint8_t                         lte_sig_info_valid;         /**< Must be set to TRUE if lte_sig_info is being passed. */
+    QSER_NW_LTE_SIGNAL_INFO_T     lte_sig_info;               /**<   LTE signal information. */
+    uint8_t                         cdma_sig_info_valid;        /**< Must be set to TRUE if cdma_sig_info is being passed. */
+    QSER_NW_CDMA_SIGNAL_INFO_T    cdma_sig_info;              /**<   CDMA signal information. */
+    uint8_t                         hdr_sig_info_valid;         /**< Must be set to TRUE if hdr_sig_info is being passed. */
+    QSER_NW_HDR_SIGNAL_INFO_T     hdr_sig_info;               /**<   HDR signal information. */
+    uint8_t                         nr_sig_info_valid;
+    QSER_NW_NR_SIGNAL_INFO_T      nr_sig_info;
+}QSER_NW_SIGNAL_STRENGTH_INFO_T;
+
+
+
+
+
+/* @bridef Callback function registered to QSER_NW_AddRxMsgHandler
+ * map of ind_flag and ind_msg_buf as bellow :
+ *  NW_IND_VOICE_REG_EVENT_IND_FLAG : QSER_NW_VOICE_REG_EVENT_IND_T
+ *  NW_IND_DATA_REG_EVENT_IND_FLAG : QSER_NW_DATA_REG_EVENT_IND_T
+ *  NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG : QSER_NW_SINGNAL_EVENT_IND_T
+ *  NW_IND_CELL_ACCESS_STATE_CHG_EVENT_IND_FLAG : QSER_NW_CELL_ACCESS_STATE_EVENT_IND_T
+ *  NW_IND_NITZ_TIME_UPDATE_EVENT_IND_FLAG : QSER_NW_NITZ_TIME_EVENT_IND_T
+ * */
+typedef void (*QSER_NW_RxMsgHandlerFunc_t)(
+    nw_client_handle_type h_nw,
+    uint32_t ind_flag,
+    void                  *ind_msg_buf,
+    uint32_t              ind_msg_len,
+    void                  *contextPtr
+);
+
+
+/** Indication message; Indication for the corresponding registered event flag NW_IND_VOICE_REG_EVENT_IND_FLAG */
+typedef struct {
+
+  uint8_t                         registration_valid;               /**< Must be set to TRUE if voice_registration is being passed. */
+  QSER_NW_COMMON_REG_INFO_T     registration;                     /**< Voice registration. */
+
+  uint8_t                         registration_details_3gpp_valid;  /**< Must be set to TRUE if voice_registration_details_3gpp is being passed. */
+  QSER_NW_3GPP_REG_INFO_T       registration_details_3gpp;        /**< Voice registration details for 3GPP. */
+
+  uint8_t                         registration_details_3gpp2_valid; /**< Must be set to TRUE if voice_registration_details_3gpp2 is being passed. */
+  QSER_NW_3GPP2_REG_INFO_T      registration_details_3gpp2;       /**< Voice registration details for 3GPP2. */
+}QSER_NW_VOICE_REG_EVENT_IND_T;
+
+/** Indication message; Indication for the corresponding registered event flag NW_IND_DATA_REG_EVENT_IND_FLAG */
+typedef struct {
+
+  uint8_t                         registration_valid;               /**< Must be set to TRUE if data_registration is being passed. */
+  QSER_NW_COMMON_REG_INFO_T     registration;                     /**< Data registration. */
+
+  uint8_t                         registration_details_3gpp_valid;  /**< Must be set to TRUE if data_registration_details_3gpp is being passed. */
+  QSER_NW_3GPP_REG_INFO_T       registration_details_3gpp;        /**< Data registration details for 3GPP. */
+
+  uint8_t                         registration_details_3gpp2_valid; /**< Must be set to TRUE if data_registration_details_3gpp2 is being passed. */
+  QSER_NW_3GPP2_REG_INFO_T      registration_details_3gpp2;       /**< Data registration details for 3GPP2. */
+}QSER_NW_DATA_REG_EVENT_IND_T;
+
+
+/** Indication message; Indication for the corresponding registered event flag NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG */
+typedef struct {
+    uint8_t gsm_sig_info_valid;                       /**< Must be set to TRUE if gsm_sig_info is being passed. */
+    QSER_NW_GSM_SIGNAL_INFO_T       gsm_sig_info;   /**< GSM singal information. */
+
+    uint8_t wcdma_sig_info_valid;                     /**< Must be set to TRUE if wcdma_sig_info is being passed. */
+    QSER_NW_WCDMA_SIGNAL_INFO_T wcdma_sig_info;     /**< WCDMA singal information. */
+
+    uint8_t tdscdma_sig_info_valid;                   /**< Must be set to TRUE if tdscdma_sig_info is being passed. */
+    QSER_NW_TDSCDMA_SIGNAL_INFO_T tdscdma_sig_info; /**< TDSCDMA singal information. */
+
+    uint8_t lte_sig_info_valid;                       /**< Must be set to TRUE if lte_sig_info is being passed. */
+    QSER_NW_LTE_SIGNAL_INFO_T lte_sig_info;         /**< LTE singal information. */
+
+    uint8_t cdma_sig_info_valid;                      /**< Must be set to TRUE if cdma_sig_info is being passed. */
+    QSER_NW_CDMA_SIGNAL_INFO_T cdma_sig_info;       /**< CDMA singal information. */
+
+    uint8_t hdr_sig_info_valid;                       /**< Must be set to TRUE if hdr_sig_info is being passed. */
+    QSER_NW_HDR_SIGNAL_INFO_T hdr_sig_info;         /**< HDR singal information. */
+
+    uint8_t                         nr_sig_info_valid;
+    QSER_NW_NR_SIGNAL_INFO_T      nr_sig_info;
+}QSER_NW_SINGNAL_EVENT_IND_T;
+
+typedef enum
+{
+    E_QSER_NW_RF_MODE_CFUN_0 = 0,    /**<  CFUN 0. */
+    E_QSER_NW_RF_MODE_CFUN_1 = 1,    /**<  CFUN 1. */
+    E_QSER_NW_RF_MODE_FLIGHT = 4,    /**<  Flight Mode, CFUN 4. */
+}E_QSER_NW_RF_MODE_TYPE_T;
+
+int qser_nw_client_init(nw_client_handle_type  *ph_nw);
+
+int qser_nw_client_deinit(nw_client_handle_type  h_nw);
+
+int qser_nw_set_config
+(
+    nw_client_handle_type       h_nw,
+    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
+);
+
+int qser_nw_get_oos_config
+(
+    nw_client_handle_type       h_nw,
+    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,
+    QSER_NW_OPERATOR_NAME_INFO_T  *pt_info //You should malloc this or may cause stack overflow
+);
+
+int qser_nw_get_reg_status
+(
+    nw_client_handle_type               h_nw,
+    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
+(
+    nw_client_handle_type               h_nw,
+    QSER_NW_SIGNAL_STRENGTH_INFO_T    *pt_info
+);
+
+int qser_nw_add_rx_msg_handler
+(
+    nw_client_handle_type        h_nw,
+    QSER_NW_RxMsgHandlerFunc_t handlerPtr,
+    void* contextPtr
+);
+
+int qser_nw_set_rf_mode
+(
+    nw_client_handle_type       h_nw,
+    E_QSER_NW_RF_MODE_TYPE_T    rf_mode
+);
+
+int qser_nw_get_rf_mode
+(
+    nw_client_handle_type       h_nw,
+    E_QSER_NW_RF_MODE_TYPE_T    *rf_mode
+);
+
+#ifdef __cplusplus
+}
+#endif
+#endif//__QSER_NW_H__
diff --git a/mbtk/include/lynq/lynq_qser_sim.h b/mbtk/include/lynq/lynq_qser_sim.h
new file mode 100755
index 0000000..f49e611
--- /dev/null
+++ b/mbtk/include/lynq/lynq_qser_sim.h
@@ -0,0 +1,473 @@
+#ifndef __LYNQ_QSER_SIM__
+#define __LYNQ_QSER_SIM__
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <stdint.h>
+#include "mbtk_type.h"
+
+#define QSER_SIM_IMSI_LEN_MAX     16  /**  Maximum length of IMSI data. */
+#define QSER_SIM_ICCID_LEN_MAX    20  /**  Maximum length of ICCID data. */
+
+typedef enum
+{
+    E_QSER_SUCCESS                        = 0,    /**<  Success. */
+    E_QSER_ERROR_BADPARM                  = 4,    /**<  Bad parameter. */
+}E_QSER_ERROR_CODE_T;
+
+typedef uint32_t sim_client_handle_type;
+
+typedef enum
+{
+    QSER_SIM_SLOT_ID_1          = 0xB01,    /**< Identify card in slot 1.  */
+    QSER_SIM_SLOT_ID_2          = 0xB02,    /**< Identify card in slot 2.  */
+}QSER_SIM_SLOT_ID_TYPE_T;
+
+typedef enum
+{
+    QSER_SIM_APP_TYPE_UNKNOWN   = 0xB00,    /**<  Unknown application type  */
+    QSER_SIM_APP_TYPE_3GPP      = 0xB01,    /**< Identify the SIM/USIM application on the card.  */
+    QSER_SIM_APP_TYPE_3GPP2     = 0xB02,    /**< Identify the RUIM/CSIM application on the card.  */
+    QSER_SIM_APP_TYPE_ISIM      = 0xB03,    /**< Identify the ISIM application on the card.  */
+}QSER_SIM_APP_TYPE_T;
+
+typedef struct
+{
+    QSER_SIM_SLOT_ID_TYPE_T     e_slot_id;  /**< Indicates the slot to be used. */
+    QSER_SIM_APP_TYPE_T         e_app;      /**< Indicates the type of the application. */
+}QSER_SIM_APP_ID_INFO_T;  /* Type */
+
+#define QSER_SIM_PIN_LEN_MAX  8 + 1   /**  Maximum length of PIN data. */
+
+typedef enum
+{
+    QSER_SIM_PIN_ID_1 = 0xB01,  /**< Level 1 user verification.  */
+    QSER_SIM_PIN_ID_2 = 0xB02,  /**< Level 2 user verification.  */
+}QSER_SIM_PIN_ID_TYPE_T;
+
+typedef struct
+{
+    QSER_SIM_APP_ID_INFO_T        app_info;                           /**< Application identification information. */
+    QSER_SIM_PIN_ID_TYPE_T  pin_id;                             /**< PIN ID. */
+    uint32_t                    pin_value_len;                      /**< Must be set to the number of elements in pin_value. */
+    char                        pin_value[QSER_SIM_PIN_LEN_MAX];  /*  Value of the PIN */
+}QSER_SIM_VERIFY_PIN_INFO_T;
+
+/** Changes the PIN value of an application. The application must pass both the
+    new and the old values of the PIN to complete the operation.
+    The same PIN can be used by multiple sessions (i.e., the PIN is shared
+    between GSM and RUIM in an ICC card). The PIN is automatically verified
+    for all the sessions when the command is executed. */
+typedef struct
+{
+    QSER_SIM_APP_ID_INFO_T        app_info;                               /**< Application identification information. */
+    QSER_SIM_PIN_ID_TYPE_T  pin_id;                                 /**< PIN ID. */
+    uint32_t                    old_pin_value_len;                      /**< Must be set to the number of elements in old_pin_value. */
+    char                        old_pin_value[QSER_SIM_PIN_LEN_MAX];  /**< Value of the old PIN as a sequence of ASCII characters. */
+    uint32_t                    new_pin_value_len;                      /**< Must be set to the number of elements in new_pin_value. */
+    char                        new_pin_value[QSER_SIM_PIN_LEN_MAX];  /**< Value of the new PIN as a sequence of ASCII characters. */
+}QSER_SIM_CHANGE_PIN_INFO_T;
+
+/** Unblocks a blocked PIN using the PUK code. The client must pass PUK1 to unblock PIN1 or PUK2 to unblock PIN2.
+    The same PIN can be used by multiple sessions (i.e., the PIN is shared between GSM and RUIM in an ICC card).
+    The PIN is automatically verified for all the sessions when the command is executed. */
+typedef struct
+{
+    QSER_SIM_APP_ID_INFO_T        app_info;                               /**< Application identification information. */
+    QSER_SIM_PIN_ID_TYPE_T  pin_id;                                 /**< PIN ID. */
+    uint32_t                    puk_value_len;                          /**< Must be set to the number of elements in puk_value. */
+    char                        puk_value[QSER_SIM_PIN_LEN_MAX];      /**< Value of the PUK as a sequence of ASCII characters. */
+    uint32_t                    new_pin_value_len;                      /**< Must be set to the number of elements in new_pin_value. */
+    char                        new_pin_value[QSER_SIM_PIN_LEN_MAX];  /**< Value of the new PIN as a sequence of ASCII characters. */
+}QSER_SIM_UNBLOCK_PIN_INFO_T;
+
+/** Enables the PIN on an application. */
+typedef  QSER_SIM_VERIFY_PIN_INFO_T QSER_SIM_ENABLE_PIN_INFO_T; //Same
+
+/** Disables the PIN of an application, */
+typedef  QSER_SIM_VERIFY_PIN_INFO_T QSER_SIM_DISABLE_PIN_INFO_T; //Same
+
+
+typedef enum
+{
+    QSER_SIM_PERSO_FEATURE_TYPE_UNKNOWN                 = 0xB00, /**<  Unknown personalization feature.  */
+    QSER_SIM_PERSO_FEATURE_TYPE_3GPP_NETWORK            = 0xB01, /**<  Featurization based on 3GPP MCC and MNC.  */
+    QSER_SIM_PERSO_FEATURE_TYPE_3GPP_NETWORK_SUBSET     = 0xB02, /**<  Featurization based on 3GPP MCC, MNC, and IMSI digits 6 and 7.  */
+    QSER_SIM_PERSO_FEATURE_TYPE_3GPP_SERVICE_PROVIDER   = 0xB03, /**<  Featurization based on 3GPP MCC, MNC, and GID1.  */
+    QSER_SIM_PERSO_FEATURE_TYPE_3GPP_CORPORATE          = 0xB04, /**<  Featurization based on 3GPP MCC, MNC, GID1, and GID2.  */
+    QSER_SIM_PERSO_FEATURE_TYPE_3GPP_SIM                = 0xB05, /**<  Featurization based on the 3GPP IMSI.  */
+    QSER_SIM_PERSO_FEATURE_TYPE_3GPP2_NETWORK_TYPE_1    = 0xB06, /**<  Featurization based on 3GPP2 MCC and MNC.  */
+    QSER_SIM_PERSO_FEATURE_TYPE_3GPP2_NETWORK_TYPE_2    = 0xB07, /**<  Featurization based on 3GPP2 IRM code.  */
+    QSER_SIM_PERSO_FEATURE_TYPE_3GPP2_RUIM              = 0xB08, /**<  Featurization based on 3GPP2 IMSI_M.  */
+}QSER_SIM_PERSO_FEATURE_TYPE_T;
+
+typedef enum
+{
+    QSER_SIM_CARD_STATE_UNKNOWN                     = 0xB01,    /**< Card state unknown. */
+    QSER_SIM_CARD_STATE_ABSENT                      = 0xB02,    /**< Card is absent. */
+    QSER_SIM_CARD_STATE_PRESENT                     = 0xB03,    /**< Card is present. */
+    QSER_SIM_CARD_STATE_ERROR_UNKNOWN               = 0xB04,    /**< Unknown error state. */
+    QSER_SIM_CARD_STATE_ERROR_POWER_DOWN            = 0xB05,    /**< Power down. */
+    QSER_SIM_CARD_STATE_ERROR_POLL_ERROR            = 0xB06,    /**< Poll error. */
+    QSER_SIM_CARD_STATE_ERROR_NO_ATR_RECEIVED       = 0xB07,    /**<  Failed to receive an answer to reset.  */
+    QSER_SIM_CARD_STATE_ERROR_VOLT_MISMATCH         = 0xB08,    /**< Voltage mismatch. */
+    QSER_SIM_CARD_STATE_ERROR_PARITY_ERROR          = 0xB09,    /**< Parity error. */
+    QSER_SIM_CARD_STATE_ERROR_SIM_TECHNICAL_PROBLEMS= 0xB0A,    /**< Card returned technical problems. */
+}QSER_SIM_CARD_STATE_TYPE_T;  /**< Card state. */
+
+typedef enum
+{
+    QSER_SIM_CARD_TYPE_UNKNOWN  = 0xB00,    /**<  Unidentified card type.  */
+    QSER_SIM_CARD_TYPE_ICC      = 0xB01,    /**<  Card of SIM or RUIM type.  */
+    QSER_SIM_CARD_TYPE_UICC     = 0xB02,    /**<  Card of USIM or CSIM type.  */
+}QSER_SIM_CARD_TYPE_T;
+
+typedef enum
+{
+    QSER_SIM_PROV_STATE_NONE    = 0xB00,    /**<  Nonprovisioning.  */
+    QSER_SIM_PROV_STATE_PRI     = 0xB01,    /**<  Primary provisioning subscription.  */
+    QSER_SIM_PROV_STATE_SEC     = 0xB02,    /**<  Secondary provisioning subscription.  */
+}QSER_SIM_SUBSCRIPTION_TYPE_T;
+
+typedef enum
+{
+    QSER_SIM_APP_STATE_UNKNOWN                  = 0xB00,    /**< Application state unknown. */
+    QSER_SIM_APP_STATE_DETECTED                 = 0xB01,    /**<  Detected state.  */
+    QSER_SIM_APP_STATE_PIN1_REQ                 = 0xB02,    /**<  PIN1 required.  */
+    QSER_SIM_APP_STATE_PUK1_REQ                 = 0xB03,    /**<  PUK1 required.  */
+    QSER_SIM_APP_STATE_INITALIZATING            = 0xB04,    /**<  Initializing.  */
+    QSER_SIM_APP_STATE_PERSO_CK_REQ             = 0xB05,    /**<  Personalization control key required.  */
+    QSER_SIM_APP_STATE_PERSO_PUK_REQ            = 0xB06,    /**<  Personalization unblock key required.  */
+    QSER_SIM_APP_STATE_PERSO_PERMANENTLY_BLOCKED= 0xB07,    /**<  Personalization is permanently blocked.  */
+    QSER_SIM_APP_STATE_PIN1_PERM_BLOCKED        = 0xB08,    /**<  PIN1 is permanently blocked.  */
+    QSER_SIM_APP_STATE_ILLEGAL                  = 0xB09,    /**<  Illegal application state.  */
+    QSER_SIM_APP_STATE_READY                    = 0xB0A,    /**<  Application ready state.  @newpage */
+}QSER_SIM_APP_STATE_TYPE_T;
+
+typedef enum
+{
+    QSER_SIM_PIN_STATE_UNKNOWN                  = 0xB01,    /**< Unknown PIN state. */
+    QSER_SIM_PIN_STATE_ENABLED_NOT_VERIFIED     = 0xB02,    /**<  PIN required, but has not been verified.  */
+    QSER_SIM_PIN_STATE_ENABLED_VERIFIED         = 0xB03,    /**<  PIN required and has been verified.  */
+    QSER_SIM_PIN_STATE_DISABLED                 = 0xB04,    /**<  PIN not required.  */
+    QSER_SIM_PIN_STATE_BLOCKED                  = 0xB05,    /**<  PIN verification has failed too many times and is blocked. Recoverable through PUK verification.  */
+    QSER_SIM_PIN_STATE_PERMANENTLY_BLOCKED      = 0xB06,    /**<  PUK verification has failed too many times and is not recoverable.  */
+}QSER_SIM_PIN_STATE_TYPE_T;
+
+typedef struct
+{
+    QSER_SIM_SUBSCRIPTION_TYPE_T      subscription;           /**<   Type of subscription (i.e., primary, secondary, etc.). */
+    QSER_SIM_APP_STATE_TYPE_T         app_state;              /**<   Current state of the application. */
+    QSER_SIM_PERSO_FEATURE_TYPE_T   perso_feature;          /**<   Current personalization state and feature enabled. */
+    uint8_t                             perso_retries;          /**<   Number of personalization retries. */
+    uint8_t                             perso_unblock_retries;  /**<   Number of personalization unblock retries. */
+    QSER_SIM_PIN_STATE_TYPE_T         pin1_state;             /**<   Current PIN 1 state. */
+    uint8_t                             pin1_num_retries;       /**<   Number of PIN 1 retries. */
+    uint8_t                             puk1_num_retries;       /**<   Number of PUK 1 retries. */
+    QSER_SIM_PIN_STATE_TYPE_T         pin2_state;             /**<   Current PIN 2 state. */
+    uint8_t                             pin2_num_retries;       /**<   Number of PIN 2 retries. */
+    uint8_t                             puk2_num_retries;       /**<   Number of PUK 2 retries. */
+}QSER_SIM_CARD_APP_INFO_T;
+
+typedef struct
+{
+    QSER_SIM_CARD_APP_INFO_T          app_3gpp;               /**<   Stores 3GPP application information. */
+    QSER_SIM_CARD_APP_INFO_T          app_3gpp2;              /**<   Stores 3GPP2 application information. */
+    QSER_SIM_CARD_APP_INFO_T          app_isim;               /**<   Stores ISIM application information. */
+}QSER_SIM_CARD_ALL_APP_INFO_T;
+
+typedef struct
+{
+    QSER_SIM_CARD_STATE_TYPE_T      e_card_state;/**<   Current card and card error state. */
+    QSER_SIM_CARD_TYPE_T            e_card_type; /**<   Card type. */
+    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);
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_getimsi
+
+===========================================================================*/
+/*
+    @brief
+    Function sends a command to the modem to retrieve the IMSI (for 3GPP)
+    or IMSI_M (for 3GPP2) from the SIM in ASCII form
+
+    @return
+    void
+*/
+/*=========================================================================*/
+int qser_sim_getimsi(
+    sim_client_handle_type          h_sim,
+    QSER_SIM_APP_ID_INFO_T            *pt_info,   ///< [IN] The SIM identifier info.
+    char                            *imsi,      ///< [OUT] IMSI buffer
+    size_t                          imsiLen     ///< [IN] IMSI buffer length
+);
+
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_geticcid
+
+===========================================================================*/
+/*
+    @brief
+    Function sends a command to the modem to retrieve the ICCID from
+    SIM in ASCII form
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_sim_geticcid
+(
+    sim_client_handle_type          h_sim,
+    QSER_SIM_SLOT_ID_TYPE_T     simId,     ///< [IN] The SIM identifier.
+    char                            *iccid,    ///< [OUT] ICCID
+    size_t                          iccidLen   ///< [IN] ICCID buffer length
+);
+
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_getphonenumber
+
+===========================================================================*/
+/*
+    @brief
+    Function sends a command to the modem to retrieve the device phone
+    number from MSISDN (for 3GPP) or MDN (for 3GPP2) from the SIM in
+    ASCII form
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_sim_getphonenumber
+(
+    sim_client_handle_type          h_sim,
+    QSER_SIM_APP_ID_INFO_T            *pt_info,   ///< [IN] The SIM identifier.
+    char                            *phone_num, ///< [OUT] phone number
+    size_t                          phoneLen    ///< [IN] phone number buffer length
+);
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_verifypin
+
+===========================================================================*/
+/*
+    @brief
+    Function sends a command to the modem to verify either PIN1 or PIN2
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_sim_verifypin
+(
+    sim_client_handle_type      h_sim,
+    QSER_SIM_VERIFY_PIN_INFO_T    *pt_info   ///< [IN] Verify PIN infor
+);
+
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_changepin
+
+===========================================================================*/
+/*
+    @brief
+    Function sends a command to the modem to change the value of
+    either PIN1 or PIN2
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_sim_changepin
+(
+    sim_client_handle_type      h_sim,
+    QSER_SIM_CHANGE_PIN_INFO_T    *pt_info   ///< [IN] Change PIN infor
+);
+
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_unblockpin
+
+===========================================================================*/
+/*
+    @brief
+    Function sends a command to the modem to unblock a PIN1 or PIN2 that
+    has been blocked
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_sim_unblockpin
+(
+    sim_client_handle_type      h_sim,
+    QSER_SIM_UNBLOCK_PIN_INFO_T   *pt_info   ///< [IN] Unblock PIN infor
+);
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_enablepin
+
+===========================================================================*/
+/*
+    @brief
+    Function sends a command to the modem to enable PIN1 or PIN2
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_sim_enablepin
+(
+    sim_client_handle_type      h_sim,
+    QSER_SIM_ENABLE_PIN_INFO_T    *pt_info   ///< [IN] Enable PIN infor
+);
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_disablepin
+
+===========================================================================*/
+/*
+    @brief
+    Function sends a command to the modem to disable PIN1 or PIN2
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_sim_disablepin
+(
+    sim_client_handle_type      h_sim,
+    QSER_SIM_DISABLE_PIN_INFO_T   *pt_info   ///< [IN] Disable PIN infor
+);
+
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_getcardstatus
+
+===========================================================================*/
+/*
+    @brief
+    Function retrieves the server cached card status informations and
+    sends the information to the client
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_sim_getcardstatus
+(
+    sim_client_handle_type          h_sim,
+    QSER_SIM_SLOT_ID_TYPE_T     simId,     ///< [IN] The SIM identifier.
+    QSER_SIM_CARD_STATUS_INFO_T   *pt_info   ///< [OUT] Cart status infor output
+);
+
+/*===========================================================================
+
+  FUNCTION:  qser_sim_getimei
+
+===========================================================================*/
+/*
+    @brief
+    get imei
+
+    @return
+    int
+*/
+/*=========================================================================*/
+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);
+
+
+/*===========================================================================
+
+  FUNCTION:  qser_get_imei_and_sv
+
+===========================================================================*/
+/*
+    @brief
+    get imei and sv
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_get_imei_and_sv
+(
+    sim_client_handle_type h_sim,
+    char *imei, char*sv
+);
+
+/*===========================================================================
+
+  FUNCTION:  qser_reset_modem
+
+===========================================================================*/
+/*
+    @brief
+    reboot modem
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_reset_modem(sim_client_handle_type h_sim);
+
+
+/*===========================================================================
+
+  FUNCTION:  qser_reset_modem
+
+===========================================================================*/
+/*
+    @brief
+    reboot modem
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_get_version(sim_client_handle_type h_sim, char *buf);
+
+
+/*===========================================================================
+
+  FUNCTION:  qser_reset_modem
+
+===========================================================================*/
+/*
+    @brief
+    reboot modem
+
+    @return
+    int
+*/
+/*=========================================================================*/
+int qser_reset_sim(sim_client_handle_type h_sim);
+
+int qser_sim_addrxmsghandler(QSER_SIM_RxMsgHandlerFunc_t handlerPtr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
diff --git a/mbtk/include/lynq/lynq_qser_sms.h b/mbtk/include/lynq/lynq_qser_sms.h
new file mode 100755
index 0000000..7276fca
--- /dev/null
+++ b/mbtk/include/lynq/lynq_qser_sms.h
@@ -0,0 +1,241 @@
+#ifndef LYNQ_QSER_SMS_H
+#define LYNQ_QSER_SMS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/types.h>
+#include <stdint.h>
+
+#define MIN_MSM_PARAM_NUM 4
+#define MIN_IMS_MSM_PARAM_NUM 6
+#define MIN_WRITMSM_PARAM_NUM 5
+#define MSG_MAX_LEN 1024
+#define TELEPHONNUM_LEN 64
+#define STORAGSMS_MAX_SIZE 128
+#define SMSC_MAX_LEN 22
+#define SMS_NUM_MAX 255
+
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef uint32_t sms_client_handle_type;
+
+/**  Maximum length of an SMS. */
+#define QSER_SMS_MAX_MT_MSG_LENGTH    1440
+
+/**  Maximum string length. */
+#define QSER_SMS_MAX_ADDR_LENGTH      252
+
+/**  Maximum string length. */
+#define QSER_SMS_MAX_SCA_TYPLENGTH 3
+
+typedef enum   
+{    
+    QSER_SMS_7BIT        = 0,
+    QSER_SMS_8BIT     = 1,
+    QSER_SMS_UCS2            = 2,
+    //<2017/12/28-QCM9XOL00004C001-P01-Vicent.Gao, <[SMS] Segment 1==> CharSet to Alpha implementation.>
+    //QSER_SMS_IRA             = 3,//just for inside test 
+    //>2017/12/28-QCM9XOL00004C001-P01-Vicent.Gao
+
+}QSER_SMS_T;   
+
+typedef enum   
+{    
+    QSER_SMS_MO               = 0,    ///< SMS mobile terminated message.  
+    QSER_SMS_MT               = 1,    ///< SMS mobile originated message. 
+    QSER_SMS_BROADCAST_MT      = 2     ///< SMS Cell Broadcast message.   
+}QSER_SMS_TYPT; 
+
+typedef enum 
+{
+    QSER_SMS_STORAGTYPNONE      = -1,   /**<  Message no need to store. */
+    QSER_SMS_STORAGTYPUIM       = 0,    /**<  Message store to UIM. */
+    QSER_SMS_STORAGTYPNV        = 1,    /**<  Message store to NV. */
+    QSER_SMS_STORAGTYPDB     = 2,    /**<  Message store to NV. */
+}QSER_SMS_STORAGTYPT;
+
+typedef enum 
+{
+    QSER_SMS_MESSAGMODUNKNOWN   = -1,   /**<  Message type CDMA */
+    QSER_SMS_MESSAGMODCDMA      = 0,    /**<  Message type CDMA */
+    QSER_SMS_MESSAGMODGW        = 1,    /**<  Message type GW. */
+}QSER_SMS_MODTYPT;
+
+typedef struct 
+ {
+    uint8_t total_segments;     /**<     The number of long  short message*/
+    uint8_t seg_number;         /**<     Current number.*/
+	uint8_t referencnumber;   /**< referencnumber.*/
+}QSER_sms_user_data_head_t; 
+
+typedef struct
+{
+    /* If sms is stored, it won't parse, you need read it by yourself */
+    QSER_SMS_STORAGTYPT storage;                          ///specify where stored this msg
+    
+    QSER_SMS_T       format;
+    QSER_SMS_TYPT         type;
+    char                    src_addr[QSER_SMS_MAX_ADDR_LENGTH]; ///Telephone number string.  
+    int                     sms_data_len;
+    char                    sms_data[QSER_SMS_MAX_MT_MSG_LENGTH];   ///SMS content, data format depends on format
+    char                    timestamp[21];                      ///Message time stamp (in text mode). string format: "yy/MM/dd,hh:mm:ss+/-TimeZone" 
+    uint8_t                 user_data_head_valid;               //indicate whether long sms. TRUE-long sms; FALSE-short message;
+    QSER_sms_user_data_head_t  user_data_head;                    //long sms user data head info.
+    QSER_SMS_MODTYPT    mode;                             ///specify where stored this msg cdma or gw area
+    uint32_t                storage_index;                      ///storage index, -1 means not store
+} QSER_sms_info_t;
+     
+typedef struct
+{
+    QSER_SMS_STORAGTYPT storage;
+    QSER_SMS_MODTYPT    mode;
+    uint32_t                storage_idx;
+} QSER_sms_storage_info_t;
+
+typedef enum 
+{
+    QSER_SMS_UNKNOWN            = -1, 
+    QSER_SMS_DISCARD            = 0x00, /*  Incoming messages for this route are discarded by the WMS service without 
+                                            notifying QMI_WMS clients */
+    QSER_SMS_STORAND_NOTIFY   = 0x01, /*  Incoming messages for this route are stored to the specified device 
+                                            memory, and new message notifications */
+    QSER_SMS_TRANSFER_ONLY      = 0x02, /*  Incoming messages for this route are transferred to the client, and the
+                                            client is expected to send ACK to the network */
+    QSER_SMS_TRANSFER_AND_ACK   = 0x03, /*  Incoming messages for this route are transferred to the client, and ACK is
+                                            sent to the network */
+}QSER_SMS_RECEPTION_ACTION_TYPT;
+
+#define QSER_WMS_MESSAGLENGTH_MAX 255
+
+typedef enum 
+ {
+    QSER_WMS_MESSAGCDMA            = 0x00,     //- 0x00 -- MESSAGCDMA -- CDMA \n 
+    QSER_WMS_MESSAGGW_PP           = 0x06,     //- 0x06 -- MESSAGGW_PP -- GW_PP
+}QSER_WMS_MESSAGTYPE;
+
+
+typedef struct
+ {
+  QSER_WMS_MESSAGTYPE format;
+  uint32_t raw_messaglen;                             /**< Must be set to # of elements in raw_message */
+  uint8_t raw_message[QSER_WMS_MESSAGLENGTH_MAX];       /**< Raw message data*/
+}QSER_wms_send_raw_message_data_t; 
+
+typedef enum
+{
+  QSER_WMS_TL_CAUSCODADDR_VACANT                        = 0x00, 
+  QSER_WMS_TL_CAUSCODADDR_TRANSLATION_FAILURE           = 0x01, 
+  QSER_WMS_TL_CAUSCODNETWORK_RESOURCSHORTAGE          = 0x02, 
+  QSER_WMS_TL_CAUSCODNETWORK_FAILURE                    = 0x03, 
+  QSER_WMS_TL_CAUSCODINVALID_TELESERVICID             = 0x04, 
+  QSER_WMS_TL_CAUSCODNETWORK_OTHER                      = 0x05, 
+  QSER_WMS_TL_CAUSCODNO_PAGRESPONSE                   = 0x20, 
+  QSER_WMS_TL_CAUSCODDEST_BUSY                          = 0x21, 
+  QSER_WMS_TL_CAUSCODNO_ACK                             = 0x22, 
+  QSER_WMS_TL_CAUSCODDEST_RESOURCSHORTAGE             = 0x23, 
+  QSER_WMS_TL_CAUSCODSMS_DELIVERY_POSTPONED             = 0x24, 
+  QSER_WMS_TL_CAUSCODDEST_OUT_OF_SERV                   = 0x25, 
+  QSER_WMS_TL_CAUSCODDEST_NOT_AT_ADDR                   = 0x26, 
+  QSER_WMS_TL_CAUSCODDEST_OTHER                         = 0x27, 
+  QSER_WMS_TL_CAUSCODRADIO_IF_RESOURCSHORTAGE         = 0x40, 
+  QSER_WMS_TL_CAUSCODRADIO_IF_INCOMPATABILITY           = 0x41, 
+  QSER_WMS_TL_CAUSCODRADIO_IF_OTHER                     = 0x42, 
+  QSER_WMS_TL_CAUSCODENCODING                           = 0x60, 
+  QSER_WMS_TL_CAUSCODSMS_ORIG_DENIED                    = 0x61, 
+  QSER_WMS_TL_CAUSCODSMS_TERM_DENIED                    = 0x62, 
+  QSER_WMS_TL_CAUSCODSUPP_SERV_NOT_SUPP                 = 0x63, 
+  QSER_WMS_TL_CAUSCODSMS_NOT_SUPP                       = 0x64, 
+  QSER_WMS_TL_CAUSCODMISSING_EXPECTED_PARAM             = 0x65, 
+  QSER_WMS_TL_CAUSCODMISSING_MAND_PARAM                 = 0x66, 
+  QSER_WMS_TL_CAUSCODUNRECOGNIZED_PARAM_VAL             = 0x67, 
+  QSER_WMS_TL_CAUSCODUNEXPECTED_PARAM_VAL               = 0x68, 
+  QSER_WMS_TL_CAUSCODUSER_DATA_SIZERR                 = 0x69, 
+  QSER_WMS_TL_CAUSCODGENERAL_OTHER                      = 0x6A, 
+}QSER_WMS_TL_CAUSCODTYPE;
+
+
+
+typedef struct
+ {
+  uint16_t                              messagid;            /*  Message ID */
+  uint8_t                               causcodvalid;      /**< Must be set to true if causcode is being passed */
+  QSER_WMS_TL_CAUSCODTYPE           causcode;  
+}QSER_wms_raw_send_resp_t;
+
+typedef struct 
+ {
+  char service_center_addr[QSER_SMS_MAX_ADDR_LENGTH + 1];         /**<   Address of the service center.*/
+  uint8_t service_center_addr_typvalid;
+  char service_center_addr_type[QSER_SMS_MAX_SCA_TYPLENGTH + 1];    /**<   129 if the SMSC address does not start with a "+" characte;
+                                                                           145 if the SMSC address starts with a "+" character*/
+}QSER_sms_service_center_cfg_t;
+
+typedef QSER_sms_info_t       QSER_SMS_Msg_t; 
+typedef QSER_sms_info_t*      QSER_SMS_MsgRef; 
+
+/* Callback function registered to qser_sms_addrxmsghandler, msgRef contains the detail msg infor */
+typedef void (*QSER_SMS_RxMsgHandlerFunc_t)(QSER_SMS_MsgRef msgRef, void* contextPtr);
+
+/* Init SMS module and return h_sms, this should be called before any othe ones */
+int qser_sms_client_init(sms_client_handle_type  *ph_sms);
+
+/* Add callback function, if any new msg arrived, it will notify app */
+int qser_sms_addrxmsghandler(QSER_SMS_RxMsgHandlerFunc_t handlerPtr, void* contextPtr);
+
+/* Send sms, you just need to fill format/src_addr/sms_data_len/sms_data,
+   if format is UCS2, the data should be Unicode-BE format.
+*/
+int qser_sms_send_sms(sms_client_handle_type h_sms, QSER_sms_info_t *pt_sms_info);
+
+/* DeInit SMS module and release resource, this should be called in the last one. */
+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);
+
+/* Send sms PDU.
+*/
+int qser_sms_send_smspdu( sms_client_handle_type     h_sms,
+                         QSER_wms_send_raw_message_data_t *raw_messagdata,
+                         QSER_wms_raw_send_resp_t *rawresp);
+
+
+/* Get sms center address.
+*/
+int qser_sms_getsmscenteraddress( sms_client_handle_type     h_sms,
+                       QSER_sms_service_center_cfg_t *set_sca_cfg);
+
+/* Set sms center address.
+*/
+int qser_sms_setsmscenteraddress( sms_client_handle_type     h_sms,
+                       QSER_sms_service_center_cfg_t *get_sca_cfg);
+
+/*
+Usage 1 (register callback and wait for new sms arrive): 
+1, qser_sms_client_init
+2, qser_sms_addrxmsghandler(pf_cb)
+3, wait for sms arrive, pf_cb will pass the detail sms info to app.
+4, qser_sms_client_deinit
+
+
+Usage 2 (Send sms): 
+1, qser_sms_client_init
+2, qser_sms_addrxmsghandler(pf_cb)
+3, qser_sms_send_sms
+4, qser_sms_client_deinit
+
+
+Usage 3 (store sms): 
+1, qser_sms_client_init
+2, qser_sms_addrxmsghandler(pf_cb)
+3, qser_sms_setroutelist (Notice: class-0 not allowed to store, class-2 must be stored to UIM)
+4, pf_cb will be called when new sms arrived, and tell you where the sms stored
+5, you can call qser_sms_deletefromstorage to delete specified sms, the location can be got from pf_cb.
+6, qser_sms_client_deinit
+*/
+    
+#ifdef __cplusplus
+}
+#endif
+#endif
\ No newline at end of file
diff --git a/mbtk/include/lynq/lynq_qser_thermal.h b/mbtk/include/lynq/lynq_qser_thermal.h
new file mode 100755
index 0000000..d776dde
--- /dev/null
+++ b/mbtk/include/lynq/lynq_qser_thermal.h
@@ -0,0 +1,12 @@
+#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_sim.h b/mbtk/include/lynq/lynq_sim.h
new file mode 100755
index 0000000..8f2849a
--- /dev/null
+++ b/mbtk/include/lynq/lynq_sim.h
@@ -0,0 +1,98 @@
+/*=============================================================================
+#     FileName: lynq_sim.h
+#     Desc: about SIMAPI
+#     Author: lei
+#     Version: V2.0
+#     LastChange: 2023-03-13
+#     History:
+# If you need to use any API under lynq_sim, you must first call the lynq_sim_init() function to initialize these functions.
+=============================================================================*/
+#ifndef __LYNQ_SIM__
+#define __LYNQ_SIM__
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include "mbtk_type.h"
+
+int lynq_get_sim_status(int *card_status);
+int lynq_get_imsi(char buf[]);
+int lynq_sim_init(int utoken);
+int lynq_sim_deinit(void);
+int lynq_enable_pin(char pin[]);
+int lynq_disable_pin(char pin[]);
+int lynq_get_iccid(char buf[]);
+int lynq_query_pin_lock(char *pin,int buf[]);
+int lynq_verify_pin(char *pin);
+int lynq_change_pin(char *old_pin, char *new_pin);
+int lynq_unlock_pin(char *puk, char *pin);
+int lynq_query_phone_number(char buf[]);
+int lynq_switch_card(int slot);
+int lynq_screen(int num);
+int lynq_get_imei(char buf[]);
+int lynq_get_imei_and_sv(char imei[],char sv[]);
+
+/**
+ * @brief                   Request SIM I/O operation.
+ *                          This is similar to the TS 27.007 "restricted SIM" operation
+ *                          where it assumes all of the EF selection will be done by the callee.
+ * @param  list             type: [IN] list[0]:one of the commands listed for TS 27.007 +CRSM.(command)
+ *                          type: [IN] list[1]:EF id(fileid)
+ *                          type: [IN] list[2]:offset(p1)
+ *                          type: [IN] list[3]:offset(p2)
+ *                          type: [IN] list[4]:response len,sometimes needn't care(p3)
+ * @param  path             type: [IN] "pathid" from TS 27.007 +CRSM command.
+                            type: [IN] Path is in hex asciii format eg "7f205f70"
+                            type: [IN] Path must always be provided.
+ * @param  data             type: [IN] May be NULL
+ * @param  pin2             type: [IN] May be NULL
+ * @param  aidPtr           type: [IN] AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
+ * @param  sw               type: [OUT]
+ * @param  simResponse      type: [OUT] response
+ * @return int
+ */
+int lynq_req_sim_io(int list[5], char *path, char *data, char *pin2, char *aidPtr, int sw[2], char *simResponse);
+
+/**
+ * @brief
+ * @param  options         type: [IN] [options] define whether you want to halt, power-off, or reboot the machine.May be NULL
+ * @param  time            type: [IN] [time] specifies when you want the shutdown to perform.May be NULL
+ * @param  message         type: [IN] [message] adds a message that announces the shutdown.May be NULL
+ * @return int
+ */
+int lynq_shutdown(char options[], char time[], char message[]);
+
+/**
+ * @brief                   get currnet version of mobiletek
+ * @param  buf              type: [out] My Param doc
+ * @return int
+ */
+int lynq_get_version(char buf[]);
+
+/**
+ * @brief sim power on/off
+ *
+ */
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int lynq_reset_sim(void);
+#else
+int lynq_sim_power(int mode);
+#endif
+/**
+ * @brief reset modem
+ *
+ */
+int lynq_reset_modem(void);
+
+/**
+ * @brief factory test to both radio on/off
+ *
+ */
+int lynq_factory_radio_state(int num);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/mbtk/include/lynq/lynq_sms.h b/mbtk/include/lynq/lynq_sms.h
new file mode 100755
index 0000000..278278a
--- /dev/null
+++ b/mbtk/include/lynq/lynq_sms.h
@@ -0,0 +1,36 @@
+#ifndef LYNQ_SMS_H

+#define LYNQ_SMS_H 1

+#ifdef __cplusplus

+extern "C" {

+#endif

+

+#define MIN_MSM_PARAM_NUM 4

+#define MIN_IMS_MSM_PARAM_NUM 6

+#define MIN_WRITE_MSM_PARAM_NUM 5

+#define MSG_MAX_LEN 1024

+#define TELEPHONE_NUM_LEN 64

+#define STORAGE_SMS_MAX_SIZE 128

+#define SMSC_MAX_LEN 22

+#define SMS_NUM_MAX 255

+

+typedef enum

+{

+    SMS_ERR = -1,

+    SMS_OK = 0,

+    SMS_KNONW = 1,

+    SMS_UNKNONW = 2

+}status_SMS;

+

+int lynq_sms_init(int uToken);

+int lynq_sms_deinit(void);

+int lynq_send_sms(char telephony_num[TELEPHONE_NUM_LEN], int charset, char *msg, int msglen);

+int lynq_read_sms(int index,int *status,int *charset,char smsc[SMSC_MAX_LEN],int *smscLen,int *smslen,char message[MSG_MAX_LEN],char teleNum[TELEPHONE_NUM_LEN],int *numLen,int *current,int *total);

+int lynq_get_smsc_address(char service_num[SMSC_MAX_LEN]);

+int lynq_set_smsc_address(const char* service_num);

+int lynq_list_sms(char index_list[SMS_NUM_MAX]);

+int lynq_delete_sms(int index);

+int lynq_wait_receive_new_sms(int *handle);

+#ifdef __cplusplus

+}

+#endif

+#endif

diff --git a/mbtk/include/lynq/lynq_systime.h b/mbtk/include/lynq/lynq_systime.h
new file mode 100755
index 0000000..a9d54d9
--- /dev/null
+++ b/mbtk/include/lynq/lynq_systime.h
@@ -0,0 +1,125 @@
+/**@file lynq-systime.h

+ *

+ * @brief Sync systime form each time source.

+ *

+ * @author sj.zhang

+ *

+ * @date 2023-08-14

+ *

+ * @version V1.0

+ *

+ * @copyright Copyright (c) MobileTek

+ */

+#include <stdio.h>

+#include <string.h>

+#include <stdlib.h>

+#include <time.h>

+#include "lynq_uci.h"

+

+#ifndef _LYNQ_SYSTIME_H_

+#define _LYNQ_SYSTIME_H_

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+typedef struct time_source_status

+{

+    int ntp;

+    int nitz;

+    int gnss;

+}time_src_status_s;

+

+#ifdef MOBILETEK_TARGET_PLATFORM_T106

+

+    /**@brief Set the rtc time to the system time.

+     *

+     * @param void

+     *

+     * @return

+     *      0:success

+     *      other:failure

+     */

+    int lynq_sync_time_from_rtc(void);

+

+    /**@brief Set the system time to the rtc time.

+     *

+     * @param void

+     *

+     * @return

+     *      0:success

+     *      other:failure

+     */

+    int lynq_set_rtc_time(void);

+

+    /**@brief Query the rtc time.

+     *

+     * @param [OUT] ulsec: rtc time, secconds from 1900.1.1 00:00

+     *

+     * @return

+     *      0:success

+     *      other:failure

+     */

+    int lynq_get_rtc_time(unsigned long *ulsec);

+#endif

+

+    /**@brief Query the time source status now.

+     *

+     * @param [OUT] ntp, nitz, gnss:

+     *        0: disable

+     *        1: enable

+     *

+     * @return

+     *      0 : success

+     *      other:failure

+     */

+    int lynq_get_time_src_status(time_src_status_s *time_src);

+

+    /**@brief Turn sntp on/off

+     *

+     * @param enable [IN] : 0  disenable; 1 enable;

+     *

+     * @return

+     *    0 set success

+     *    1 SNTP_DISENABLE

+     *    2 SNTP_ALREADY_ENABLE

+     */

+    int ntp_sync_time(int enable);

+

+    /**@brief Enable/Disenable sync time from NITZ.

+     *

+     * @param enable [IN] : 0  disenable; 1 enable;

+     *

+     * @return

+     *      0:success

+     *      other:failure

+     */

+    int modem_time_enable(int enable);

+

+    /**@brief Enable/Disenable sync time from GNSS.

+     *

+     * @param enable [IN] : 0  disenable; 1 enable;

+     *

+     * @return

+     *      0:success

+     *      other:failure

+     */

+    int gnss_time_enable(int enable);

+

+    /**@brief User set systime manually.

+     *

+     * @param enable [IN] : 0  disenable; 1 enable;

+     *

+     * @return

+     *      0:success

+     *      other:failure

+     */

+    int user_set_time(char *date, char *time);

+

+    int get_sync_time_result(void );

+

+#ifdef __cplusplus

+}

+#endif

+#endif

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

diff --git a/mbtk/include/lynq/lynq_wifi.h b/mbtk/include/lynq/lynq_wifi.h
new file mode 100755
index 0000000..babf0c3
--- /dev/null
+++ b/mbtk/include/lynq/lynq_wifi.h
@@ -0,0 +1,312 @@
+/*******************************************************
+* 
+* @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_ERROR = -1,
+	LYNQ_ERR_SUCCESS = 0,
+	LYNQ_ERR_FAIL,
+	LYNQ_ERR_NO_MEMORY,
+	LYNQ_ERR_BADPARAM,
+	LYNQ_ERR_NOT_SUPPORT,
+	LYNQ_ERR_NOT_READY,
+	LYNQ_ERR_NO_DEVICE,
+	LYNQ_ERR_NO_MAC,
+	LYNQ_ERR_IPC,
+	LYNQ_ERR_SOC,
+	LYNQ_ERR_CONDITION,
+	LYNQ_ERR_BUSY,
+	LYNQ_ERR_FIRMWARE_CRASH
+} lynq_wifi_err_code;
+
+
+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;
+
+typedef enum
+{ 
+	LYNQ_WIFI_WORK_MODE_AP0 ,
+	LYNQ_WIFI_WORK_MODE_AP1
+	
+} lynq_wifi_work_mode_e;
+
+typedef enum {
+LYNQ_WIFI_EVENT_ENABLE_STATUS = 0, //打开 AP 的回调和 STA 模式连接状态的回调
+LYNQ_WIFI_EVENT_DISABLE_STATUS, //关闭 AP 的回调和 STA 模式连接状态的回调
+LYNQ_WIFI_EVENT_AP_STATION, //输入未使用
+LYNQ_WIFI_EVENT_AP_STA_STATUS, //输入未使用
+LYNQ_WIFI_EVENT_STA_STATUS, //输入未使用
+} lynq_wifi_event_type_e;
+
+typedef enum {
+LYNQ_WIFI_AP_STATUS_NONE = 0, //初始状态
+LYNQ_WIFI_AP_STATUS_IDLE, //打印两次,表示 AP 已关闭
+LYNQ_WIFI_AP_STATUS_ENABLING, //AP 正在开启中
+LYNQ_WIFI_AP_STATUS_ENABLED, //AP 已开启
+LYNQ_WIFI_AP_STATUS_DISABLING, //已移除
+LYNQ_WIFI_AP_STATUS_ERROR //操作异常
+} lynq_wifi_status_e;
+
+typedef enum
+{
+LYNQ_WIFI_AUTH_WPA_PAIRWISE_MIN = -1,
+LYNQ_WIFI_AUTH_WPA_PAIRWISE_AUTO = 0, //TKIP & AES
+LYNQ_WIFI_AUTH_WPA_PAIRWISE_TKIP, //TKIP
+LYNQ_WIFI_AUTH_WPA_PAIRWISE_AES, //AES
+LYNQ_WIFI_AUTH_WPA_PAIRWISE_MAX
+} lynq_wifi_auth_wpa_psk_e;
+
+typedef enum
+{
+LYNQ_WIFI_STA_STATUS_NONE, //初始状态
+LYNQ_WIFI_STA_STATUS_IDLE, //STA 已关闭
+LYNQ_WIFI_STA_STATUS_CONNECTING, //STA 正在连接热点中
+LYNQ_WIFI_STA_STATUS_ASSOCIATED, //STA 已连上热点,正在分配 IP 中
+LYNQ_WIFI_STA_STATUS_CONNECTED, //STA 已连上热点,完成 IP 分配
+LYNQ_WIFI_STA_STATUS_DISCONNECTED, //STA 已从热点断开
+LYNQ_WIFI_STA_STATUS_ERROR //连接报错
+} lynq_wifi_sta_status_e;
+
+typedef enum
+{
+LYNQ_WIFI_REASON_CODE_NONE, //无特殊原因
+LYNQ_WIFI_REASON_CODE_WRONG_KEY, //热点的密码错误
+LYNQ_WIFI_REASON_CODE_AUTH_FAILED, //与热点认证失败
+LYNQ_WIFI_REASON_CODE_CONN_FAILED, //与热点连接失败
+LYNQ_WIFI_REASON_CODE_SET_FAILED, //热点的认证等设置错误
+LYNQ_WIFI_REASON_CODE_DHCP_FAILED //与热点的 DHCP 失败
+} lynq_wifi_reason_code_e;
+
+typedef enum
+{
+LYNQ_WIFI_MAC_ACL_RULE_NONE, 
+LYNQ_WIFI_MAC_ACL_RULE_WHITE_LIST,
+LYNQ_WIFI_MAC_ACL_RULE_BLACK_LIST
+} lynq_wifi_mac_acl_rule_e;
+
+typedef struct
+{
+char addr[16]; //连接的 sta 设备 IPv4 的地址
+char macaddr[18]; //连接的 sta 设备 MAC 的地址
+char name[20]; //连接的 sta 设备名称
+char ifname[18]; //对应 AP 核的 wlan 设备
+int uptime; //sta 设备连接的时间,单位:秒
+} lynq_lanhost_t;
+
+
+typedef struct
+{
+ int array_len; //打印连接设备的个数
+ lynq_lanhost_t array[32]; //具体的 sta 信息,参考 lynq_lanhost_t 结构体
+} lynq_lanhost_ts;
+
+typedef struct
+{
+lynq_wifi_auth_e auth; //安全模式。
+lynq_wifi_auth_wpa_psk_e pairwise; //加密方式。
+char passwd[64+1]; //密码
+int group_rekey; //组密钥重新协商间隔。
+}lynq_wifi_ap_auth_t;
+
+
+
+
+
+typedef struct
+{
+char bssid[18];//接入点的 mac
+char essid[33]; //接入点的 SSID
+int signal; //信号强度(dbm)
+unsigned char signal_level; //接入点的信号格(0-4)
+int frequency; //工作频点(Hz)
+unsigned char channel; //接入点的信道
+lynq_wifi_auth_e auth; //接入点的认证信息,参考 lynq_wifi_auth_e 结构体说明
+lynq_wifi_auth_wpa_psk_e cipher; //接入点的加密类型,参考lynq_wifi_auth_wpa_psk_e结构体说明
+}lynq_wifi_sta_scan_info_t;
+
+
+typedef struct
+{
+char ssid[33];
+lynq_wifi_auth_e auth; //安全模式,参考表后说明
+lynq_wifi_auth_wpa_psk_e pairwise; //加密方式
+char passwd[64 + 1]; //密码
+} lynq_wifi_sta_param_t;
+
+typedef struct
+{
+char addr[16]; //IPv4 地址
+char netmask[16]; //子网掩码
+unsigned char subnet_bits; //子网掩码的位数,比如 255.255.255.0 是 24
+char gateway[16]; //网关
+char dnsp[16]; //主要的 DNS
+char dnss[16]; //次要的 DNS
+} lynq_wifi_net_addr_t;
+
+typedef struct
+{
+char addr[48]; //IPv6 地址
+char prefix[48]; //IPv6 子网掩码
+unsigned char prefix_bits; //IPv6 子网掩码的位数
+char gateway[48]; //IPv6 网关
+char dnsp[48]; //IPv6 主要的 DNS
+char dnss[48]; //IPv6 次要的 DNS
+} lynq_wifi_net_addr6_t;    
+
+
+typedef struct
+{
+//lynq_wifi_station_status_e sta_status; //用于兼容回调 STA 模式的状态获取,API 获取时不被赋值
+lynq_wifi_sta_status_e status; //sta 的几种状态,参考表后
+char ifname[32]; //作为 sta 设备时名字
+char ap_bssid[18]; //连接的热点 MAC 地址
+//int rssi;
+unsigned char signal_level; //信号格,目前暂未支持
+unsigned char has_addr; //判断是否是 IPv4 地址
+lynq_wifi_net_addr_t addr[48]; // 需 先 判 断has_addr 是否为 1,具体参考 lynq_wifi_net_addr_t 结构体说明。
+unsigned char has_addr6; //判断是否是 IPv6 地址
+lynq_wifi_net_addr6_t addr6; // 需 先 判 断has_addr6 是否为 1,具体参考 lynq_wifi_net_addr6_t结构体说明
+lynq_wifi_reason_code_e reason_code; //错误原因,参考表后
+} lynq_wifi_sta_status_t;
+
+
+typedef struct {
+unsigned long long rx_packets; //对应 ifconfig wlan0-vxd 的 RX packets
+unsigned long long rx_bytes; //对应 ifconfig wlan0-vxd 的 RX bytes
+unsigned long long rx_errors; //对应 ifconfig wlan0-vxd 的 RX errors
+unsigned long long rx_dropped; //对应 ifconfig wlan0-vxd 的 RX dropped
+unsigned long long tx_packets; //对应 ifconfig wlan0-vxd 的 TX packets
+unsigned long long tx_bytes; //对应 ifconfig wlan0-vxd 的 TX bytes
+unsigned long long tx_errors; //对应 ifconfig wlan0-vxd 的 TX errors
+unsigned long long tx_dropped; //对应 ifconfig wlan0-vxd 的 TX dropped
+} lynq_wifi_pkt_stats_t;
+
+
+typedef struct {
+    int cnt; //搜索到的热点总数
+    lynq_wifi_sta_scan_info_t info[50]; //存储的热点信息
+} lynq_wifi_sta_scan_list_t;
+
+
+typedef struct {
+    lynq_wifi_event_type_e id;//事件说明。参考表后结构体说明
+    lynq_wifi_status_e status; //需要id为LYNQ_WIFI_EVENT_AP_STATION时,参考表后结构体说明
+    //lynq_wifi_station_status_e sta_status; //需要id为LYNQ_WIFI_EVENT_STA_STATUS时,STA模式下连接和断开的热点的值
+    lynq_wifi_sta_status_t sta_status_all;//需要id为LYNQ_WIFI_EVENT_STA_STATUS时获取具体的值
+} lynq_wifi_event_s;
+
+typedef struct
+{
+    lynq_wifi_status_e status; //AP状态,详细参考表后
+    char ifname[32]; //网口名
+    char bssid[18]; //AP的bssid
+}lynq_wifi_ap_status_t;
+
+
+
+
+typedef void (*lynq_wifi_event_handle)(lynq_wifi_event_s *event, void *arg);
+typedef void (*lynq_wifi_event_handle_sta)(lynq_wifi_sta_scan_list_t *event);
+
+
+
+int qser_wifi_enable(void);
+int qser_wifi_disable(void);
+int qser_wifi_work_mode_set(lynq_wifi_work_mode_e type);
+int qser_wifi_work_mode_get(lynq_wifi_work_mode_e *type);
+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_ssid_hide_set(lynq_wifi_ap_index_e idx,bool hide);
+int qser_wifi_ap_ssid_hide_get(lynq_wifi_ap_index_e idx,bool* hide);
+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_auth_get_s(lynq_wifi_ap_index_e idx, lynq_wifi_ap_auth_t* auth_mode);
+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);
+
+
+int qser_wifi_sta_param_set(lynq_wifi_sta_param_t *param_stat);
+int qser_wifi_sta_param_get(lynq_wifi_sta_param_t *param_stat);
+int qser_wifi_sta_start(void);
+int qser_wifi_sta_stop(void);
+int qser_wifi_sta_get_status(lynq_wifi_sta_status_t *status_stat);
+int qser_wifi_register_handle(lynq_wifi_event_handle event_handle, lynq_wifi_event_handle_sta event_handle_sta, void *arg);
+int qser_wifi_sta_start_scan(void);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+