diff --git a/Kconfig b/Kconfig new file mode 100644 index 0000000..da47037 --- /dev/null +++ b/Kconfig @@ -0,0 +1,55 @@ +menu "ESPMQTT Configurations" + + +config MQTT_TRANSPORT_SSL + bool "Enable MQTT over SSL" + default y + help + Enable MQTT transport over SSL with mbedtls + +config MQTT_TRANSPORT_WEBSOCKET + bool "Enable MQTT over Websocket" + default y + help + Enable MQTT transport over Websocket. + +config MQTT_TRANSPORT_WEBSOCKET_SECURE + bool "Enable MQTT over Websocket Secure" + default y + depends on MQTT_TRANSPORT_WEBSOCKET + depends on MQTT_TRANSPORT_SSL + help + Enable MQTT transport over Websocket Secure. + +config MQTT_USE_CUSTOM_CONFIG + bool "MQTT Using custom configurations" + default n + help + Custom MQTT configurations. + +config MQTT_TCP_DEFAULT_PORT + int "Default MQTT over TCP port" + default 1883 + depends on MQTT_USE_CUSTOM_CONFIG + help + Default MQTT over TCP port + +config MQTT_WS_DEFAULT_PORT + int "Default MQTT over Websocket port" + default 80 + depends on MQTT_USE_CUSTOM_CONFIG + depends on MQTT_TRANSPORT_WEBSOCKET + help + Default MQTT over Websocket port + +config MQTT_WSS_DEFAULT_PORT + int "Default MQTT over Websocket Secure port" + default 80 + depends on MQTT_USE_CUSTOM_CONFIG + depends on MQTT_TRANSPORT_WEBSOCKET + depends on MQTT_TRANSPORT_WEBSOCKET_SECURE + help + Default MQTT over Websocket Secure port + + +endmenu diff --git a/include/mqtt_config.h b/include/mqtt_config.h index 15222c4..644b284 100644 --- a/include/mqtt_config.h +++ b/include/mqtt_config.h @@ -7,7 +7,6 @@ #define _MQTT_CONFIG_H_ #define MQTT_PROTOCOL_311 1 #define MQTT_RECONNECT_TIMEOUT_MS (10*1000) -#define MQTT_QUEUE_BUFFER_SIZE_WORD 1024 #define MQTT_BUFFER_SIZE_BYTE 1024 #define MQTT_MAX_HOST_LEN 64 #define MQTT_MAX_CLIENT_LEN 32