mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 15:15:15 +08:00
feat(mqtt): Modify mqtt component for RTOS
This commit is contained in:
@ -4,4 +4,6 @@ idf_component_register(SRCS "esp-mqtt/mqtt_client.c"
|
||||
"esp-mqtt/lib/platform_esp32_idf.c"
|
||||
INCLUDE_DIRS esp-mqtt/include
|
||||
PRIV_INCLUDE_DIRS "esp-mqtt/lib/include"
|
||||
REQUIRES lwip nghttp mbedtls tcp_transport)
|
||||
REQUIRES lwip http_parser mbedtls tcp_transport)
|
||||
|
||||
target_compile_definitions(${COMPONENT_LIB} PUBLIC -DMQTT_SUPPORTED_FEATURE_WS_SUBPROTOCOL -DMQTT_SUPPORTED_FEATURE_TRANSPORT_ERR_REPORTING)
|
||||
|
@ -2,3 +2,5 @@ COMPONENT_SUBMODULES += esp-mqtt
|
||||
COMPONENT_ADD_INCLUDEDIRS := esp-mqtt/include
|
||||
COMPONENT_SRCDIRS := esp-mqtt esp-mqtt/lib
|
||||
COMPONENT_PRIV_INCLUDEDIRS := esp-mqtt/lib/include
|
||||
#Due to RTOS version is lower than idf 4.0, so move some define in file mqtt_supported_features.h to here.
|
||||
CFLAGS += -DMQTT_SUPPORTED_FEATURE_WS_SUBPROTOCOL -DMQTT_SUPPORTED_FEATURE_TRANSPORT_ERR_REPORTING
|
||||
|
1
components/mqtt/esp-mqtt
Submodule
1
components/mqtt/esp-mqtt
Submodule
Submodule components/mqtt/esp-mqtt added at 566b034984
@ -14,7 +14,7 @@
|
||||
#include "esp_system.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_event.h"
|
||||
#include "tcpip_adapter.h"
|
||||
#include "esp_netif.h"
|
||||
#include "protocol_examples_common.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@ -169,7 +169,7 @@ void app_main()
|
||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
tcpip_adapter_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "esp_system.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_event.h"
|
||||
#include "tcpip_adapter.h"
|
||||
#include "esp_netif.h"
|
||||
#include "protocol_examples_common.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@ -129,7 +129,7 @@ void app_main()
|
||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
tcpip_adapter_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "esp_system.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_event.h"
|
||||
#include "tcpip_adapter.h"
|
||||
#include "esp_netif.h"
|
||||
#include "protocol_examples_common.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@ -111,7 +111,7 @@ void app_main()
|
||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
tcpip_adapter_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "esp_system.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_event.h"
|
||||
#include "tcpip_adapter.h"
|
||||
#include "esp_netif.h"
|
||||
#include "protocol_examples_common.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@ -138,7 +138,7 @@ void app_main()
|
||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
tcpip_adapter_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "esp_system.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_event.h"
|
||||
#include "tcpip_adapter.h"
|
||||
#include "esp_netif.h"
|
||||
#include "protocol_examples_common.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@ -111,7 +111,7 @@ void app_main()
|
||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
tcpip_adapter_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_system.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_netif.h"
|
||||
#include "esp_event.h"
|
||||
#include "tcpip_adapter.h"
|
||||
#include "protocol_examples_common.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@ -120,7 +120,7 @@ void app_main()
|
||||
esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
|
||||
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
tcpip_adapter_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
|
@ -60,6 +60,7 @@ export EXAMPLE_MQTT_BROKER_CERTIFICATE="https://www.espressif.com/"
|
||||
export EXAMPLE_MQTT_BROKER_WS="https://www.espressif.com/"
|
||||
export EXAMPLE_MQTT_BROKER_WSS="https://www.espressif.com/"
|
||||
export EXAMPLE_MQTT_BROKER_SSL="https://www.espressif.com/"
|
||||
export EXAMPLE_MQTT_BROKER_TCP="https://www.espressif.com/"
|
||||
|
||||
shopt -s lastpipe # Workaround for Bash to use variables in loops (http://mywiki.wooledge.org/BashFAQ/024)
|
||||
|
||||
|
@ -63,6 +63,7 @@ export EXAMPLE_MQTT_BROKER_CERTIFICATE="https://www.espressif.com/"
|
||||
export EXAMPLE_MQTT_BROKER_WS="https://www.espressif.com/"
|
||||
export EXAMPLE_MQTT_BROKER_WSS="https://www.espressif.com/"
|
||||
export EXAMPLE_MQTT_BROKER_SSL="https://www.espressif.com/"
|
||||
export EXAMPLE_MQTT_BROKER_TCP="https://www.espressif.com/"
|
||||
|
||||
shopt -s lastpipe # Workaround for Bash to use variables in loops (http://mywiki.wooledge.org/BashFAQ/024)
|
||||
|
||||
|
Reference in New Issue
Block a user