diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
index 8979e97..f16a2eb 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
@@ -1129,7 +1129,6 @@
         return -1;
     }
     gnss_log("curent dev: %s, fd: %d \n", dev, fd);
-    printf("curent dev: %s, fd: %d \n", dev, fd);
     if(baudrate) {
         gnss_log("set baudrate: %d \n", baudrate);
         ret = set_baudrate(fd, baudrate);
@@ -1188,9 +1187,26 @@
     return -1; 
 }
 
-static int mopen_gnss_read(int fd, char* buf, unsigned int buf_len)
+static int mopen_gnss_read(int fd, char* buf, unsigned int buf_len, int timeout_ms)
 {
     buf_len=(buf_len > MBTK_UART_RECV_BUFFER_SIZE ? MBTK_UART_RECV_BUFFER_SIZE : buf_len);
+    fd_set read_fds;
+    struct timeval tv;
+    int retval;
+
+    tv.tv_sec = timeout_ms / 1000;
+    FD_ZERO(&read_fds);
+    FD_SET(fd, &read_fds);
+    retval = select(fd + 1, &read_fds, NULL, NULL, &tv);
+    
+    if (retval == -1)
+        return -1;
+    else if (retval == 0)
+    {
+        ALOGE("read timeout\n");
+        return -2;
+    }
+
     return read(fd, buf, buf_len);
 }
 
@@ -1287,7 +1303,9 @@
         if(nmea_state == 1)
         {
             nmea_reading = 1;
-            ret = mopen_gnss_read(gnss_handle->dev_fd, buf, MBTK_UART_RECV_BUFFER_SIZE);
+            ret = mopen_gnss_read(gnss_handle->dev_fd, buf, MBTK_UART_RECV_BUFFER_SIZE,5000);
+            if (ret == -2)
+                continue;
             if(gnsslog_state)
             {
                 //write_gnss_log(buf, ret);
@@ -1501,6 +1519,7 @@
     memset(mbtk_gnss_handle, 0, sizeof(struct mbtk_gnss_handle_t));
     memset(&mopen_gnss_device_info, 0, sizeof(mopen_gnss_device_info));
     mbtk_gnss_handle->dev_fd = mopen_gnss_open(MBTK_GNSS_DEV, B115200);
+
     mbtk_gnss_handle->rb = (char*)malloc(MBTK_UART_RECV_BUFFER_SIZE);
     if(NULL == mbtk_gnss_handle->rb)
     {
@@ -1543,11 +1562,12 @@
 {
     int ret;
 
-    if (kill) {
-        ALOGE("GNSS hardware issues\n");
-        ret = pthread_cancel(pid);
-        pthread_join(pid, NULL);
-    }
+    // if (kill) {
+    //     ALOGE("GNSS hardware issues\n");
+    //     ret = pthread_cancel(pid);
+    //     pthread_join(pid, NULL);
+    //     return 0;
+    // }
     do{
         ret = pthread_kill(pid, 0);
         if(ret == ESRCH)
