Переглянути джерело

修改关机后开机不通信

wanghechen 8 місяців тому
батько
коміт
add1197289

+ 12 - 2
components/LORA/LORA.c

@@ -2307,19 +2307,22 @@ void lora_init(void)
           printf("wake up lora cmd init , reson = %d\r\n", reson);                                                          // 软件复位是2,硬件复位是0
           if ((reson != ESP_SLEEP_WAKEUP_ULP) && (reson != ESP_SLEEP_WAKEUP_TIMER) /*&& (reson != ESP_SLEEP_WAKEUP_EXT0)*/) // ota完后软件复位,重新配置lora
           {
-            printf("lora cmd init start\r\n");
+
             extern Machine_info_t Machine_info;
             if (Machine_info.lora_new_channel == LORA_CHANENL)
             {
+              printf("lora cmd init start\r\n");
               xTaskCreate(tx_task, "uart_tx_task", 1024 * 3, NULL, configMAX_PRIORITIES - 1, &lora_uart_tx_handle);
             }
             else
             {
-              ESP_LOGE(LOG_TAG, "不设置LORA_CHANENL");
+              lora.lora_mode = Lora_UART_Mode; // 复位直接进入透传模式
+              ESP_LOGE(LOG_TAG, "not set LORA_CHANENL");
             }
           }
           else
           {
+            ESP_LOGE(LOG_TAG, "not set LORA_CHANENL");
             lora.lora_mode = Lora_UART_Mode; // 复位直接进入透传模式
           }
 #endif
@@ -2984,3 +2987,10 @@ void lora_send_queue_callback(uint8_t *data_buf, int len)
 
   send_lora_queue(data_buf, len);
 }
+
+void print_lora_set_info(void)
+{
+  ESP_LOGE(LOG_TAG,"lora_uart_Timerout %s",xTimerIsTimerActive(lora_uart_Timerout)?"Active":"not Active");
+  ESP_LOGE(LOG_TAG,"lora_uart_status = %d",lora_uart_status);
+}
+

+ 1 - 0
components/LORA/include/LORA.h

@@ -278,6 +278,7 @@ bool lora_set_rssi(int rssi);
 #endif
 
 void print_lora(void);
+void print_lora_set_info(void);
 
 
 

+ 1 - 1
components/button/include/user_button.h

@@ -139,5 +139,5 @@ int  find_key_value(int value);
 bool is_btn_timeout(void);
 void send_button_key_queue(uint8_t value);
 void reset_btn_last_time(void);
-
+bool is_power_press(void);
 #endif/*_USER_BUTTON_H_*/

+ 19 - 7
components/button/user_button.c

@@ -76,7 +76,7 @@ static void user_button_single_click_cb(void *arg, void *usr_data);
 static void power_long_press_start_cb(void *arg, void *usr_data);
 static void power_long_press_hold_cb(void *arg, void *usr_data);
 static void power_long_press_up_cb(void *arg, void *usr_data);
-
+static void power_press_up_cb(void *arg, void *usr_data);
 static void power_single_press_cb(void *arg, void *usr_data);
 
 static void user_button_single_UP_cb(void *arg, void *usr_data);
@@ -293,7 +293,8 @@ void button_init(adc_oneshot_unit_handle_t adc_handle)
 #else
         iot_button_register_cb(user_powerbutton_handle[i], BUTTON_LONG_PRESS_START, power_long_press_start_cb, button_idx);
         iot_button_register_cb(user_powerbutton_handle[i], BUTTON_LONG_PRESS_HOLD, power_long_press_hold_cb, button_idx);
-        iot_button_register_cb(user_powerbutton_handle[i], BUTTON_LONG_PRESS_UP, power_long_press_up_cb, button_idx);
+        // iot_button_register_cb(user_powerbutton_handle[i], BUTTON_LONG_PRESS_UP, power_long_press_up_cb, button_idx);
+        iot_button_register_cb(user_powerbutton_handle[i], BUTTON_PRESS_UP, power_press_up_cb, button_idx);
 #endif
 
         // 注册按键多次按键回调
@@ -373,9 +374,23 @@ static void long_press_up_cb(void *arg, void *usr_data)
 {
     ESP_LOGE(LOG_TAG, "BUTTON_LONG_PRESS_UP %d", (int)usr_data);
 }
