Merge #2874 into sdk650pathc0423 from refs/changes/2874/head 2875/target/1
authorsnickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Sat, 6 Dec 2025 09:12:38 +0000 (09:12 +0000)
committersnickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Sat, 6 Dec 2025 09:12:38 +0000 (09:12 +0000)
Code review from snickersun@163.com

* refs/changes/2874/head: (8 commits squashed)

  - 增加产测模式打印

  - Merge branch &#39;sdk650pathc0423&#39; of codeup.aliyun.com:64191456b9581d62e8f81ac0/FD230 into sdk650pathc0423

  - 最新EG800AK固件

  - Merge branch &#39;sdk650pathc0423&#39; of codeup.aliyun.com:64191456b9581d62e8f81ac0/FD230 into sdk650pathc0423

  - Merge branch &#39;sdk650pathc0423&#39; of codeup.aliyun.com:64191456b9581d62e8f81ac0/FD230 into sdk650pathc0423

  - relase LN V1.0.13 添加产测信息

  - Merge branch &#39;sdk650pathc0423&#39; of codeup.aliyun.com:64191456b9581d62e8f81ac0/FD230 into sdk650pathc0423

  - 低功耗优化:
    1、添加 PM_ID_CAT1_APP ,所有ln http相关,gnss http相关都改为使用这个新添加的投票。
    2、默认不打印sio日志需要用AT^SIODEBUG开启
    3、优化slipif_thread
    4、开启 LWIP_LOWPOWER 1

Signed-off-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Merged-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/2874
20 files changed:
autobuild.sh
code/sdk/middleware/chips/brandy/pm/include/pm_definition.h
code/sdk/middleware/chips/brandy/pm/pm.c
code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/arch/sio.c
code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h
code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/netif/slipif.c
code/sdk/zhihui/4g/cat1Service/include/cat1_porting.h
code/sdk/zhihui/4gTest/cat1_porting.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_device_info.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_emoji.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_speech_chat.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_story_choose.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_story_exit.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_story_finish.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_story_random.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_timeline_activities.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_token.c
code/sdk/zhihui/services/gnss/src/gnss_http_server.c
code/sdk/zhihui/utils/custom_utils_at_cmd.c

