Page 1 of 1

Mlink chunks is no find

Posted: Mon Oct 11, 2021 3:25 am
by XiotSamuel
我想問下下面的報錯是不是HTTP的問題?

Code: Select all

W (492318) [mlink_httpd, 197]: Mlink chunks is no find, sockfd: 0
W (492319) [mlink_httpd, 796]: <MDF_FAIL> mlink_connection_find
W (492332) [EnergysESP32FirmwareV1, 217]: <MDF_FAIL> mlink_httpd_write
有什麼情況會出現這報錯?

Re: Mlink chunks is no find

Posted: Wed Oct 13, 2021 12:57 pm
by ESP_@In逍遥子
https://github.com/espressif/esp-mdf/bl ... #L189-L199

从这里看,可能是这个 http 连接断开了。也有可能是其他原因,你可以通过添加一些调试日志,分析看看。

Re: Mlink chunks is no find

Posted: Tue Dec 14, 2021 4:54 am
by XiotSamuel
如果我用以下方法調用 mlink_httpd_write 是不是會有問題?因為我想把MQTT MESSAGE轉到HTTP 裹。

Code: Select all


    mlink_httpd_type_t httpd_type = {
                .sockfd = 80,
                .format = MLINK_HTTPD_FORMAT_JSON,
                .from   = MLINK_HTTPD_FROM_DEVICE,
                .resp   = false,
                .received = NULL,
    };

    mlink_httpd_t httpd_data  = {
            .size       = strlen(handle_data),
            .data       = handle_data,
            .addrs_num  = 1,
            .addrs_list = src_addr,
            .type = httpd_type, /**< Http server data type */
            .group = false,              /**< Send a package as a group */
        };

    ret = mlink_httpd_write(&httpd_data, portMAX_DELAY);

Code: Select all

TOPIC=Test/CMD/
DATA={"request":"get_device_info"}
sockfd 80
W (542019) [mlink_httpd, 197]: Mlink chunks is no find, sockfd: 80
W (542020) [mlink_httpd, 797]: <MDF_FAIL> mlink_connection_find
W (542031) [mqtt_driver, 109]: <MDF_FAIL> mlink_httpd_write