espressif / esp-mqtt

ESP32 mqtt component
Apache License 2.0
603 stars 255 forks source link

Garbage in will message #142

Closed d3vil-st closed 4 years ago

d3vil-st commented 4 years ago

Hello, continuously getting garbage in will messages when ESP disconnecting. Config of mqtt client below:

esp_mqtt_client_config_t mqtt_cfg =
  {
    .uri = mqtt_uri,
    .event_handle = mqtt_event_handler,
    .username = mqtt_user,
    .password = mqtt_passwd,
    .cert_pem = (char *)server_cert_pem_start,
    .lwt_topic = lwt_topic,
    .lwt_msg = "offline",
    .lwt_qos = 1,
    .lwt_retain = 1,
    .lwt_msg_len = 9,
    .disable_clean_session = 1,
  };

When client disconnecting by some connection issues I see in console this message:

offline�
d3vil-st commented 4 years ago

Problem in will message length.