+static bool is_power = false;
 static void power_long_press_start_cb(void *arg, void *usr_data)
 {
-    // printf("power_long_press_start_cb\n");
+    // ESP_LOGE(LOG_TAG, "power_long_press_start_cb\n");
+    is_power = true;
+}
+static void power_long_press_up_cb(void *arg, void *usr_data)
+{
+}
+static void power_press_up_cb(void *arg, void *usr_data)
+{
+    // ESP_LOGE(LOG_TAG, "power_long_press_up_cb\n");
+    is_power = false;
+}
+bool is_power_press(void)
+{
+    return is_power;
 }
 static void power_long_press_hold_cb(void *arg, void *usr_data)
 {
@@ -424,10 +439,7 @@ static void power_long_press_hold_cb(void *arg, void *usr_data)
         break;
     }
 }
-static void power_long_press_up_cb(void *arg, void *usr_data)
-{
-    // printf("power_long_press_up_cb\n");
-}
+
 #endif
 
 #include "esp_sleep.h"

+ 36 - 25
main/ulp_riscv_adc_example_main.c

@@ -265,7 +265,7 @@ static void light_sleep_task(void *args)
 
                 iot_button_stop();
 #if 1 // 电源按键
-                // adc_oneshot_del_unit(adc1_handle);
+      // adc_oneshot_del_unit(adc1_handle);
                 gpio_reset_pin(4);
                 int ext_wakeup_pin_0 = 4;
                 printf("Enabling EXT0 wakeup on pin GPIO%d\n", ext_wakeup_pin_0);
@@ -293,7 +293,7 @@ static void light_sleep_task(void *args)
 
 #endif
                 esp_sleep_enable_timer_wakeup(TIMER_WAKEUP_TIME_US); // 配置当前休眠的唤醒时间
-                // adc_oneshot_del_unit(adc1_handle);
+                                                                     // adc_oneshot_del_unit(adc1_handle);
 
                 // extern bool left_refresh_complete;
                 // extern bool right_refresh_complete;
@@ -333,17 +333,19 @@ static void light_sleep_task(void *args)
                 // OTA 不休眠
                 if (!is_adv)
                 {
-                    ESP_LOGW(LOG_TAG, "-> sleep\r\n");
-                    uart_wait_tx_idle_polling(1);                           // 抛出剩余串口1消息
-                    uart_wait_tx_idle_polling(CONFIG_ESP_CONSOLE_UART_NUM); // 抛出剩余串口0消息
-                    if (!is_button_timer_active())
+
+                    if (!is_power_press())
                     {
+                        ESP_LOGW(LOG_TAG, "-> sleep\r\n");
+                        uart_wait_tx_idle_polling(1);                           // 抛出剩余串口1消息
+                        uart_wait_tx_idle_polling(CONFIG_ESP_CONSOLE_UART_NUM); // 抛出剩余串口0消息
+
                         vTaskDelay(100 / portTICK_PERIOD_MS); // 给出时间片
                         esp_light_sleep_start();
                     }
                     else
                     {
-                        ESP_LOGW(LOG_TAG, "-> btn is active\r\n");
+                        ESP_LOGW(LOG_TAG, "power key is press\r\n");
                     }
                 }
                 else
@@ -377,29 +379,31 @@ static void light_sleep_task(void *args)
         case ESP_SLEEP_WAKEUP_TIMER:
 
             iot_button_resume();
-// wakeup_reason = "timer";
-#if LORA_SLEEP_ENABLE
-            // rtc_gpio_pullup_dis(LORA_POWER_PIN);
-            // rtc_gpio_deinit(LORA_POWER_PIN);
-            // rtc_gpio_init(LORA_POWER_PIN);
-            // rtc_gpio_set_direction(LORA_POWER_PIN, RTC_GPIO_MODE_OUTPUT_ONLY);
-            // rtc_gpio_pullup_en(LORA_POWER_PIN);
-            // rtc_gpio_set_level(LORA_POWER_PIN, 1);
-            lora_set_power_level(1); // 打开lora电源
-// rtc_gpio_hold_en(LORA_POWER_PIN);
-#endif
+            // // wakeup_reason = "timer";
+            // #if LORA_SLEEP_ENABLE
+            //             // rtc_gpio_pullup_dis(LORA_POWER_PIN);
+            //             // rtc_gpio_deinit(LORA_POWER_PIN);
+            //             // rtc_gpio_init(LORA_POWER_PIN);
+            //             // rtc_gpio_set_direction(LORA_POWER_PIN, RTC_GPIO_MODE_OUTPUT_ONLY);
+            //             // rtc_gpio_pullup_en(LORA_POWER_PIN);
+            //             // rtc_gpio_set_level(LORA_POWER_PIN, 1);
+            //             lora_set_power_level(1); // 打开lora电源
+            // // rtc_gpio_hold_en(LORA_POWER_PIN);
+            // #endif
 
