Query regarding MQTT Paho Library used into ESP32
Posted: Sat Feb 03, 2018 4:37 pm
Hi,
We are working on ESP32 boards and are using ESP32 IDF 2.1 SDK so far for development purpose. So, We have one requirement to use MQTT for message communication through our cloud server.
We had use MQTT Paho Library and developed our wrapper on top of it for connection and communication purpose. So, We had tested it with some basic test-cases and it is working fine.
But, We are using ESP32 board in STA mode to connect with Router and our Cloud Server. We had one test-case in which We had just disconnected device from cloud but internally it is connected with Router at that time we are not getting any callback or event for disconnection from MQTT Paho Library.
If i disconnect completely ESP32 Device from Router then we are getting disconnect event. So, We had checked MQTT Paho library with its parameters and found that there is one parameter called it as keep alive interval which have set it as 10 seconds.
So, MQTT Paho Library internally going to ping on every keep alive interval time but after that we are getting disconnect event from MQTT Paho library which should not be happened.
Does anyone has faced this type of issue and how anyone has handled disconnect event in which device is connected with router internally but not externally?
We are working on ESP32 boards and are using ESP32 IDF 2.1 SDK so far for development purpose. So, We have one requirement to use MQTT for message communication through our cloud server.
We had use MQTT Paho Library and developed our wrapper on top of it for connection and communication purpose. So, We had tested it with some basic test-cases and it is working fine.
But, We are using ESP32 board in STA mode to connect with Router and our Cloud Server. We had one test-case in which We had just disconnected device from cloud but internally it is connected with Router at that time we are not getting any callback or event for disconnection from MQTT Paho Library.
If i disconnect completely ESP32 Device from Router then we are getting disconnect event. So, We had checked MQTT Paho library with its parameters and found that there is one parameter called it as keep alive interval which have set it as 10 seconds.
So, MQTT Paho Library internally going to ping on every keep alive interval time but after that we are getting disconnect event from MQTT Paho library which should not be happened.
Does anyone has faced this type of issue and how anyone has handled disconnect event in which device is connected with router internally but not externally?