Hi,
Greetings!
Setup:
ESP-IDF v5.1.2
ESP-Rainmaker Switch Device using ESP32-WROVER-E 16MB Module with external RAM enabled
Initial condition:
Device is connected to Wi-Fi and also internet is available.
After sometime internet gets disconnected and only Wi-Fi is active.
Requirement:
Here we wish to stop all tasks/activities which tries to communicate over internet say like MQTT, Time Sync and other so that RF Radio use gets stopped for those activities.
And these activities will only start after internet connection gets restored.
As per web search we can check internet connectivity by using "ping" remote server.
However we are facing hurdles in understanding how we can identify which tasks are using internet apart from MQTT and SNTP, and also how we can stop such tasks using radio if there is no radio.
Also please note that in this case we wish to use Bluetooth Low Energy when there is no internet connection available.
Thank in advance.
Regards,
Dinesh
ESP-Rainmaker: allowing Bluetooth full access whenever there is no internet connectivity but Wi-Fi is present
-
- Posts: 309
- Joined: Wed Feb 20, 2019 7:02 am
Re: ESP-Rainmaker: allowing Bluetooth full access whenever there is no internet connectivity but Wi-Fi is present
ESP RainMaker itself uses only SNTP, MQTT and HTTP (if OTA is ongoing) for external communication. HTTP is not continuous so that may not be a problem. Moreover, the OTA itself will fail if Internet connectivity is lost and it is not retried automatically without querying via MQTT. SNTP sync happens one every hour and MQTT reconnects happen every 10 seconds after a failure. Since you do not intend to turn off Wi-Fi itself, I am not sure what exactly would the benefit of explicitly stopping MQTT and SNTP and use pings instead.
Re: ESP-Rainmaker: allowing Bluetooth full access whenever there is no internet connectivity but Wi-Fi is present
Hi Piyush,ESP_Piyush wrote: ↑Wed Oct 16, 2024 1:31 pmESP RainMaker itself uses only SNTP, MQTT and HTTP (if OTA is ongoing) for external communication. HTTP is not continuous so that may not be a problem. Moreover, the OTA itself will fail if Internet connectivity is lost and it is not retried automatically without querying via MQTT. SNTP sync happens one every hour and MQTT reconnects happen every 10 seconds after a failure. Since you do not intend to turn off Wi-Fi itself, I am not sure what exactly would the benefit of explicitly stopping MQTT and SNTP and use pings instead.
Thanks for your reply.
Please note that retrying MQTT connection with broker takes around 6-7 seconds if there is no internet and this is happening every 10 seconds as you said.
During these 6-7 seconds we are not able to communicate over Bluetooth .
So please guide how we can improve this 6-7 seconds time so that this saved time can be available for Bluetooth activity.
Who is online
Users browsing this forum: No registered users and 13 guests