Skip to content

Improvements to Paho MQTT (GIT8266O-492) #312

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mykhani
Copy link

@mykhani mykhani commented Sep 12, 2018

No description provided.

The existing NetworkConnect API calls gethostbyname() to resolve
the hostname of the MQTT broker to ip address. In our setup, we
are using Avahi daemon (running on raspberrypi) for name
resolution and apparently ESP8266 FreeRTOS port cannot handle
mDNS based name resolution. Hence, gethostbyname() fails to
resolve the hostname of the MQTT broker. To support connecting
to MQTT broker by specifying it's ip address directly, I am
adding a new API NetworkConnectIP that takes ip address
instead of hostname to setup mqtt network connection.

Signed-off-by: Yasir Khan <yasir_electronics@yahoo.com>
Current implementation doesn't consider the disconnection of
ESP8266 (in station mode) from the AP and consequently MQTT
broker. Since in our indoor farming scenerio, wifi disconnections
are expected, there should be a way to handle mqtt broker
disconnection. This is implemented in following ways:
 * Add NetworkDisconnect() API to close the socket to mqtt broker
 * Stop the MQTT keep alive background thread

Signed-off-by: Yasir Khan <yasir_electronics@yahoo.com>
@CLAassistant
Copy link

CLAassistant commented Sep 12, 2018

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot changed the title Improvements to Paho MQTT Improvements to Paho MQTT (GIT8266O-492) Jun 12, 2020
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

Successfully merging this pull request may close these issues.

2 participants