Dear All,
I am using this example https://www.b4x.com/android/forum/threads/mqtt.65669/#content as a starting point and I added a Timer to blink a LED , publish the ESP32 internal temperature and also detect PIN change state , example attached
But I have an issue with scenario 3 when disconnecting the MQTT broker , timer is not working anymore and the pin event is not working either (hang-up about every 40 seconds)
Tests done :
1- Program start and everything is connected - OK works fine
2- Program running disconnect network , router (WiFi OFF) - "Disconnected" , "Trying to connect again", TIMER and PIN Change state are OK, Work fine during the reconnect process ,
then re-connect network router (Wifi ON)- program reconnect again everything works fine
3 - Program running everything OK, disconnect MQTT Broker (Mosquitto on Raspi ,unplug network cable ) - "Disconnected" , "Trying to connect again" , TIMER is blocked ~ 40 secondes ,PIN Change state is not active ,detected only ~40 seconds after switch pushed, then re-connect MQTT Broker (plug cable) - program reconnect again everything works fine.
Any idea about why Timer is blocked ? Any suggestion to make it working ?
Thanks a lot
I am using this example https://www.b4x.com/android/forum/threads/mqtt.65669/#content as a starting point and I added a Timer to blink a LED , publish the ESP32 internal temperature and also detect PIN change state , example attached
But I have an issue with scenario 3 when disconnecting the MQTT broker , timer is not working anymore and the pin event is not working either (hang-up about every 40 seconds)
Tests done :
1- Program start and everything is connected - OK works fine
2- Program running disconnect network , router (WiFi OFF) - "Disconnected" , "Trying to connect again", TIMER and PIN Change state are OK, Work fine during the reconnect process ,
then re-connect network router (Wifi ON)- program reconnect again everything works fine
3 - Program running everything OK, disconnect MQTT Broker (Mosquitto on Raspi ,unplug network cable ) - "Disconnected" , "Trying to connect again" , TIMER is blocked ~ 40 secondes ,PIN Change state is not active ,detected only ~40 seconds after switch pushed, then re-connect MQTT Broker (plug cable) - program reconnect again everything works fine.
Any idea about why Timer is blocked ? Any suggestion to make it working ?
Thanks a lot