I tried following but it is not working:
Code: Select all
esp_mqtt_client_publish(mqttclient, "mytopic"," ",0, 0, 0);
esp_mqtt_client_publish(mqttclient, "mytopic",' ',0, 0, 0);
esp_mqtt_client_publish(mqttclient, "mytopic",NULL,0, 0, 0);
Code: Select all
esp_mqtt_client_publish(mqttclient, "mytopic"," ",0, 0, 0);
esp_mqtt_client_publish(mqttclient, "mytopic",' ',0, 0, 0);
esp_mqtt_client_publish(mqttclient, "mytopic",NULL,0, 0, 0);
Code: Select all
/* Acceptable publish messages:
data == NULL, len == 0: publish null message
data valid, len == 0: publish all data, payload len is determined from string length
data valid, len > 0: publish data with defined length
*/
if (len <= 0 && data != NULL) {
len = strlen(data);
}
Users browsing this forum: Baidu [Spider] and 102 guests