ln:debug调试界面添加显示ppp波特率
authorluozheng <1732036298@qq.com>
Wed, 29 Oct 2025 11:53:15 +0000 (19:53 +0800)
committerluozheng <1732036298@qq.com>
Wed, 29 Oct 2025 11:53:15 +0000 (19:53 +0800)
code/sdk/application/wearable/ln/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp

index f157506..177fbfa 100644 (file)
@@ -19,6 +19,7 @@ extern "C"
 {
 #endif
 #include "ln_api.h"
+#include <ConfigModelC.h>
     char *uapi_ln_get_device_id(void);
     char *uapi_ln_get_device_iccid(void);
     char *uapi_ln_get_device_model(void);
@@ -156,7 +157,12 @@ namespace OHOS
     {
         std::string deviceInfo = "设备号:" + std::string(uapi_ln_get_device_id()) + "\n";
         deviceInfo += "设备iccid:" + std::string(uapi_ln_get_device_iccid()) + "\n";
-        deviceInfo += "设备version:" + std::string(uapi_ln_get_device_version()) + "\n";
+
+        char version_buf[128] = {0};
+        uint32_t version_len = sizeof(version_buf) - 1; // 预留1字节给字符串结束符
+        uapi_get_buildversion((uint8_t *)version_buf, version_len);
+        deviceInfo += "设备version:" + std::string(version_buf) + "\n";
+
         deviceInfo += "设备model:" + std::string(uapi_ln_get_device_model()) + "\n";
 
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "设备连接状态:%d", ln_ws_get_connection_state());
@@ -180,6 +186,10 @@ namespace OHOS
                 deviceInfo += "设备连接状态:未知状态 " +std::to_string(ln_ws_get_connection_state());
                 break;
         }
+
+        //ppp波特率
+        uint32_t ppp_baudrate = get_ppp_baudrate_from_config_model();
+        deviceInfo += "ppp波特率:" + std::to_string(ppp_baudrate) + "\n";
         return deviceInfo;
     }