From 5b381c80976c76bb7e0d779f1ff878416c93db78 Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Thu, 11 Apr 2024 11:31:56 +0800
Subject: [PATCH] Add TLV packet support

---
 project/socketd/sock_client.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/project/socketd/sock_client.c b/project/socketd/sock_client.c
index 3c3f33c..20f1898 100644
--- a/project/socketd/sock_client.c
+++ b/project/socketd/sock_client.c
@@ -166,10 +166,12 @@
             }
             log_info("DS18B20 sample termperature %.3f oC\n", pack_info.temper);
 
-            get_devid(pack_info.devid, DEVID_LEN, 40);
+            get_devid(pack_info.devid, sizeof(pack_info.devid), 88);
             get_time(&pack_info.sample_time);
 
-            pack_bytes = pack_proc(&pack_info, pack_buf, sizeof(pack_buf));
+            pack_bytes = pack_proc(&pack_info, (uint8_t *)pack_buf, sizeof(pack_buf));
+            log_dump(LOG_LEVEL_DEBUG, NULL, pack_buf, pack_bytes);
+
             sample_flag = 1; /* set sample flag */
         }
 

--
Gitblit v1.9.1