Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT subscribe help needed #36

Closed
hiteshpratyushv opened this issue May 29, 2018 · 0 comments
Closed

MQTT subscribe help needed #36

hiteshpratyushv opened this issue May 29, 2018 · 0 comments

Comments

@hiteshpratyushv
Copy link

hiteshpratyushv commented May 29, 2018

Hi I am working on an ESP32 to create a Gatts-Mqtt gateway. My publish part is working but I am unable to figure out the subscribe part.I am able to subscribe to the topic but I am unable to recieve message so it doesn't send back an ack so my broker keeps publishing it the message multiple times

ESP_LOGI(MQTT_TAG, "MQTTSubscribe  ...");
	ret = MQTTSubscribe(&client, "test/topic", QOS1, mqtt_message_handler);
	if (ret != SUCCESS) {
		ESP_LOGI(MQTT_TAG, "MQTTSubscribe: %d", ret);
	}

This is my subscribe code where mqtt_message_handler just prints it out in the LOG.
Please help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant