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 disconnection on every single receive #13

Closed
oguzhancakan opened this issue Jun 22, 2019 · 2 comments
Closed

MQTT disconnection on every single receive #13

oguzhancakan opened this issue Jun 22, 2019 · 2 comments

Comments

@oguzhancakan
Copy link

Hi Mr. Tilen,

I am using and testing this library for real product and almost everything fine.

But for example, when I use exactly same code with: GSM_AT_Lib_res/docs/examples/_example_mqtt_client.c mqtt

MQTT works fine except I publish something to topic which this library subscribed. It takes the message but after that it disconnects. At every single received message, it disconnects and reconnects. (retriess++ in the code)

Actually this may be acceptable because of the latency is a few seconds to reconnect. But if the message's retain flag was set which sent to the device, it takes message, then disconnects, then reconnects, and again takes the message.. The same loop. This case makes the device unable to publish any message.

Do you have any suggestion to solve this problem?

Thanks in advance,

Oguz.

@MaJerle
Copy link
Owner

MaJerle commented Jun 22, 2019

Best would be if you couod send AT log.

Architecture wise I use same code as in ESP AT Lib. It does not close itself unless you forced it or it was closed by remote side and this can happen.

@oguzhancakan
Copy link
Author

You are absolutely right. I was using HiveMQ public server then I changed it to my custom mosquitto server then problem solved.

Appreciate again for your help.

@MaJerle MaJerle closed this as completed Jun 24, 2019
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

2 participants