Espressif ESP32-S2 Programming Manual page 526

Table of Contents

Advertisement

Chapter 2. API Reference
const char *password
MQTT password
const char *lwt_topic
LWT (Last Will and Testament) message topic (NULL by default)
const char *lwt_msg
LWT message (NULL by default)
int lwt_qos
LWT message qos
int lwt_retain
LWT retained message flag
int lwt_msg_len
LWT message length
int disable_clean_session
mqtt clean session, default clean_session is true
int keepalive
mqtt keepalive, default is 120 seconds
bool disable_auto_reconnect
this mqtt client will reconnect to server (when errors/disconnect). Set disable_auto_reconnect=true to
disable
void *user_context
pass user context to this option, then can receive that context in event->user_context
int task_prio
MQTT task priority, default is 5, can be changed in make menuconfig
int task_stack
MQTT task stack size, default is 6144 bytes, can be changed in make menuconfig
int buffer_size
size of MQTT send/receive buffer, default is 1024 (only receive buffer size if out_buffer_size
defined)
const char *cert_pem
Pointer to certificate data in PEM or DER format for server verify (with SSL), default is NULL, not re-
quired to verify the server. PEM-format must have a terminating NULL-character. DER-format requires
the length to be passed in cert_len.
size_t cert_len
Length of the buffer pointed to by cert_pem. May be 0 for null-terminated pem
const char *client_cert_pem
Pointer to certificate data in PEM or DER format for SSL mutual authentication, default is NULL, not
required if mutual authentication is not needed. If it is not NULL, also client_key_pem has to be
provided. PEM-format must have a terminating NULL-character. DER-format requires the length to be
passed in client_cert_len.
size_t client_cert_len
Length of the buffer pointed to by client_cert_pem. May be 0 for null-terminated pem
const char *client_key_pem
Pointer to private key data in PEM or DER format for SSL mutual authentication, default is NULL, not
required if mutual authentication is not needed. If it is not NULL, also client_cert_pem has to be
provided. PEM-format must have a terminating NULL-character. DER-format requires the length to be
passed in client_key_len
size_t client_key_len
Length of the buffer pointed to by client_key_pem. May be 0 for null-terminated pem
Espressif Systems
515
Submit Document Feedback
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF