diff --git a/mbtk/test/libmbtk_audio/mbtk_pcm_play_test.c b/mbtk/test/libmbtk_audio/mbtk_pcm_play_test.c
index c11e06a..329d8e2 100755
--- a/mbtk/test/libmbtk_audio/mbtk_pcm_play_test.c
+++ b/mbtk/test/libmbtk_audio/mbtk_pcm_play_test.c
@@ -2,9 +2,13 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.h>
+#include <string.h>
+#include <stdlib.h>
 
 #include "audio_if_api.h"
 #include "mbtk_audio2.h"
+#include "mbtk_log.h"
+#include "mbtk_utils.h"
 
 #define BUFF_SIZE 4096
 
@@ -54,7 +58,7 @@
         return -1;
     }
 
-    read(fd, &riff_wave_header, sizeof(riff_wave_header));
+    mbtk_read(fd, &riff_wave_header, sizeof(riff_wave_header));
     if ((riff_wave_header.riff_id != ID_RIFF) || (riff_wave_header.wave_id != ID_WAVE)) {
         printf("Error: '%s' is not a riff/wave file\n", path);
         close(fd);
@@ -62,11 +66,11 @@
     }
 
     do {
-        read(fd, &chunk_header, sizeof(chunk_header));
+        mbtk_read(fd, &chunk_header, sizeof(chunk_header));
 
         switch (chunk_header.id) {
             case ID_FMT:
-                read(fd, &chunk_fmt, sizeof(chunk_fmt));
+                mbtk_read(fd, &chunk_fmt, sizeof(chunk_fmt));
                 /* If the format header is larger, skip the rest */
                 if (chunk_header.sz > sizeof(chunk_fmt))
                     lseek(fd, chunk_header.sz - sizeof(chunk_fmt), SEEK_CUR);
diff --git a/mbtk/test/libmbtk_audio/mbtk_pcm_recorder_test.c b/mbtk/test/libmbtk_audio/mbtk_pcm_recorder_test.c
index 748e599..5f7e03d 100755
--- a/mbtk/test/libmbtk_audio/mbtk_pcm_recorder_test.c
+++ b/mbtk/test/libmbtk_audio/mbtk_pcm_recorder_test.c
@@ -3,6 +3,8 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include "mbtk_audio2.h"
 #include "mbtk_log.h"
@@ -53,7 +55,7 @@
     while(running)
     {
         memset(cmd, 0, 100);
-        int err;
+//        int err;
         printf("1 : Recorder    2 : Pause    3 : Resume    4 : Stop    Other : Exit\n");
         if(fgets(cmd, 100, stdin))
         {
@@ -102,7 +104,7 @@
         }
     }
 
-exit:
+//exit:
     if(mbtk_audio_pcm_deinit()) {
         printf("mbtk_audio_pcm_deinit() fail.\n");
         return -1;
diff --git a/mbtk/test/libmbtk_audio/mbtk_wav_play_test.c b/mbtk/test/libmbtk_audio/mbtk_wav_play_test.c
index b5108f4..c3167b8 100755
--- a/mbtk/test/libmbtk_audio/mbtk_wav_play_test.c
+++ b/mbtk/test/libmbtk_audio/mbtk_wav_play_test.c
@@ -3,9 +3,12 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include "mbtk_audio2.h"
 #include "mbtk_audio_ubus.h"
+#include "mbtk_log.h"
 
 static void sig_handler(int sig)
 {
@@ -41,12 +44,12 @@
     signal(SIGTERM, sig_handler);
 
     char cmd[100];
-    int dsp=0;
+//    int dsp=0;
     bool running = TRUE;
     while(running)
     {
         memset(cmd, 0, 100);
-        int err;
+//        int err;
         printf("1 : Play    2 : Pause    3 : Resume   4 : dsp set  5 : Stop    Other : Exit\n");
         if(fgets(cmd, 100, stdin))
         {
@@ -104,7 +107,7 @@
         }
     }
 
-exit:
+//exit:
     if(mbtk_audio_wav_deinit()) {
         printf("mbtk_audio_wav_deinit() fail.\n");
         return -1;
diff --git a/mbtk/test/libmbtk_audio/mbtk_wav_recorder_test.c b/mbtk/test/libmbtk_audio/mbtk_wav_recorder_test.c
index 2f9a1a2..0ad1ddf 100755
--- a/mbtk/test/libmbtk_audio/mbtk_wav_recorder_test.c
+++ b/mbtk/test/libmbtk_audio/mbtk_wav_recorder_test.c
@@ -3,8 +3,11 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include "mbtk_audio2.h"
+#include "mbtk_log.h"
 
 static void sig_handler(int sig)
 {
@@ -44,7 +47,6 @@
     while(running)
     {
         memset(cmd, 0, 100);
-        int err;
         printf("1 : Recorder    2 : Pause    3 : Resume    4 : Stop    Other : Exit\n");
         if(fgets(cmd, 100, stdin))
         {
@@ -93,7 +95,7 @@
         }
     }
 
-exit:
+//exit:
     if(mbtk_audio_wav_deinit()) {
         printf("mbtk_audio_wav_deinit() fail.\n");
         return -1;
diff --git a/mbtk/test/libmbtk_coap/mbtk_coap_test.c b/mbtk/test/libmbtk_coap/mbtk_coap_test.c
index b211913..1d8e9ad 100755
--- a/mbtk/test/libmbtk_coap/mbtk_coap_test.c
+++ b/mbtk/test/libmbtk_coap/mbtk_coap_test.c
@@ -1,4 +1,6 @@
 #include <string.h>
+#include <unistd.h>
+
 #include "mbtk_type.h"
 #include "mbtk_coap.h"
 #include "mbtk_coap_api.h"
@@ -10,9 +12,9 @@
 
 int main(int argc, char *argv[])
 {
-    char operator[10];
-    int opt;
-    int    ret     = -1;
+    //char operator[10];
+  //  int opt;
+//    int    ret     = -1;
 
 	printf("coap_demo star\r\n");
 	coap_get_method();
@@ -26,8 +28,8 @@
 
 int coap_get_method(void)
 {
-	int ret = -1;
-	ret = mbtk_coap_ecoapnew_exec_cmd("134.102.218.18",5683,0,0);    //server ip, port
+//	int ret = -1;
+	mbtk_coap_ecoapnew_exec_cmd("134.102.218.18",5683,0,0);    //server ip, port
 	mbtk_coap_ecoapmsgid_exec_cmd(1);								//set message id
 	mbtk_coap_ecoaptype_exec_cmd(0);								//set message type
 	mbtk_coap_ecoapcode_exec_cmd(1);								//set Get request method
@@ -40,8 +42,8 @@
 
 int coap_post_method(void)
 {
-	int ret = -1;
-	ret = mbtk_coap_ecoapnew_exec_cmd("134.102.218.18",5683,0,0);     //server ip, port
+//	int ret = -1;
+	mbtk_coap_ecoapnew_exec_cmd("134.102.218.18",5683,0,0);     //server ip, port
 	mbtk_coap_ecoapmsgid_exec_cmd(3);            					//set message id
 	mbtk_coap_ecoaptype_exec_cmd(0);             					//set message type
 	mbtk_coap_ecoapcode_exec_cmd(2);			 					//set Post request method
diff --git a/mbtk/test/libmbtk_ecall/mbtk_ecall_test_v1.c b/mbtk/test/libmbtk_ecall/mbtk_ecall_test_v1.c
index a1b8f01..bec5b32 100755
--- a/mbtk/test/libmbtk_ecall/mbtk_ecall_test_v1.c
+++ b/mbtk/test/libmbtk_ecall/mbtk_ecall_test_v1.c
@@ -131,7 +131,7 @@
                 memset(&cfg, 0, sizeof(mbtk_ecall_msd_cfg_info_t));
                 int item;
                 int count = sscanf(cmd, "msdcfg %d %s", &item, cfg.data);
-                if(count == 2 && strlen(cfg.data) > 0) {
+                if(count == 2 && strlen((char*)cfg.data) > 0) {
                     cfg.item_type = (mbtk_ecall_msd_item_enum)item;
                     err = mbtk_ecall_msd_item_set(info_handle, &cfg);
                     if(err) {
@@ -166,7 +166,7 @@
                     }
                 } else { // Set
                     int count = sscanf(cmd, "msd %s", msd);
-                    if(count == 1 && strlen(msd) > 0) { // set
+                    if(count == 1 && strlen((char*)msd) > 0) { // set
                         err = mbtk_ecall_msd_set(info_handle, msd);
                         if(err) {
                             printf("Error : %d\n", err);
@@ -394,7 +394,7 @@
                     }
                 } else { // Set
                     int count = sscanf(cmd, "sms_num %s", number);
-                    if(count == 1 && strlen(number) > 0) {
+                    if(count == 1 && strlen((char*)number) > 0) {
                         err = mbtk_ecall_sms_number_set(info_handle, number);
                         if(err) {
                             printf("Error : %d\n", err);
@@ -445,7 +445,7 @@
         }
     }
 
-exit:
+//exit:
     mbtk_info_handle_free(&info_handle);
 
     LOG("Client exec complete.");
diff --git a/mbtk/test/libmbtk_ftp/mbtk_ftp_test.c b/mbtk/test/libmbtk_ftp/mbtk_ftp_test.c
index 481108d..ce69cde 100755
--- a/mbtk/test/libmbtk_ftp/mbtk_ftp_test.c
+++ b/mbtk/test/libmbtk_ftp/mbtk_ftp_test.c
@@ -122,18 +122,19 @@
     char cmd[50];
     while(1) {
         memset(cmd, 0, 50);
-        gets(cmd);
-        if(!strcasecmp(cmd, "q")) {
-            break;
-        } else {
-            ftp_cmd_process(handle, cmd);
+        if(fgets(cmd, sizeof(cmd), stdin) != NULL) {
+            if(!strcasecmp(cmd, "q")) {
+                break;
+            } else {
+                ftp_cmd_process(handle, cmd);
+            }
         }
 
         printf("CMD:");
     }
 
     printf("FTP test success.\n");
-ftp_quit:
+//ftp_quit:
     mbtk_ftp_quit(handle);
 ftp_exit:
     mbtk_ftp_deinit(handle);
diff --git a/mbtk/test/libmbtk_gnss/mbtk_gnss_test.c b/mbtk/test/libmbtk_gnss/mbtk_gnss_test.c
index e710fa2..e74ad1f 100755
--- a/mbtk/test/libmbtk_gnss/mbtk_gnss_test.c
+++ b/mbtk/test/libmbtk_gnss/mbtk_gnss_test.c
Binary files differ
diff --git a/mbtk/test/libmbtk_lib/mbtk_timer_test.c b/mbtk/test/libmbtk_lib/mbtk_timer_test.c
index 7b24ef2..f903b26 100755
--- a/mbtk/test/libmbtk_lib/mbtk_timer_test.c
+++ b/mbtk/test/libmbtk_lib/mbtk_timer_test.c
@@ -2,6 +2,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
 
 #include "mbtk_utils.h"
 #include "mbtk_log.h"
@@ -14,7 +16,7 @@
 {
     char *str = "----------------------Timeout---------------------------\n";
     if(fd > 0) {
-        write(fd, str, strlen(str));
+        mbtk_write(fd, str, strlen(str));
     }
 
     printf("%s", str);
diff --git a/mbtk/test/libmbtk_mqtt/mbtk_mqtt_aliyun_test.c b/mbtk/test/libmbtk_mqtt/mbtk_mqtt_aliyun_test.c
index 923b123..fc6820e 100755
--- a/mbtk/test/libmbtk_mqtt/mbtk_mqtt_aliyun_test.c
+++ b/mbtk/test/libmbtk_mqtt/mbtk_mqtt_aliyun_test.c
@@ -18,6 +18,8 @@
 */
 
 int aliyun_xiyinyimi_connect(mbtk_mqtt_device_session_t *device, regnwl_info_t *regn);
+void iot_yield(Cloud_MQTT_t *piot_mqtt,iot_device_info_t *gateway);
+
 
 struct opts_struct opts = {
     (char *)"iot-dev", 0, (char *)"\n", QOS0, "admin", "password", (char *)"localhost", 1883, 0
@@ -40,7 +42,7 @@
     return miot_mqtt;
 }
 
-void mqtt_data_rx_cb(void *pbuf, int len) 
+void mqtt_data_rx_cb(void *pbuf, int len)
 {
 
     printf("data = %s\n", (unsigned char *)pbuf);	//打印接收到的数据
@@ -49,7 +51,7 @@
 
 void MQTTMessageArrived_Cb(MessageData* md)
 {
-    MQTTMessage *message = md->message; 
+    MQTTMessage *message = md->message;
 
     Cloud_MQTT_t *piot_mqtt = get_mqtt_t();
 
@@ -63,7 +65,7 @@
 {
     while (gateway.iotstatus != IOT_STATUS_DROP){
         printf("gateway.iotstatus is %d\n",gateway.iotstatus);
-        iot_yield(arg,&gateway);									//维持服务器稳定，断开重连
+        iot_yield((Cloud_MQTT_t*)arg,&gateway);									//维持服务器稳定，断开重连
     }
     printf("gateway.iotstatus is IOT_STATUS_DROP");
 //    mqtt_device_disconnect(arg);
@@ -78,9 +80,9 @@
 {
 
     printf("aliyun mqtt start2\n");
-    int ret, len; 
+//  int ret, len;
     char will_msg[256] = {"hello world"};						//初始化遗嘱数据
-    static int i = 0;
+//  static int i = 0;
 
     mbtk_mqtt_device_session_t mbtk_mqtt_device = {0};
     memcpy(mbtk_mqtt_device.device_name, argv[1] , strlen(argv[1]));
@@ -98,8 +100,8 @@
     mbtk_aliyun_mqtt_one_type_one_secret_unregin_set_info_init(Iot_mqtt, &mbtk_mqtt_device,60*1000,4,mqtt_data_rx_cb);
 
     mqtt_will_msg_set(Iot_mqtt, will_msg, strlen(will_msg));	//设置遗嘱
-    set_mqtt_t(Iot_mqtt);   
-    ret = mbtk_aliyun_mqtt_one_type_one_secret_unregin_device_connect(Iot_mqtt);						//初始化并连接mqtt服务器
+    set_mqtt_t(Iot_mqtt);
+    mbtk_aliyun_mqtt_one_type_one_secret_unregin_device_connect(Iot_mqtt);						//初始化并连接mqtt服务器
 
     printf("connect success\n");
     int rc = mbtk_MQTTSubscribe(&Iot_mqtt->Client, Iot_mqtt->sub_topic, opts.qos, MQTTMessageArrived_Cb);
@@ -124,7 +126,7 @@
 int aliyun_xiyinyimi_connect(mbtk_mqtt_device_session_t *device, regnwl_info_t *regn)
 {
 
-    int ret, len; 
+    int ret;
     char will_msg[256] = {"hello world"};						//初始化遗嘱数据
     static int retry_count = 0;
     pthread_t thread_ID;      //定义线程id
@@ -133,17 +135,17 @@
     Cloud_MQTT_t *Iot_mqtt;
     Iot_mqtt = (Cloud_MQTT_t *)malloc(sizeof(Cloud_MQTT_t));
     memset(Iot_mqtt,0x0,sizeof(Cloud_MQTT_t));
-    
 
-    iot_aliyun_mqtt_one_type_one_secret_unregin_connect_init(Iot_mqtt,device, regn->clientId, regn->deviceToken, 30,3,"aaa","aaa",mqtt_data_rx_cb);	
 
-//    iot_mqtt_init(Iot_mqtt,host,port, client, user, pass,30,3,"aaa","aaa",mqtt_data_rx_cb);	
+    iot_aliyun_mqtt_one_type_one_secret_unregin_connect_init(Iot_mqtt,device, regn->clientId, regn->deviceToken, 30,3,"aaa","aaa",mqtt_data_rx_cb);
+
+//    iot_mqtt_init(Iot_mqtt,host,port, client, user, pass,30,3,"aaa","aaa",mqtt_data_rx_cb);
 
     mqtt_will_msg_set(Iot_mqtt, will_msg, strlen(will_msg));	//设置遗嘱
 
-    set_mqtt_t(Iot_mqtt);    
+    set_mqtt_t(Iot_mqtt);
     ret = mqtt_device_connect(Iot_mqtt);						//初始化并连接mqtt服务器
-    
+
 
     while (ret < 0 && retry_count <= 5) {
         printf("ret = %d\r\n", ret);
@@ -155,7 +157,7 @@
     if(ret < 0 && retry_count > 5)
     {
         printf("reconnect times more than 5 exit\n");
-        return NULL;
+        return -1;
     }
     retry_count = 0;
 
@@ -167,7 +169,7 @@
         return 0;
     }
     gateway.iotstatus = IOT_STATUS_CONNECT;
-    
+
     pthread_create(&thread_ID, NULL, &mqtt_thread, (void *)Iot_mqtt);	//创建一个线程执行mqtt客户端
     pthread_detach(thread_ID);	//设置线程结束收尸
 
diff --git a/mbtk/test/libmbtk_mqtt/mbtk_mqtt_test.c b/mbtk/test/libmbtk_mqtt/mbtk_mqtt_test.c
index 5d99258..684878f 100755
--- a/mbtk/test/libmbtk_mqtt/mbtk_mqtt_test.c
+++ b/mbtk/test/libmbtk_mqtt/mbtk_mqtt_test.c
@@ -11,6 +11,7 @@
 #include "fcntl.h"
 #include "mbtk_sock2.h"
 
+void iot_yield(Cloud_MQTT_t *piot_mqtt,iot_device_info_t *gateway);
 
 struct opts_struct opts = {
     (char *)"iot-dev", 0, (char *)"\n", QOS0, "admin", "password", (char *)"localhost", 1883, 0
@@ -70,7 +71,7 @@
         printf("input error.\n example:./mqtt_test 192.168.1.1 8080 clientid username password\n");
         return 0;
     }
-    int ret, len;
+    int ret ;
     char will_msg[256] = {"hello world"};						//初始化遗嘱数据
     static int retry_count = 0;
     pthread_t thread_ID;      //定义线程id
@@ -96,7 +97,7 @@
     if(ret < 0 && retry_count > 5)
     {
         printf("reconnect times more than 5 exit\n");
-        return NULL;
+        return -1;
     }
     retry_count = 0;
 
diff --git a/mbtk/test/libmbtk_ril/mbtk_info_test.c b/mbtk/test/libmbtk_ril/mbtk_info_test.c
index 116fd4f..5f6135c 100755
--- a/mbtk/test/libmbtk_ril/mbtk_info_test.c
+++ b/mbtk/test/libmbtk_ril/mbtk_info_test.c
@@ -108,7 +108,7 @@
 	uint8 *ptr = (uint8*)data;
 		printf("3sms_state_change_cb() : %s\n", ptr);
 
-	struct SMS_Struct s = PDUDecoding(ptr);
+	struct SMS_Struct s = PDUDecoding((char*)ptr);
 	printf("服务中心地址: %s\n", s.SCA);
     printf("发送方地址: %s\n", s.OA);
     printf("服务中心时间戳: %s\n", s.SCTS);
@@ -134,9 +134,10 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#if 0
 static void test2(int is_ipv6, char *ip)
 {
-    char ipaddr[20] = {0};
+//    char ipaddr[20] = {0};
 	if(is_ipv6) {
         struct in6_addr sin_addr;
         if(inet_pton(AF_INET6, ip, &sin_addr) < 0) {
@@ -153,6 +154,7 @@
         }
 	}
 }
+#endif
 
 
 static void help()
@@ -414,7 +416,7 @@
 				{
                     printf("ptr == NULL\n");
                     list_node_t* cell_list = NULL;
-                    int type;
+                    mbtk_cell_type_enum type;
                     err = mbtk_cell_get(info_handle, &type, &cell_list);
                     if(err || cell_list == NULL) {
                         printf("Error : %d\n", err);
@@ -619,7 +621,7 @@
                     printf("Call success.\n");
                 }
             } else if(!strncasecmp(cmd, "hangup", 6)){
-                int phone_id;
+                int phone_id = 1;
                 if(!strcasecmp(cmd, "hangup")) { // hang up all
                     err = mbtk_call_hang(info_handle);
                     if(err) {
@@ -821,7 +823,7 @@
                         printf("APN Num:%d\n", apn_num);
                         int i = 0;
                         while(i < apn_num) {
-                            printf("APN : %d, %s, %s\n", apns[i].cid, apn2str(apns[i].ip_type), apns[i].apn);
+                            printf("APN : %d, %d, %s\n", apns[i].cid, apns[i].ip_type, apns[i].apn);
                             i++;
                         }
                     }
@@ -1000,7 +1002,7 @@
 				char mem[100] = {0};
                 char resp[100] = {0};
                 if(!strcasecmp(cmd, "cpms")) { // Get
-                    err = mbtk_sms_cpms_get(info_handle, &mem);
+                    err = mbtk_sms_cpms_get(info_handle, mem);
                     if(err) {
                         printf("Error : %d\n", err);
                     } else {
@@ -1317,7 +1319,7 @@
 #if 1
     while(1)
     {
-        sleep(1000 * 365 * 24 * 60 * 60);
+        sleep(365 * 24 * 60 * 60);
     }
 #else
     sleep(1);
diff --git a/mbtk/test/libmbtk_tcpip/mbtk_tcpip_test.c b/mbtk/test/libmbtk_tcpip/mbtk_tcpip_test.c
index d30d706..8a7d279 100755
--- a/mbtk/test/libmbtk_tcpip/mbtk_tcpip_test.c
+++ b/mbtk/test/libmbtk_tcpip/mbtk_tcpip_test.c
@@ -177,11 +177,15 @@
                 char type[10] = {0};
                 int read_cb_set;
                 memset(&info, 0x0, sizeof(mbtk_tcpip_info_t));
+                int ack_support,ssl_support,ignore_cert;
                 int count = sscanf(cmd, "link_open %d %s %d %d %s %s %d %d %d %d %d %d", &(info.link_id),
                                 info.ser_addr, &(info.ser_port), &(info.local_port), prot_type, type,
-                                &(info.ack_support), &(info.ssl_support), &(info.ignore_cert), &(info.heartbeat_time),
+                                &ack_support, &ssl_support, &ignore_cert, &(info.heartbeat_time),
                                 &(info.delay_time), &read_cb_set);
                 if(count == 12) {
+                    info.ack_support = (bool)ack_support;
+                    info.ssl_support = (bool)ssl_support;
+                    info.ignore_cert = (bool)ignore_cert;
                     if(!strncasecmp(prot_type, "UDP", 3)) {
                         info.prot_type = MBTK_SOCK_UDP;
                     } else {
@@ -327,7 +331,7 @@
 #if 1
     while(1)
     {
-        sleep(1000 * 365 * 24 * 60 * 60);
+        sleep(365 * 24 * 60 * 60);
     }
 #else
     sleep(1);
diff --git a/mbtk/test/libmbtk_tcpip/tcp_test.c b/mbtk/test/libmbtk_tcpip/tcp_test.c
index 51daace..550514b 100755
--- a/mbtk/test/libmbtk_tcpip/tcp_test.c
+++ b/mbtk/test/libmbtk_tcpip/tcp_test.c
@@ -14,6 +14,7 @@
 #include "mbtk_tcpip.h"
 #include "mbtk_log.h"
 
+#if 0
 
 static void help()
 {
@@ -86,7 +87,7 @@
         }
     }
 }
-
+#endif
 void tcpip_print_tcp_info(mbtk_tcpip_tcp_state_info_s *info)
 {
     printf("Link - %d\n", info->link_id);
@@ -116,17 +117,17 @@
 
     printf(">>>>>>>>>>>START TCP TEST>>>>>>>>>>>>>\r\n");
     mbtk_tcpip_err_enum err;
-        
+
     mbtk_tcpip_info_t info;
     memset(&info, 0x0, sizeof(mbtk_tcpip_info_t));
     char *ip = "www.chaixiongfeng.group";
-    strcpy(&info.ser_addr,ip);
+    strcpy(info.ser_addr,ip);
     info.link_id=1;
     info.ser_port =45002;
     info.prot_type = MBTK_SOCK_TCP;
     info.tcpip_type = MBTK_TCPIP_TYPE_CLIENT;
     info.read_cb = NULL;
-        
+
 
     err = mbtk_tcpip_sock_open((const mbtk_tcpip_info_t*)(&info));
     if(err == MBTK_TCPIP_ERR_SUCCESS) {
@@ -135,42 +136,42 @@
         printf("Link open fail:%d\n", err);
         return 0;
     }
-    
+
     while(1)
     {
         char *data="stargcharge connect\r\n";
         int len = mbtk_tcpip_send(1, data, strlen(data), NULL, 0);
-        if(len == strlen(data)) 
+        if(len == strlen(data))
         {
             printf("Send success:%d.\n", len);
-        } 
-        else 
+        }
+        else
         {
             printf("Send fail:%d/%d\n", len, strlen(data));
         }
 
         char buff[128];
         len = mbtk_tcpip_read(1, buff, 128);
-        if(len > 0) 
+        if(len > 0)
         {
             printf("RECV[%d]:%s\n", len, buff);
         }
-        else 
+        else
         {
             printf("RECV fail:%d\n", len);
         }
 
         err = mbtk_tcpip_sock_close(1);
-        if(err == MBTK_TCPIP_ERR_SUCCESS) 
+        if(err == MBTK_TCPIP_ERR_SUCCESS)
         {
             printf("Link close success.\n");
-        } 
-        else 
+        }
+        else
         {
             printf("Link close fail:%d\n", err);
         }
         sleep(5);
-    }      
+    }
 }
 
 
diff --git a/mbtk/test/libmbtk_wifi/mbtk_wifi_test.c b/mbtk/test/libmbtk_wifi/mbtk_wifi_test.c
old mode 100644
new mode 100755
index 1842b2a..bc5a5a7
--- a/mbtk/test/libmbtk_wifi/mbtk_wifi_test.c
+++ b/mbtk/test/libmbtk_wifi/mbtk_wifi_test.c
@@ -2,8 +2,9 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
-
+#include "mbtk_utils.h"
 #define STA_BUF_SIZE 2048
 
 
@@ -71,10 +72,10 @@
         printf("Parse cmd fail.\n");
     }
 
-    system("udhcpc -i wlan0");
+    mbtk_system("udhcpc -i wlan0");
 
-    
-    
+
+
     return 0;
 }
 
diff --git a/mbtk/test/others/framebuffer_demo.c b/mbtk/test/others/framebuffer_demo.c
index 281e9ab..bc35a07 100755
--- a/mbtk/test/others/framebuffer_demo.c
+++ b/mbtk/test/others/framebuffer_demo.c
@@ -10,6 +10,8 @@
 #include <sys/mman.h>
 #include <math.h>
 
+#include "mbtk_utils.h"
+
 /**< \brief 根据实际情况修改，此处为unsigned short是565的屏，根据程序打印出的
     bits_per_pixel的值可以判断出输出格式是565还是888 */
 // typedef unsigned int color_t;
@@ -122,8 +124,8 @@
         return;
     }
 
-    read(fd , &filehead , sizeof(filehead));
-    read(fd , &infohead , sizeof(infohead));
+    mbtk_read(fd , &filehead , sizeof(filehead));
+    mbtk_read(fd , &infohead , sizeof(infohead));
     printf("bfType: 0x%x, bfSize: %d, bfOffBits: 0x%x\n", filehead.bfType, filehead.bfSize, filehead.bfOffBits);
 
     printf("biSize: %d, biWidth: %d, biHeight: %d\n", infohead.biSize, infohead.biWidth, infohead.biHeight);
@@ -155,11 +157,11 @@
     }
 
     printf("biSizeImage:%d, width_error: %d\n", infohead.biSizeImage, width_error);
-    read(fd , p_data , infohead.biSizeImage);
+    mbtk_read(fd , p_data , infohead.biSizeImage);
     p = p_data;
 
     int ret;
-    char data[24] = {0};
+    char data[100] = {0};
     int debug_fd = open("/data/debug_fb", O_RDWR|O_CREAT|O_TRUNC, 0644);
     if (debug_fd < 0) {
         printf("debug_fb open error\n");
@@ -168,7 +170,7 @@
     printf("height:%d, width:%d\n", infohead.biHeight, infohead.biWidth);
     for(j = infohead.biHeight - 1; j >= 0; j--) {
         for(i = 0; i < infohead.biWidth; i++) {
-            c = transform_func(p);
+            c = transform_func((char*)p);
             // c = *p;
             p += pixel_byte;
             // c = ((c >> 8) & 0x00ff) | ((c & 0x00ff) << 8);
diff --git a/mbtk/test/others/key_ev_demo.c b/mbtk/test/others/key_ev_demo.c
index 190e4a6..728b5d0 100755
--- a/mbtk/test/others/key_ev_demo.c
+++ b/mbtk/test/others/key_ev_demo.c
@@ -76,6 +76,7 @@
     return 0;
 }
 
+#if 0
 static void ev_exit(void)
 {
     while (ev_count > 0)
@@ -83,6 +84,7 @@
         close(ev_fds[--ev_count].fd);
     }
 }
+#endif
 
 /* wait: 0 dont wait; -1 wait forever; >0 wait ms */
 static int ev_get(struct input_event *ev, int wait_ms)
diff --git a/mbtk/test/others/mbtk_debug_test.c b/mbtk/test/others/mbtk_debug_test.c
index 3057abf..39c8105 100755
--- a/mbtk/test/others/mbtk_debug_test.c
+++ b/mbtk/test/others/mbtk_debug_test.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <pthread.h>
 
 #include "mbtk_log.h"
 #include "mbtk_utils.h"
@@ -7,7 +8,7 @@
 void test3()
 {
     printf("%s start\n", __FUNCTION__);
-    char *ptr = 10;
+    char *ptr = (char*)10;
     *ptr = 'a';
     printf("%s end\n", __FUNCTION__);
 }
diff --git a/mbtk/test/others/mbtk_gnss_cli.c b/mbtk/test/others/mbtk_gnss_cli.c
index 8699a39..825d501 100755
--- a/mbtk/test/others/mbtk_gnss_cli.c
+++ b/mbtk/test/others/mbtk_gnss_cli.c
@@ -27,6 +27,7 @@
 #include "mbtk_log.h"
 #include "mbtk_type.h"
 #include "mbtk_gnss.h"
+#include "mbtk_utils.h"
 
 #define GNSS_SOCK_PATH "/tmp/mbtk_gnss_sock"
 
@@ -81,15 +82,15 @@
     } else if(cmd == GNSS_CMD_DEINIT) {
         sprintf(buff, "gnss_deinit");
     } else if(cmd == GNSS_CMD_SETTING) {
-        sprintf(buff, "gnss_setting:%s", arg);
+        sprintf(buff, "gnss_setting:%s", (char*)arg);
     } else if(cmd == GNSS_CMD_DL) {
-        sprintf(buff, "gnss_dl:%s", arg);
+        sprintf(buff, "gnss_dl:%s", (char*)arg);
     } else {
         printf("Unknown cmd.\n");
         return -1;
     }
 
-    write(sock_listen_fd, buff, strlen(buff));
+    mbtk_write(sock_listen_fd, buff, strlen(buff));
 
     int len = 0;
     char *rsp = NULL;
diff --git a/mbtk/test/others/partition_write_demo.c b/mbtk/test/others/partition_write_demo.c
index 1256d75..5edfa2d 100755
--- a/mbtk/test/others/partition_write_demo.c
+++ b/mbtk/test/others/partition_write_demo.c
@@ -3,6 +3,7 @@
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 int main(int argc, char *argv[])
 {
@@ -20,11 +21,11 @@
 
     while((len = write(fd, buffer, sizeof(buffer))) > 0){
         count += len;
-        printf("write : %d\n", count);
+        printf("write : %ld\n", count);
         //usleep(1000);
     }
 
-    printf("Write complete,len = %d, errno = %d\n", len, errno);
+    printf("Write complete,len = %ld, errno = %d\n", len, errno);
 
     close(fd);
 #else
diff --git a/mbtk/test/others/proc_demo.c b/mbtk/test/others/proc_demo.c
index 7712b4c..929984c 100755
--- a/mbtk/test/others/proc_demo.c
+++ b/mbtk/test/others/proc_demo.c
@@ -11,7 +11,7 @@
 
 void test(int c)
 {
-    int d = 10;
+//    int d = 10;
     //printf("函数参数：test_c = %p, 局部变量：d = %p\n", &c, &d);
 }
 
diff --git a/mbtk/test/others/touch_ev_demo.c b/mbtk/test/others/touch_ev_demo.c
index b7ae90d..133384b 100755
--- a/mbtk/test/others/touch_ev_demo.c
+++ b/mbtk/test/others/touch_ev_demo.c
@@ -20,6 +20,8 @@
 #include <dirent.h>
 #include <stdbool.h>
 
+// #include "mbtk_log.h"
+
 #ifndef TRUE
 #define TRUE   1   /* Boolean true value. */
 #endif
@@ -234,7 +236,7 @@
 void ev_dispatch(void)
 {
     unsigned n;
-    int ret;
+//    int ret;
 
     for (n = 0; n < ev_count; n++) {
         ev_callback cb = ev_fdinfo[n].cb;
@@ -356,7 +358,7 @@
 
 int main(int argc, char *argv[])
 {
-    mbtk_log_init(NULL, "MBTK_EVENT");
+    // mbtk_log_init(NULL, "MBTK_EVENT");
 
     if(ev_init(NULL)) {
         LOGE("ev_init() fail.");
diff --git a/mbtk/test/others/usb_check.c b/mbtk/test/others/usb_check.c
index 9aa5ebf..7a8fc43 100755
--- a/mbtk/test/others/usb_check.c
+++ b/mbtk/test/others/usb_check.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <signal.h>
 #include <fcntl.h>
+#include <string.h>
 
 #include "mbtk_utils.h"
 
@@ -26,8 +27,8 @@
         while(running){
             memset(buff, 0, 1024);
             if(mbtk_cmd_line("cat /sys/class/android_usb/android0/state", buff, 1024)) {
-                write(fd, buff, strlen(buff));
-                write(fd, "\n", 1);
+                mbtk_write(fd, buff, strlen(buff));
+                mbtk_write(fd, "\n", 1);
             }
             sleep(1);
         }