index 9a258d6..9d5d71c 100644 (file)
@@ -59,7 +59,7 @@ declare -A PROJECT_VERSIONS=(
     ["w9"]="1.3.107" 
     ["lt22"]="1.3.107"
     ["n9"]="1.3.112"
-    ["ln"]="1.0.12"
+    ["ln"]="1.0.13"
     ["lnppp"]="1.1.1"
     ["n9ln"]="1.0.0" 
     
index dc8745e..f32cd89 100644 (file)
@@ -48,6 +48,7 @@ typedef enum {
     PM_ID_MOTOR,//新增,马达
     PM_ID_GSENSOR,//新增,加速计
     PM_ID_CAT1,//Cat1 communication
+    PM_ID_CAT1_APP,//Cat1APP communication
     PM_ID_P_TEST,//产测
     PM_ID_BUTTON_GPIO,//gpio按键
     PM_ID_BP,//血压
index 1ab7b5d..961967b 100644 (file)
@@ -243,13 +243,16 @@ const char* pm_id_name_arr[] ={
     "PM_ID_SPI_DMA",
     "PM_ID_I2C_DMA",
     "PM_ID_UART_DMA",
-    "PM_ID_HEART",//����������оƬ
-    "PM_ID_MOTOR",//����������
-    "PM_ID_GSENSOR",//���������ټ�
+    "PM_ID_HEART",//新增,心率芯片
+    "PM_ID_MOTOR",//新增,马达
+    "PM_ID_GSENSOR",//新增,加速计
     "PM_ID_CAT1",//Cat1 communication
-    "PM_ID_P_TEST",
-    "PM_ID_BUTTON_GPIO",//GPIO����
-    "PM_ID_4G_AI",//AI投票
+    "PM_ID_CAT1_APP",//Cat1APP communication
+    "PM_ID_P_TEST",//产测
+    "PM_ID_BUTTON_GPIO",//gpio按键
+    "PM_ID_BP",//血压
+    "PM_ID_4G_AI",//4g AI
+    "PM_ID_GPS",//4g AI
 #ifdef SUPPORT_ALIPAY_SEC
     "PM_ID_ALIPAY",//支付宝
 #endif
index 1d63274..912acfc 100644 (file)
 #define SIO_IRQ_PROCESS_TASK_PRIO  24    // 处理线程优先级
 #define SIO_IRQ_PROCESS_STACK_SIZE 4096  // 处理线程栈大小
 
-/* CAT1 vote 管理配置(与PPP保持一致) */
-#ifdef SUPPORT_CAT1_SERVICE
-#define SIO_CAT1_VOTE_IDLE_MS      3000  // 3秒空闲后移除CAT1 vote
-#endif
+
 
 /* 乒乓缓冲区状态 */
 typedef enum {
@@ -132,6 +129,11 @@ static struct {
     .rx_buffer_size = SIO_UART_RX_BUFFER_SIZE
 };
 
+static bool g_sio_debug_enabled = false;
+void sio_set_debug_enabled(bool debug_enabled)
+{
+    g_sio_debug_enabled = debug_enabled;
+}
 /* SIO UART state */
 static bool g_sio_uart_initialized = false;
 
@@ -165,15 +167,7 @@ static sio_stats_t g_sio_stats = {0};
 /* 数据处理回调函数指针 - 用于将数据传递给SLIP */
 static void (*g_sio_data_callback)(const uint8_t *data, uint32_t len) = NULL;
 
-#ifdef SUPPORT_CAT1_SERVICE
-/* CAT1 vote 状态管理(与PPP保持一致) */
-static volatile bool g_sio_cat1_vote_added = false;
-static volatile uint32_t g_sio_last_rx_time_ms = 0;  // 最后接收数据时间
 
-/* 外部函数声明(CAT1 API) */
-extern void cat1_api_add_cat1_vote(void);
-extern void cat1_api_remove_cat1_vote(void);
-#endif
 
 /* 内部函数声明 */
 static uint32_t sio_get_current_time_ms(void);
@@ -313,7 +307,7 @@ static void sio_timeout_timer_callback(unsigned long arg)
     
     // 每333次(约10秒)打印一次完整统计信息
     // 30ms * 333 ≈ 10秒
-    if ((timer_call_count % 333) == 0) {
+    if ((timer_call_count % 333) == 0 && g_sio_debug_enabled) {
         sio_print_stats();
     }
     
@@ -326,20 +320,7 @@ static void sio_timeout_timer_callback(unsigned long arg)
     // ⚠️ 更新全局时间戳(供ISR使用,ISR中不能调用时间函数)
     g_sio_timer_timestamp_ms = current_time;
     
-#ifdef SUPPORT_CAT1_SERVICE
-    // ✅ CAT1 vote 管理:检测 idle 状态,超过阈值时移除 vote
-    if (g_sio_cat1_vote_added) {
-        if (g_sio_last_rx_time_ms > 0) {
-            uint32_t idle_time = current_time - g_sio_last_rx_time_ms;
-            if (idle_time >= SIO_CAT1_VOTE_IDLE_MS) {
-                // 空闲时间超过阈值,移除 vote 允许 CAT1 休眠
-                cat1_api_remove_cat1_vote();
-                g_sio_cat1_vote_added = false;
-                printf("[SIO_CAT1_VOTE] Removed vote after %ums idle\n", idle_time);
-            }
-        }
-    }
-#endif
+
     
     if (g_sio_ping_pong_buffers == NULL) {
         goto restart_timer;
@@ -434,16 +415,7 @@ static void sio_uart_rx_interrupt_handler(const void *buffer, uint16_t length, b
     g_sio_stats.total_interrupts++;
     g_sio_stats.total_bytes_received += length;
     
-#ifdef SUPPORT_CAT1_SERVICE
-    // ✅ 更新最后接收时间(用于空闲检测)
-    g_sio_last_rx_time_ms = g_sio_timer_timestamp_ms;
-    
-    // ✅ CAT1 vote 管理:接收数据时添加 vote(保持 CAT1 唤醒)
-    if (!g_sio_cat1_vote_added) {
-        cat1_api_add_cat1_vote();
-        g_sio_cat1_vote_added = true;
-    }
-#endif
+
     
     uint8_t current_idx = g_sio_current_buffer_index;
     sio_ping_pong_buffer_t *current_buffer = &g_sio_ping_pong_buffers[current_idx];
@@ -637,11 +609,7 @@ errcode_t sio_interrupt_enable(void (*data_callback)(const uint8_t *data, uint32
     }
     g_sio_current_buffer_index = 0;
     
-#ifdef SUPPORT_CAT1_SERVICE
-    // 初始化 CAT1 vote 状态
-    g_sio_cat1_vote_added = false;
-    g_sio_last_rx_time_ms = 0;
-#endif
+
     
     printf("[SIO] Allocated %d x %d bytes = %.2f KB total\n", 
            SIO_PING_PONG_BUFFER_COUNT, SIO_PING_PONG_BUFFER_SIZE,
@@ -842,15 +810,7 @@ errcode_t sio_interrupt_disable(void)
     // 6. 清零统计
     memset(&g_sio_stats, 0, sizeof(sio_stats_t));
     
-#ifdef SUPPORT_CAT1_SERVICE
-    // 7. 清理 CAT1 vote(如果之前添加过)
-    if (g_sio_cat1_vote_added) {
-        cat1_api_remove_cat1_vote();
-        g_sio_cat1_vote_added = false;
-        printf("[SIO] CAT1 vote removed during disable\n");
-    }
-    g_sio_last_rx_time_ms = 0;
-#endif
+
     
     g_sio_interrupt_enabled = false;
     g_sio_irq_process_task = 0;
@@ -868,14 +828,6 @@ void sio_print_stats(void)
 {
     printf("=== SIO Interrupt Statistics (Ping-Pong Mode) ===\n");
     printf("Interrupt Status: %s\n", g_sio_interrupt_enabled ? "ENABLED" : "DISABLED");
-#ifdef SUPPORT_CAT1_SERVICE
-    printf("CAT1 Vote Status: %s\n", 
-           g_sio_cat1_vote_added ? "ADDED (awake)" : "REMOVED (sleep)");
-    if (g_sio_last_rx_time_ms > 0) {
-        uint32_t idle_time = sio_get_current_time_ms() - g_sio_last_rx_time_ms;
-        printf("RX Idle Time: %u ms\n", idle_time);
-    }
-#endif
     printf("Ping-Pong Buffers: %d x %d bytes = %d KB total\n", 
            SIO_PING_PONG_BUFFER_COUNT, SIO_PING_PONG_BUFFER_SIZE,
            (SIO_PING_PONG_BUFFER_COUNT * SIO_PING_PONG_BUFFER_SIZE) / 1024);
index a8a09af..f0ff4d6 100644 (file)
@@ -114,6 +114,7 @@ struct slipif_priv {
 #if SLIP_RX_FROM_ISR
   struct pbuf *rxpackets;
   sys_mutex_t rxqueue_mutex;  // 接收队列互斥锁
+  sys_sem_t rxqueue_sem;      // 接收队列信号量,用于唤醒处理线程
 #endif
 };
 
@@ -497,7 +498,6 @@ slipif_loop_thread(void *nf)
   u8_t c;
   LWIP_DEBUGF(SLIP_DEBUG, ("slipif_loop_thread: started, netif=%p, priv=%p, sd=%p\n", 
                            netif, priv, priv->sd));
-  
   while (1) {
     /* 检查线程运行状态,如果被挂起则进入长时间休眠 */
     if (!slipif_thread_running) {
@@ -506,20 +506,27 @@ slipif_loop_thread(void *nf)
     }
     // printf("slipif_loop_thread \n");
 #if SLIP_RX_FROM_ISR
-    /* 处理接收队列 */
-    u16_t processed_count = slipif_process_rxqueue(netif);
+    /* 使用信号量等待数据包到达,超时时间500ms作为保底检查 */
+    u32_t wait_result = sys_arch_sem_wait(&priv->rxqueue_sem, 500);
     
-    /* 简化的休眠策略:根据处理结果决定休眠时间 */
-    if (processed_count == 0) {
-      /* 没有数据包处理,长时间休眠 */
-      LOS_Msleep(50);  /* 50ms休眠,减少CPU占用 */
-    } else if (processed_count < 5) {
-      /* 处理少量数据包,中等时间休眠 */
-      LOS_Msleep(20);  /* 20ms休眠 */
-    } else {
-      /* 处理大量数据包,短暂休眠 */
-      LOS_Msleep(5);   /* 5ms休眠 */
+    if (wait_result == SYS_ARCH_TIMEOUT) {
+      /* 超时:可能是长时间无数据,进行一次检查后继续等待 */
+      slipif_process_rxqueue(netif);
+      continue;
     }
+    
+    /* 有数据包到达,持续处理直到队列为空 */
+    u16_t processed_count;
+    const u16_t MAX_PACKETS_PER_CALL = 10;  // 与 slipif_process_rxqueue 中的常量保持一致
+    do {
+      processed_count = slipif_process_rxqueue(netif);
+      if (processed_count > 0) {
+        /* 如果处理了最大数量的包,可能还有更多数据,短暂休眠后继续处理 */
+        if (processed_count >= MAX_PACKETS_PER_CALL) {
+          LOS_Msleep(1);  // 短暂休眠,让其他任务有机会运行
+        }
+      }
+    } while (processed_count > 0);
 #else
     if (sio_tryread(priv->sd, &c, 1) > 0) {
       LWIP_DEBUGF(SLIP_DEBUG, ("slipif_loop_thread: received byte 0x%02x\n", c));
@@ -581,6 +588,12 @@ slipif_init(struct netif *netif)
     mem_free(priv);
     return ERR_MEM;
   }
+  if (sys_sem_new(&priv->rxqueue_sem, 0) != ERR_OK) {
+    LWIP_DEBUGF(SLIP_DEBUG, ("ERROR: slipif_init: failed to create rxqueue_sem\n"));
+    sys_mutex_free(&priv->rxqueue_mutex);
+    mem_free(priv);
+    return ERR_MEM;
+  }
 #endif
   
   LWIP_DEBUGF(SLIP_DEBUG, ("slipif_init: netif configured, name=%c%c, flags=0x%x\n", 
@@ -592,6 +605,7 @@ slipif_init(struct netif *netif)
     /* opening the serial device failed, free priv and return */
     printf("ERROR: slipif_init: sio_open failed for SLIP_IFNUM=%d\n", SLIP_IFNUM);
 #if SLIP_RX_FROM_ISR
+    sys_sem_free(&priv->rxqueue_sem);
     sys_mutex_free(&priv->rxqueue_mutex);
 #endif
     mem_free(priv);
@@ -883,6 +897,9 @@ slipif_rxbyte_enqueue(struct netif *netif, u8_t data)
     priv->rxpackets = p;
     sys_mutex_unlock(&priv->rxqueue_mutex);
     
+    /* 发送信号量唤醒处理线程 */
+    sys_sem_signal(&priv->rxqueue_sem);
+    
     LWIP_DEBUGF(SLIP_DEBUG, ("slipif_rxbyte_enqueue: enqueued pbuf 0x%p, rxpackets now 0x%p\n", p, priv->rxpackets));
   }
 }
index 6056377..dc5b35d 100644 (file)
@@ -24,7 +24,14 @@ void cat1_api_remove_cat1_vote(void);
  * @brief 用户实现,在cat1指令执行前,添加投票
 */
 void cat1_api_add_cat1_vote(void);
-
+/**
+ * @brief 用户实现,在cat1指令执行前,添加投票
+*/
+void cat1_api_remove_cat1_app_vote(void);
+/**
+ * @brief 用户实现,在cat1指令执行前,添加投票
+*/
+void cat1_api_add_cat1_app_vote(void);
 /**
  * @brief 用户自行实现,电话开始时切换语音通路
  * @return 0 success
index 37ce8d1..28f94cf 100644 (file)
@@ -98,6 +98,26 @@ void cat1_api_add_cat1_vote(void)
     cat1_print_dbg("\r\nCAT1 SERVICE MCU WAKEUP SUCCESS\r\n");
 }
 
+void cat1_api_remove_cat1_app_vote(void)
+{
+    uint8_t cnt = pm_veto_get_id_cnt(PM_ID_CAT1_APP);
+    if (cnt == 1) {
+        uapi_pm_remove_sleep_veto(PM_ID_CAT1_APP);
+    } else {
+        // cat1_print_dbg("CAT1 SERVICE MCU has delete pm_id_cat1 vote\r\n");
+    }
+    cat1_print_dbg("\r\nCAT1 APP VOTE REMOVE SUCCESS\r\n");
+}
+void cat1_api_add_cat1_app_vote(void)
+{
+    uint8_t cnt = pm_veto_get_id_cnt(PM_ID_CAT1_APP);
+    if (cnt == 0) {
+        uapi_pm_add_sleep_veto(PM_ID_CAT1_APP);
+    } else {
+        // cat1_print_dbg("CAT1 SERVICE MCU has got pm_id_cat1 vote\r\n");
+    }
+    cat1_print_dbg("\r\nCAT1 APP VOTE ADD SUCCESS\r\n");
+}
 static uint8_t cat1_voice=0;
 
 uint8_t cat1_api_get_cat1_volte_voice_state(void)
index 8ba68f3..1e39d5a 100644 (file)
@@ -473,7 +473,7 @@ uint32_t ln_device_get_character_http(const char *device_id,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 保活 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(200);
 #endif
@@ -487,7 +487,7 @@ uint32_t ln_device_get_character_http(const char *device_id,
     if (!header_buf)
     {
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -500,7 +500,7 @@ uint32_t ln_device_get_character_http(const char *device_id,
     {
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -514,7 +514,7 @@ uint32_t ln_device_get_character_http(const char *device_id,
         printf("device getCharacter prepare failed %d\n", prep);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -543,7 +543,7 @@ end:
     HttpClientClse(&client);
     free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
 #endif
     return ERRCODE_SUCC;
 }
@@ -557,7 +557,7 @@ uint32_t ln_device_get_user_id_http(const char *device_id,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 保活 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(200);
 #endif
@@ -571,7 +571,7 @@ uint32_t ln_device_get_user_id_http(const char *device_id,
     if (!header_buf2)
     {
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -584,7 +584,7 @@ uint32_t ln_device_get_user_id_http(const char *device_id,
     {
         free(header_buf2);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -598,7 +598,7 @@ uint32_t ln_device_get_user_id_http(const char *device_id,
         printf("device getUserId prepare failed %d\n", prep);
         free(header_buf2);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -664,7 +664,7 @@ end:
     HttpClientClse(&client);
     free(header_buf2);
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
 #endif
     return ERRCODE_SUCC;
 }
@@ -679,7 +679,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
     }
 
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(200);
 #endif
@@ -694,7 +694,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CHAT_STAMINA] malloc failed for header_buf");
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -708,7 +708,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         free(header_buf);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CHAT_STAMINA] snprintf failed for header_buf");
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -721,7 +721,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CHAT_STAMINA] prepare failed: %d", prep);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -734,7 +734,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         HttpClientClse(&client);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -748,7 +748,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         HttpClientClse(&client);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -760,7 +760,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         HttpClientClse(&client);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -784,7 +784,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         HttpClientClse(&client);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -803,7 +803,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         HttpClientClse(&client);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -818,7 +818,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         HttpClientClse(&client);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -850,7 +850,7 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
     HttpClientClse(&client);
     free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
 #endif
     return ERRCODE_SUCC;
 }
\ No newline at end of file
index 3beb938..aa0b978 100644 (file)
@@ -1029,7 +1029,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[EMOJI_REPORT_STATUS] starting");
     // CAT1 保活
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(200);
 #endif
@@ -1043,7 +1043,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[EMOJI_REPORT_STATUS] malloc header_buf failed");
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1057,7 +1057,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
         free(header_buf);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[EMOJI_REPORT_STATUS] build header failed");
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1070,7 +1070,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[EMOJI_REPORT_STATUS] create root object failed");
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1086,7 +1086,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[EMOJI_REPORT_STATUS] print unformatted failed");
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1098,7 +1098,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
         free(header_buf);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[EMOJI_REPORT_STATUS] prepare auto failed");
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1122,7 +1122,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
         free(header_buf);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[EMOJI_REPORT_STATUS] request failed");
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1135,7 +1135,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
         free(header_buf);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[EMOJI_REPORT_STATUS] response code not 200");
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1165,7 +1165,7 @@ static uint32_t ln_emoji_report_status_http(const char *device_id,
     HttpClientUnprepare(&clientData);
     free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
 #endif
     return ERRCODE_SUCC;
 }
@@ -1178,13 +1178,13 @@ static uint32_t ln_emoji_report_all_http(const char *device_id,
     if (!device_id || !device_token || (!groups && group_count > 0) || group_count < 0)
     {
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
 
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(200);
 #endif
@@ -1199,7 +1199,7 @@ static uint32_t ln_emoji_report_all_http(const char *device_id,
     if (!header_buf)
     {
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1212,7 +1212,7 @@ static uint32_t ln_emoji_report_all_http(const char *device_id,
     {
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1224,7 +1224,7 @@ static uint32_t ln_emoji_report_all_http(const char *device_id,
     {
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1234,7 +1234,7 @@ static uint32_t ln_emoji_report_all_http(const char *device_id,
         cJSON_Delete(root);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -1258,7 +1258,7 @@ static uint32_t ln_emoji_report_all_http(const char *device_id,
     {
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
index b42af78..cca83d1 100644 (file)
@@ -507,7 +507,7 @@ uint32_t ln_ota_get_task_http(const char *device_id,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 保活 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(200);
 #endif
@@ -525,7 +525,7 @@ uint32_t ln_ota_get_task_http(const char *device_id,
     if (!header_buf)
     {
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -542,7 +542,7 @@ uint32_t ln_ota_get_task_http(const char *device_id,
     {
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -554,7 +554,7 @@ uint32_t ln_ota_get_task_http(const char *device_id,
         printf("[OTA] getTask prepare failed %d\n", prep);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -567,7 +567,7 @@ uint32_t ln_ota_get_task_http(const char *device_id,
         HttpClientUnprepare(&clientData);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -580,7 +580,7 @@ uint32_t ln_ota_get_task_http(const char *device_id,
         free(header_buf);
         free(url_with_params);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         return ERRCODE_FAIL;
     }
@@ -620,7 +620,7 @@ end:
     if (url_with_params)
         free(url_with_params);
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
 #endif
     return ERRCODE_SUCC;
 }
@@ -646,7 +646,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 网络保活处理 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(500); // 等待模块就绪
 #endif
@@ -681,7 +681,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
         {
             printf("[OTA] local file already complete: %lld >= %d\n", resume_offset, total_size);
             #ifdef SUPPORT_CAT1_SERVICE
-            cat1_api_remove_cat1_vote();
+            cat1_api_remove_cat1_app_vote();
             #endif
             uapi_ln_remove_vote();
             return 0; // 视为已完成
@@ -694,7 +694,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
     {
         printf("[OTA] fopen failed for %s:\n", save_path);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         uapi_ln_remove_vote();
         return -1;
@@ -706,7 +706,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
         printf("[OTA] range prepare failed: %d\n", prep);
         fclose(fd);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         uapi_ln_remove_vote();
         return -1;
@@ -722,7 +722,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
             HttpClientUnprepare(&client_data);
             fclose(fd);
 #ifdef SUPPORT_CAT1_SERVICE
-            cat1_api_remove_cat1_vote();
+            cat1_api_remove_cat1_app_vote();
 #endif
             uapi_ln_remove_vote();
             return -1;
@@ -734,7 +734,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
             HttpClientUnprepare(&client_data);
             fclose(fd);
 #ifdef SUPPORT_CAT1_SERVICE
-            cat1_api_remove_cat1_vote();
+            cat1_api_remove_cat1_app_vote();
 #endif
             uapi_ln_remove_vote();
             return -1;
@@ -751,7 +751,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
         fclose(fd);
         HttpClientUnprepare(&client_data);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         uapi_ln_remove_vote();
         return ret;
@@ -767,7 +767,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
         fclose(fd);
         HttpClientUnprepare(&client_data);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         uapi_ln_remove_vote();
         return ret;
@@ -784,7 +784,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
         fclose(fd);
         HttpClientUnprepare(&client_data);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
         uapi_ln_remove_vote();
         return -1;
@@ -803,7 +803,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
             HttpClientClse(&client);
             HttpClientUnprepare(&client_data);
 #ifdef SUPPORT_CAT1_SERVICE
-            cat1_api_remove_cat1_vote();
+            cat1_api_remove_cat1_app_vote();
 #endif
             uapi_ln_remove_vote();
             return -1;
@@ -825,7 +825,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
             HttpClientClse(&client);
             HttpClientUnprepare(&client_data);
 #ifdef SUPPORT_CAT1_SERVICE
-            cat1_api_remove_cat1_vote();
+            cat1_api_remove_cat1_app_vote();
 #endif
             uapi_ln_remove_vote();
             return -1;
@@ -863,7 +863,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
                     HttpClientClse(&client);
                     HttpClientUnprepare(&client_data);
 #ifdef SUPPORT_CAT1_SERVICE
-                    cat1_api_remove_cat1_vote();
+                    cat1_api_remove_cat1_app_vote();
 #endif
                     uapi_ln_remove_vote();
                     return -1;
@@ -890,7 +890,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
                     HttpClientClse(&client);
                     HttpClientUnprepare(&client_data);
 #ifdef SUPPORT_CAT1_SERVICE
-                    cat1_api_remove_cat1_vote();
+                    cat1_api_remove_cat1_app_vote();
 #endif
                     uapi_ln_remove_vote();
                     return -1;
@@ -930,7 +930,7 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path,
     HttpClientClse(&client);
     HttpClientUnprepare(&client_data);
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
 #endif
     uapi_ln_remove_vote();
 
index a24e65c..987c878 100644 (file)
@@ -129,7 +129,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 保活 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(500);
 #endif
@@ -143,7 +143,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
     {
         free(body);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -158,7 +158,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
         free(body);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -172,7 +172,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
         free(body);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -193,7 +193,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
         HttpClientUnprepare(&clientData);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ret;
     }
@@ -207,7 +207,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
         HttpClientUnprepare(&clientData);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ret;
     }
@@ -221,7 +221,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
         HttpClientUnprepare(&clientData);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -248,7 +248,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
                     fclose(fd);
                     free(header_buf);
                     #ifdef SUPPORT_CAT1_SERVICE
-                    cat1_api_remove_cat1_vote();
+                    cat1_api_remove_cat1_app_vote();
                     #endif
                     return ERRCODE_FAIL;
                 }
@@ -273,7 +273,7 @@ uint32_t ln_speech_chat_stream_http(const char *device_id,
     fclose(fd);
     free(header_buf);
     #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
     #endif
 
 
index 5b23f83..c409054 100644 (file)
@@ -126,7 +126,7 @@ uint32_t ln_story_choose_http(const char *device_id,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 网络保活处理 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(500);
 #endif
@@ -140,7 +140,7 @@ uint32_t ln_story_choose_http(const char *device_id,
     {
         free(body);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -156,7 +156,7 @@ uint32_t ln_story_choose_http(const char *device_id,
         free(body);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -171,7 +171,7 @@ uint32_t ln_story_choose_http(const char *device_id,
         free(body);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -191,7 +191,7 @@ uint32_t ln_story_choose_http(const char *device_id,
         HttpClientUnprepare(&clientData);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ret;
     }
@@ -205,7 +205,7 @@ uint32_t ln_story_choose_http(const char *device_id,
         HttpClientUnprepare(&clientData);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ret;
     }
@@ -219,7 +219,7 @@ uint32_t ln_story_choose_http(const char *device_id,
         HttpClientUnprepare(&clientData);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -245,7 +245,7 @@ uint32_t ln_story_choose_http(const char *device_id,
                     fclose(fd);
                     free(header_buf);
                     #ifdef SUPPORT_CAT1_SERVICE
-                    cat1_api_remove_cat1_vote();
+                    cat1_api_remove_cat1_app_vote();
                     #endif
                     return ERRCODE_FAIL;
                 }
@@ -270,7 +270,7 @@ uint32_t ln_story_choose_http(const char *device_id,
     fclose(fd);
     free(header_buf);
     #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
     #endif
 
     return ERRCODE_SUCC;
index 686187b..fadbaef 100644 (file)
@@ -8,7 +8,7 @@ uint32_t ln_story_exit_inquiry_http(const char *device_id,
         return ERRCODE_FAIL;
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 保活 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(200);
 #endif
@@ -23,7 +23,7 @@ uint32_t ln_story_exit_inquiry_http(const char *device_id,
     if (!header_buf)
     {
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -35,7 +35,7 @@ uint32_t ln_story_exit_inquiry_http(const char *device_id,
     {
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -45,7 +45,7 @@ uint32_t ln_story_exit_inquiry_http(const char *device_id,
     if (prep != HTTP_SUCCESS)
     {
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -81,7 +81,7 @@ end:
     if (header_buf)
         free(header_buf);
     #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
     #endif
     return ERRCODE_SUCC;
 }
index 41fdced..e995e83 100644 (file)
@@ -9,7 +9,7 @@ uint32_t ln_story_finish_http(const char *device_id,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 保活 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(200);
 #endif
@@ -23,7 +23,7 @@ uint32_t ln_story_finish_http(const char *device_id,
     if (!header_buf)
     {
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -34,7 +34,7 @@ uint32_t ln_story_finish_http(const char *device_id,
     {
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -45,7 +45,7 @@ uint32_t ln_story_finish_http(const char *device_id,
     {
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -81,7 +81,7 @@ end:
     HttpClientClse(&client);
     free(header_buf);
     #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
     #endif
     return ERRCODE_SUCC;
 }
index 2d405d6..9586be5 100644 (file)
@@ -22,7 +22,7 @@ uint32_t ln_story_random_http(const char *device_id,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* CAT1 网络保活处理 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(500);
 #endif
@@ -45,7 +45,7 @@ uint32_t ln_story_random_http(const char *device_id,
     {
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -58,7 +58,7 @@ uint32_t ln_story_random_http(const char *device_id,
         printf("story random: prepare HTTP buffer failed (code: %d)\n", prep);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -74,7 +74,7 @@ uint32_t ln_story_random_http(const char *device_id,
             free(escaped_theme);
         free(header_buf);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -103,7 +103,7 @@ uint32_t ln_story_random_http(const char *device_id,
         free(json_body);
         free(escaped_theme);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -123,7 +123,7 @@ uint32_t ln_story_random_http(const char *device_id,
         free(escaped_theme);
         HttpClientUnprepare(&clientData);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ret;
     }
@@ -140,7 +140,7 @@ uint32_t ln_story_random_http(const char *device_id,
         free(escaped_theme);
         HttpClientUnprepare(&clientData);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ret;
     }
@@ -156,7 +156,7 @@ uint32_t ln_story_random_http(const char *device_id,
         free(escaped_theme);
         HttpClientUnprepare(&clientData);
         #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         #endif
         return ERRCODE_FAIL;
     }
@@ -184,7 +184,7 @@ uint32_t ln_story_random_http(const char *device_id,
                     free(escaped_theme);
                     HttpClientUnprepare(&clientData);
                     #ifdef SUPPORT_CAT1_SERVICE
-                    cat1_api_remove_cat1_vote();
+                    cat1_api_remove_cat1_app_vote();
                     #endif
                     return ERRCODE_FAIL;
                 }
@@ -210,7 +210,7 @@ uint32_t ln_story_random_http(const char *device_id,
     free(json_body);
     free(escaped_theme);
     #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
     #endif
     return ERRCODE_SUCC;
 }
index 4b6fa65..2e5b056 100644 (file)
@@ -62,7 +62,7 @@ uint32_t ln_timeline_get_status_http(const char *device_id,
                return ERRCODE_FAIL;
 
 #ifdef SUPPORT_CAT1_SERVICE
-       cat1_api_add_cat1_vote();
+       cat1_api_add_cat1_app_vote();
        cat1_api_disable_cat1_cmd(0);
        LOS_Msleep(200);
 #endif
@@ -77,7 +77,7 @@ uint32_t ln_timeline_get_status_http(const char *device_id,
        if (!header_buf)
        {
 #ifdef SUPPORT_CAT1_SERVICE
-               cat1_api_remove_cat1_vote();
+               cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
                return ERRCODE_FAIL;
@@ -91,7 +91,7 @@ uint32_t ln_timeline_get_status_http(const char *device_id,
        {
                free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-               cat1_api_remove_cat1_vote();
+               cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
                return ERRCODE_FAIL;
@@ -103,7 +103,7 @@ uint32_t ln_timeline_get_status_http(const char *device_id,
        {
                free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-               cat1_api_remove_cat1_vote();
+               cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
                return ERRCODE_FAIL;
@@ -130,7 +130,7 @@ end:
        HttpClientClse(&client);
        free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-       cat1_api_remove_cat1_vote();
+       cat1_api_remove_cat1_app_vote();
 #endif
        uapi_ln_remove_vote();
        return ERRCODE_SUCC;
index af2cd81..bab2abe 100644 (file)
@@ -285,7 +285,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
 
 #ifdef SUPPORT_CAT1_SERVICE
     /* 4. 保活CAT1,准备网络 */
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
     cat1_api_disable_cat1_cmd(0);
     LOS_Msleep(500);
 #endif
@@ -303,7 +303,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
         free(sign_data);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
         return ERRCODE_FAIL;
@@ -318,7 +318,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
         free(sign_data);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
         return ERRCODE_FAIL;
@@ -333,7 +333,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
         free(sign_data);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
         return ERRCODE_FAIL;
@@ -348,7 +348,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
         free(sign_data);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
         return ERRCODE_FAIL;
@@ -366,7 +366,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
         free(sign_data);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
         return ERRCODE_FAIL;
@@ -384,7 +384,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
         free(sign_data);
         free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
         return ERRCODE_FAIL;
@@ -402,7 +402,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
         HttpClientUnprepare(&clientData);
         HttpClientClse(&client);
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
 #endif
                uapi_ln_remove_vote();
         return ERRCODE_FAIL;
@@ -451,7 +451,7 @@ uint32_t ln_get_device_token_http(const char *device_id,
     free(sign_data);
     free(header_buf);
 #ifdef SUPPORT_CAT1_SERVICE
-    cat1_api_remove_cat1_vote();
+    cat1_api_remove_cat1_app_vote();
 #endif
        uapi_ln_remove_vote();
     return ERRCODE_SUCC;
index 29e06e0..5f992d9 100644 (file)
@@ -184,7 +184,7 @@ static void agnss_download_result_handler(const char *filename, HTTPC_RESULT res
             
             // HTTP请求失败,清理CAT1资源
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         cat1_api_keep_wakeup(0);
         cat1_api_wakeup_cat1(0);
 #endif
@@ -1707,7 +1707,7 @@ int download_agnss_files(void)
 #ifdef SUPPORT_CAT1_SERVICE
     cat1_api_wakeup_cat1(1);
     cat1_api_keep_wakeup(1);
-    cat1_api_add_cat1_vote();
+    cat1_api_add_cat1_app_vote();
 #endif
     // 等待CAT1就绪
     LOS_Msleep(500);  // 修改:减少等待时间,参考ln_api_device_info.c
@@ -1816,7 +1816,7 @@ int download_agnss_files(void)
         }
 
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         cat1_api_keep_wakeup(0);
         cat1_api_wakeup_cat1(0);
 #endif
@@ -2532,7 +2532,7 @@ int gnss_start_agnss_download_simple(void)
         
         // 下载取消,清理CAT1资源
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         cat1_api_keep_wakeup(0);
         cat1_api_wakeup_cat1(0);
 #endif
@@ -2547,7 +2547,7 @@ int gnss_start_agnss_download_simple(void)
             
             // 下载取消,清理CAT1资源
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         cat1_api_keep_wakeup(0);
         cat1_api_wakeup_cat1(0);
 #endif
@@ -2634,7 +2634,7 @@ errcode_t uapi_gnss_http_server_deinit(void)
     }
 
 #ifdef SUPPORT_CAT1_SERVICE
-        cat1_api_remove_cat1_vote();
+        cat1_api_remove_cat1_app_vote();
         cat1_api_keep_wakeup(0);
         cat1_api_wakeup_cat1(0);
 #endif
index 83157a6..83e3daf 100644 (file)
@@ -2242,6 +2242,15 @@ static uint32_t custom_spi_deinit_test(uint8_t *para, uint32_t paraLen, char *st
     
     return ERRCODE_SUCC;
 }
+extern void sio_set_debug_enabled(bool debug_enabled);
+static uint32_t custom_sio_debug_enable(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
+{
+    UNUSED(strCommonCmd);
+    UNUSED(para);
+    UNUSED(paraLen);
+    sio_set_debug_enabled(true);
+    return ERRCODE_SUCC;
+}
 
 static const at_cmd_table_t g_custom_utils_cmd[] = {
     { (char *)"AT^CUSTOM_SN",      custom_utils_setsn, (char *)"123456789ABCDEF2345678" },
@@ -2335,7 +2344,7 @@ static const at_cmd_table_t g_custom_utils_cmd[] = {
     { (char *)"AT^POWEROFF",      custom_at_poweroff, (char *)" " },
     { (char *)"AT^GPIO",      custom_at_gpio, (char *)" " },
     { (char *)"AT^AITEST",      AI_TEST, (char *)" " },
-    
+    { (char *)"AT^SIODEBUG",      custom_sio_debug_enable, (char *)" " },
     // { (char *)"AT^CROWNKEYTEST",      crown_test_control, (char *)" " },
     { (char *)"AT^LCDTEST",      lcd_test_control, (char *)" " },
     { (char *)"AT^PPPTESTVIEW",      ppp_test_control, (char *)" " },