light demo下如何添加esp_http_client例程

阳光的味道3121
Posts: 7
Joined: Mon Jun 17, 2019 9:27 am

light demo下如何添加esp_http_client例程

Postby 阳光的味道3121 » Thu Jul 04, 2019 10:55 am

我在使用WIFI mesh组网,我的意图和简单,每个节点通过根节点定时发送固定数据到http服务器中,因此我想使用light demo配合esp_http_client例程实现该功能,但是我在light demo中增加esp_http_client相关函数并进行编译烧写运行后但节点组网时直接reboot,不知道要完成该功能时如何处理。


以下截图为我的代码:
1.light_example中的app_main函数中新增light_http_client_app_main();函数,其light_http_client_app_main();函数为esp_http_client_example文件中的app_main改名而来;
2.针对light_http_client_app_main函数中进行屏蔽处理,仅保留创建任务的函数。
3.直接编译烧写运行


esp_http_client_example文件中app_main函数更改函数名之后的函数,屏蔽相关需用函数
void light_http_client_app_main()
{
/*esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);*/
//app_wifi_initialise();

xTaskCreate(&http_test_task, "http_test_task", 8192, NULL, 5, NULL);
}


2.官方现在是有有无将一个demo project新增官方所提供的组件的详细移植使用步骤?

ESP_Bond
Posts: 51
Joined: Mon Apr 15, 2019 1:37 pm

Re: light demo下如何添加esp_http_client例程

Postby ESP_Bond » Thu Jul 04, 2019 12:41 pm

1. 没有看到你代码截图, 通过你的描述无法确切的问题, 请提示 代码及 完整的运行日志
2. 暂时没有详细移植使用步骤, 我们现在正编译 jumpstart, 你可以参照如下步骤:

1. 通过 light_example https://github.com/espressif/esp-mdf/bl ... ADME_cn.md 了解 wif-mesh 的配网,组网,升级等功能
2. 使用 fuction_demo 下的示例去详细了解各个功能块, 文档参见: https://docs.espressif.com/projects/esp ... index.html,
如您需要增加 http client
1. 基于 TCP client 的使用示例上修改 https://github.com/espressif/esp-mdf/tr ... ifi/router
2. 再在此基础上增加 配网 https://github.com/espressif/esp-mdf/bl ... ADME_cn.md\ 升级 https://github.com/espressif/esp-mdf/bl ... ADME_cn.md \ 无线测试 等功能

阳光的味道3121
Posts: 7
Joined: Mon Jun 17, 2019 9:27 am

Re: light demo下如何添加esp_http_client例程

Postby 阳光的味道3121 » Sat Jul 06, 2019 6:21 am

好吧,我先研究研究在说吧,有问题在来请教吧。

Who is online

Users browsing this forum: No registered users and 1 guest