Zigbee 通用对接 MCU SDK 问题修复贴

Post Reply
mingfu
Posts: 8

MCU SDK 已发现下面问题,开发者可直接修改工程里的代码,或重新下载 MCU SDK 并移植。

  1. protocol.c 文件 mcu_rx_product_info_request() 函数,产品信息格式错误。
    请把这几行代码

    Code: Select all

    uart_framing_fill_payload_buff(&payload_len, "\",\"g\":\"", my_strlen("\",\"g\":\""));
    uart_framing_fill_payload_buff(&payload_len, "\",\"s\":\"", my_strlen("\",\"s\":\""));
    uart_framing_fill_payload_buff(&payload_len, "\"}", my_strlen("\"}"));
    

    替换为

    Code: Select all

    uart_framing_fill_payload_buff(&payload_len, "\",\"g\":", my_strlen("\",\"g\":"));
    uart_framing_fill_payload_buff(&payload_len, ",\"s\":", my_strlen(",\"s\":"));
    uart_framing_fill_payload_buff(&payload_len, "}", my_strlen("}"));
    
  2. system.c 文件 __queue_is_full() 函数,满队判断条件错误。
    请把这行代码

    Code: Select all

    if ((sizeof(sg_queue_buf) - 1 == sg_queue_tail - sg_queue_head) || (sizeof(sg_queue_buf) - 1 == sg_queue_head - sg_queue_tail)) {
    

    替换为

    Code: Select all

    if (sizeof(sg_queue_buf) - 1 == sg_queue_tail - sg_queue_head) {
    

对于给您带来的不便,我深表歉意。

Post Reply