MQTT Client broker information structure v2.

This structure holds the information required to connect to an MQTT broker, including:

  • Broker's IP address and port

  • MQTT broker hostname

  • Connection encryption status

  • Connection timeout, keep-alive interval, and keep-alive retries

  • SNI support: enable/disable and SNI hostname

Note

    • The host_name field is reserved for future support of MQTT broker hostname.

    • The sni_host_name field is used for Server Name Indication (SNI) when connecting over TLS. This is required for AWS IoT and similar brokers.

    • If SNI is enabled (enable_sni is true), sni_host_name must be provided and will be programmed into the firmware before connecting.

    • For non-TLS connections, SNI fields are ignored.

Public Attributes#

sl_ip_address_t

IP address of the broker.

uint8_t *

MQTT broker hostname (not currently supported).

uint16_t

Port number of the broker.

bool

Indicates if the connection is encrypted. This field will be deprecated in future releases. Use tls_flags in sl_mqtt_client_configuration_t instead.

uint16_t

MQTT connection timeout in milliseconds.

uint16_t

Keep-alive interval of the MQTT connection in seconds.

uint16_t

Number of MQTT ping retries.

bool

Enable or disable SNI extension in MQTT.

uint8_t *

Hostname to use in SNI (required for TLS/SNI connections; e.g., AWS IoT).

Public Attribute Documentation#

ip#

sl_ip_address_t sl_mqtt_broker_v2_t::ip

IP address of the broker.


host_name#

uint8_t* sl_mqtt_broker_v2_t::host_name

MQTT broker hostname (not currently supported).


port#

uint16_t sl_mqtt_broker_v2_t::port

Port number of the broker.


is_connection_encrypted#

bool sl_mqtt_broker_v2_t::is_connection_encrypted

Indicates if the connection is encrypted. This field will be deprecated in future releases. Use tls_flags in sl_mqtt_client_configuration_t instead.


connect_timeout#

uint16_t sl_mqtt_broker_v2_t::connect_timeout

MQTT connection timeout in milliseconds.


keep_alive_interval#

uint16_t sl_mqtt_broker_v2_t::keep_alive_interval

Keep-alive interval of the MQTT connection in seconds.


keep_alive_retries#

uint16_t sl_mqtt_broker_v2_t::keep_alive_retries

Number of MQTT ping retries.


enable_sni#

bool sl_mqtt_broker_v2_t::enable_sni

Enable or disable SNI extension in MQTT.


sni_host_name#

uint8_t* sl_mqtt_broker_v2_t::sni_host_name

Hostname to use in SNI (required for TLS/SNI connections; e.g., AWS IoT).