-#if FONT_SLEEP_ENABLE          // 字库唤醒恢复供电
-            font_exit_sleep(); // 退出睡眠
+            // #if FONT_SLEEP_ENABLE          // 字库唤醒恢复供电
+            //             font_exit_sleep(); // 退出睡眠
 
-#endif
+            // #endif
 
-#if LCD_SLEEP_ENABLE
+            // #if LCD_SLEEP_ENABLE
 
-#endif
+            // #endif
 
             if (is_first_run == false)
             {
+                lora_set_power_level(1); // 打开lora电源
+                font_exit_sleep();       // 退出睡眠
                 gpio_hold_dis(LORA_TXD_PIN);
                 gpio_hold_dis(LORA_RXD_PIN);
 
@@ -409,17 +413,21 @@ static void light_sleep_task(void *args)
                 getRtcTime(&Machine_info);
                 Machine_info.batt_precent = read_battery_voltage();
                 Machine_info.wait_send_rssi_bat++;
-                printf("唤醒: bat %d wait_send_rssi_bat = %d,\r\n", Machine_info.batt_precent, Machine_info.wait_send_rssi_bat);
+                printf("weakup: bat %d wait_send_rssi_bat = %d,\r\n", Machine_info.batt_precent, Machine_info.wait_send_rssi_bat);
+
+                // 打印待发数据
+                printList(Send_list);
 
                 // if(Machine_info.wait_send_rssi_bat>(30*60/TIMER_WAKEUP_TIME_S))//30分钟发一次lora
                 if (Machine_info.wait_send_rssi_bat > 60) // 30分钟唤醒一次->(30*60/TIMER_WAKEUP_TIME_S) = 60
-                // if(0)
+                // if (0)
                 {
                     ESP_LOGE(LOG_TAG, "-> 30minite send lora info");
                     Machine_info.wait_send_rssi_bat = 0;
                     f_send_get_chart_data();
                     f_send_lora_rssi(Machine_info.rssi);
                     f_send_battary_vaule(Machine_info.batt_precent);
+                    f_send_get_time();
                 }
 
                 if ((Machine_info.last_button.Minute != Machine_info.min) /*||(Machine_info.last_button.Hour != Machine_info.Hour)*/) //
@@ -448,6 +456,7 @@ static void light_sleep_task(void *args)
 
             break;
         case ESP_SLEEP_WAKEUP_GPIO:
+
             lev_2 = gpio_get_level(2);
 
             {
@@ -571,6 +580,7 @@ static void light_sleep_task(void *args)
             if (read_battery_voltage() == 0)
             {
                 printf("-->low batt , power off\r\n");
+#if 0
                 Machine_info.power_status = 0;
                 // dis_instructions();  //进入关机界面
                 // screen_dis_info.is_left = true;
@@ -586,6 +596,7 @@ static void light_sleep_task(void *args)
                     ESP_LOGE(LOG_TAG, "err:screen queue send fail");
                 }
                 sleep_timer_start(1000);
+#endif
             }
 
             lev_2 = gpio_get_level(2);

+ 1 - 1
main/user_sleep.c

@@ -179,7 +179,7 @@ void Already_send_timer_callback(void *arg)
         {
             vTaskDelay(50 / portTICK_PERIOD_MS);
             lora_send_data((char *)Send_list->data, Send_list->len);
-            printf("->发送一条消息给网关\r\n");
+            printf("->send one data to gateway\r\n");
         }
         else
         {

+ 1 - 1
main/user_sleep.h

@@ -1,7 +1,7 @@
 #ifndef __USER_SLEEP_H__
 #define __USER_SLEEP_H__
 
-#define TIMER_WAKEUP_TIME_S 30
+#define TIMER_WAKEUP_TIME_S 6
 #define TIMER_WAKEUP_TIME_US (TIMER_WAKEUP_TIME_S * 1000 * 1000) // 定义的唤醒的时间
 #define TIMER_CAN_SEND_TIME (200)                                // 定义可以唤醒lora工作的时间单位ms
 #define LORA_POWER_TIME (2000)

+ 4 - 3
main/yc_paint.c

@@ -1404,7 +1404,7 @@ static uint8_t *partial_right4_quick(void)
 // 下面是2023.12.31 把屏幕显示全部统一
 static void dis_left_sms(void)
 {
-    ESP_LOGW(LOG_TAG, "左屏说明书");
+    ESP_LOGW(LOG_TAG, "dis left instruction book");
 
     memset((uint8_t *)tmp_paint_buf, 0, DISPLAY_BUFFER_SIZE /*sizeof(tmp_paint_buf)*/);
     Paint_NewImage((uint8_t *)tmp_paint_buf, 648, 480, ROTATE_180, WHITE);
@@ -1430,6 +1430,7 @@ static void dis_left_sms(void)
 }
 static void dis_right_sms(void)
 {
+    ESP_LOGW(LOG_TAG, "dis right instruction book");
     memset((uint8_t *)tmp_paint_buf, 0, DISPLAY_BUFFER_SIZE /*sizeof(tmp_paint_buf)*/);
     Paint_NewImage((uint8_t *)tmp_paint_buf, 648, 480, ROTATE_270, WHITE);
     Paint_DrawBitMap_Paste(gImage_right_instruction, 0, 0, 480, 648, 1);
@@ -1505,7 +1506,7 @@ static void dis_right_sms(void)
 }
 void Paint_leftScreen(bool is_poweron, bool is_quick)
 {
-    ESP_LOGI(LOG_TAG, "Paint_leftScreen %s - %s ", is_quick ? "快刷" : "慢刷", is_poweron ? "开机" : "关机");
+    ESP_LOGI(LOG_TAG, "Paint_leftScreen %s - %s ", is_quick ? "quick" : "low", is_poweron ? "poweron" : "poweroff");
     if (!is_poweron)
     {
         // 关机展示说明书
@@ -1933,7 +1934,7 @@ void Paint_leftScreen(bool is_poweron, bool is_quick)
 }
 void Paint_rightScreen(bool is_poweron, bool is_quick)
 {
-    ESP_LOGI(LOG_TAG, "Paint_rightScreen %s  - %s ", is_quick ? "快刷" : "慢刷", is_poweron ? "开机" : "关机");
+    ESP_LOGI(LOG_TAG, "Paint_rightScreen %s  - %s ", is_quick ? "quick" : "low", is_poweron ? "poweron" : "poweroff");
     if (!is_poweron)
     {
         // 关机展示说明书

+ 55 - 5
main/yc_protocol.c

@@ -103,7 +103,7 @@ void reset_default(bool is_dis, uint8_t power_status)
     }
     // Paint_leftScreen_main_quick(&Machine_info);
     // Paint_rightScreen_main_quick(&Machine_info);
-
+    xQueueReset(screen_queue);
     screen_dis_info.is_left = true;
     screen_dis_info.is_into_sleep = false;
     // 重置快刷
@@ -227,7 +227,7 @@ void screen_display(void)
      * happened. */
     if (bits == 3)
     {
-
+        xQueueReset(screen_queue);
         screen_dis_info.is_left = true;
         screen_dis_info.is_into_sleep = false;
         if (xQueueSend(screen_queue, &screen_dis_info, portMAX_DELAY) != true)
@@ -1369,6 +1369,10 @@ static void hardware_gwpair_func(const LORA_DATA_T *buf)
     f_send_lora_rssi(100); // 刚配完直接发100
     f_send_battary_vaule(Machine_info.batt_precent);
 
+#if 1
+    f_send_get_chart_data();
+#endif
+
 #if USER_LIGHT_SLEEP_ENABLE || USER_DEEP_SLEEP_ENABLE
     sleep_timer_start(2000); // 进入睡眠
 #endif
@@ -1627,7 +1631,7 @@ void business_logic_func(const LORA_DATA_T *buf, uint8_t cmd_index, int msg)
         hardware_gwpair_func(buf);
         // Paint_leftScreen_main_quick(&Machine_info);
         // Paint_rightScreen_main_quick(&Machine_info);
-
+        xQueueReset(screen_queue);
         screen_dis_info.is_left = true;
         screen_dis_info.is_into_sleep = false;
         // 重置快刷
@@ -2321,10 +2325,54 @@ void changebintotxt(uint8_t *strb, int len)
     }
     strcpy((char *)strb, (char *)strtxt);
 }
+/******************************
+ //获取网关时间
+******************************/
+void f_send_get_time(void)
+{
+    uint8_t strlorabuf[200];
+    uint8_t strnum[20];
 
+    static int rssiold = 0;
+    int crc16 = 0, i = 0, len = 0;
+
+    strlorabuf[0] = 0x5A;
+    strlorabuf[1] = 0x51; // 包头
+    strlorabuf[2] = 0x00; // 校验和
+
+    strlorabuf[3] = mac_addr[0];
+    strlorabuf[4] = mac_addr[1];
+    strlorabuf[5] = mac_addr[2];
+    strlorabuf[6] = mac_addr[3];
+    strlorabuf[7] = mac_addr[4];
+    strlorabuf[8] = mac_addr[5];
+    strlorabuf[9] = Machine_info.eflagID; // 组内编号
+    strlorabuf[10] = 0x01;// cmd命令字
+
+    Machine_info.msg_id = allocateMsgIdNum();// 分配ID
+             
+    strlorabuf[11] = ((Machine_info.msg_id) >> 8) & 0XFF; //
+    strlorabuf[12] = ((Machine_info.msg_id) >> 0) & 0XFF;     // 总包数,当前包数
+
+    strlorabuf[13] = 0x00;
+    strlorabuf[14] = 0x00; // 长度
+    strlorabuf[15] = 0;
+
+    crc16 = strlorabuf[0] + strlorabuf[1];
+    for (i = 3; i < 15; i++)
+        crc16 = crc16 + strlorabuf[i];
+    strlorabuf[2] = crc16 & 0xff;
+
+    changebintotxt(strlorabuf, 15);// Serial.println((char *)strlorabuf);
+    strcat((char *)strlorabuf, (char *)Machine_info.cid);
+    len = strlen((char *)strlorabuf);
+
+    // lora_send_data((char *)strlorabuf,len);
+    Send_list = postInsert(Send_list, Machine_info.msg_id, Machine_info.msg_id, (char *)strlorabuf, len); // 插入数据
+}
 void f_send_get_chart_data(void)
 {
-
+    ESP_LOGW(LOG_TAG, "f_send_get_chart_data");
     uint8_t strlorabuf[200];
 
     int crc16 = 0, i = 0, len = 0;
@@ -2537,7 +2585,7 @@ void f_send_reply_status(int status)
 // 唤醒时发送是否可以接收数据命令
 void send_can_I_receive()
 {
-    printf("->can i\n");
+
     uint8_t strlorabuf[200];
     strlorabuf[0] = 0x5A;
     strlorabuf[1] = 0x51;
@@ -2576,6 +2624,8 @@ void send_can_I_receive()
 
 #endif
     // send_lora_data(strlorabuf,len);  //不直接发送
+    // printf("->can i\n");
+    ESP_LOG_BUFFER_HEX("->can i", strlorabuf, 14);
     lora_send_data((char *)strlorabuf, 14);
 }
 

+ 1 - 1
main/yc_protocol.h

@@ -312,7 +312,7 @@ void user_compare(int last, int now);
 void user_compare_power_off(int last, int now); // 这个函数用来比较关机状态时电量变化 刷右屏//
 
 void right_screen_send();
-
+void f_send_get_time(void);
 // /* 链表节点结构体 */
 // struct ListNode {
 //     uint16_t number;               // 节点值

+ 13 - 9
main/yc_terminal.c

@@ -869,7 +869,7 @@ static void screen_task(void *arg)
         if (xQueueReceive(screen_queue, &screen_rev_info, (TickType_t)portMAX_DELAY))
         {
             font_exit_sleep();
-            ESP_LOGI(LOG_TAG, "%s , %s", screen_rev_info.is_left ? "左屏刷新" : "右屏刷新", screen_rev_info.is_into_sleep ? "进入睡眠" : "不进睡眠");
+            ESP_LOGI(LOG_TAG, "%s , %s", screen_rev_info.is_left ? "left refreshing" : "right refreshing", screen_rev_info.is_into_sleep ? "into sleep" : "not sleep");
             if (screen_rev_info.is_left) // 刷左屏
             {
                 if (Machine_info.left_current_Quick_refresh_time >= Machine_info.left_max_Quick_refresh_time)
@@ -898,7 +898,7 @@ static void screen_task(void *arg)
 
             if ((Machine_info.power_status == 1) && (Machine_info.paired == 1) && screen_rev_info.is_into_sleep)
             {
-                ESP_LOGW(LOG_TAG, "刷屏进入休眠 %s", screen_rev_info.is_left ? "左屏刷新" : "右屏刷新");
+                ESP_LOGW(LOG_TAG, "100ms sleep  %s", screen_rev_info.is_left ? "left" : "right");
                 sleep_timer_start(100); // 进入睡眠
             }
 
@@ -939,7 +939,7 @@ static void button_task(void *arg)
 #if 1
             ESP_LOGI(LOG_TAG, "btn_flag[%d][%d][%d][%d][%d][%d],button_info = [%d]%s ", Machine_info.btn_dis_flag[0],
                      Machine_info.btn_dis_flag[1], Machine_info.btn_dis_flag[2], Machine_info.btn_dis_flag[3], Machine_info.btn_dis_flag[4],
-                     Machine_info.btn_dis_flag[5], button_info, Machine_info.power_status ? "开机" : "关机");
+                     Machine_info.btn_dis_flag[5], button_info, Machine_info.power_status ? "poweron" : "poweroff");
 
             ESP_LOGI(LOG_TAG, "batt_precent[%d]\ncid[%s]\nlast_button[%d]\nlora_new_channel[%d]\neflagID[%d]\nDuration_time[%ld]rssi[%d]paired[%s]",
                      Machine_info.batt_precent,
@@ -949,7 +949,9 @@ static void button_task(void *arg)
                      Machine_info.eflagID,
                      Machine_info.Duration_time,
                      Machine_info.rssi,
-                     Machine_info.paired ? "已配网" : "未配网");
+                     Machine_info.paired ? "paired" : "not pair");
+
+                    //  print_lora_set_info();
 #endif
             if (button_info < 0x12) // 左屏慕按键
             {
@@ -957,7 +959,7 @@ static void button_task(void *arg)
                 //  print_lora();//按键查询lora配置
                 if (Machine_info.btn_dis_flag[button_info - 1] == false)
                 {
-                    printf("按键关闭,默认运行\n");
+                    printf("btn is close\n");
                     button_info = STATE_OPERATION; // 按键关闭,默认运行
                     if ((Machine_info.power_status == 1) && (Machine_info.paired == 1))
                     {
@@ -1045,7 +1047,7 @@ static void button_task(void *arg)
                 }
                 else // 和上个按键重复,唤醒原因为ulp唤醒,不进入休眠
                 {
-                    printf("和上个按键重复,唤醒原因为ulp唤醒,不进入休眠\r\n");
+                    printf("repeat ,goto sleep !\r\n");
                     sleep_timer_start(100); // 开始进入倒计时休眠
                 }
             }
@@ -1095,7 +1097,7 @@ static void button_task(void *arg)
                         // 恢复串口i功能
                         uart_sleep_out_config();
                     }
-
+                    xQueueReset(screen_queue);
                     screen_dis_info.is_left = true;
                     screen_dis_info.is_into_sleep = false;
                     if (xQueueSend(screen_queue, &screen_dis_info, portMAX_DELAY) != true)
@@ -1112,7 +1114,9 @@ static void button_task(void *arg)
 
                 if (button_info == POWER_ON_INTO_DIS_RIGHT)
                 {
+                    xQueueReset(screen_queue);
                     screen_dis_info.is_left = true;
+                    screen_dis_info.is_into_sleep = false;
                     if (xQueueSend(screen_queue, &screen_dis_info, portMAX_DELAY) != true)
                     {
                         ESP_LOGE(LOG_TAG, "err:screen queue send fail");
@@ -1444,7 +1448,7 @@ void read_deal_data_callback_handler()
             user_size = y_ringbuf_get_used_size(lora_ringbuf);
             if (user_size > 0)
             {
-                printf("lora 数据长度 = %d\r\n", user_size);
+                printf("-->lora len = %d\r\n", user_size);
 #if 0
             if(user_size == 36)
             {
@@ -1468,7 +1472,7 @@ void read_deal_data_callback_handler()
                     }
                     printf("\r\n");
 #endif
-                    ESP_LOG_BUFFER_HEX("接收的lora", result, user_size);
+                    ESP_LOG_BUFFER_HEX("from gateway lora", result, user_size);
                     yc_data.len = user_size;
                     yc_data.data = malloc(sizeof(uint8_t) * user_size); // 分配内存
                     memcpy(yc_data.data, result, user_size);