Menu

Avoid Connecting To WiFi With IAS.begin()

Locked
sbis
Joined
2020-07-09 10:55:52
Posts
2

Avoid Connecting To WiFi With IAS.begin()

For the project I am doing I only want to use the OTA functionality in rare cases, when I want to update the firmware of a remote device using a temporary wifi access point created by a cellphone. When calling IAS.begin() I do not want to connect (or unsuccessfully try to connect) to WiFi automatically since the system relies on its low power consumption. By calling IAS.preSetAutoUpdate(false) I can avoid to look for an update and using IAS.WiFiDisconnect() I can disable WiFi right after calling IAS.begin().

But is there also a way I can avoid that the device tries to connect to WiFi every time IAS.begin() is called on boot-up?

Christiaan Broeders
Joined
2016-06-04 21:36:48
Posts
19

Yes, you can call the following function.

IAS.preSetConnWifiOnBoot(false);

This will set _automaticWifiConnectOnBoot  to false, wich will be checked while running IAS.begin() to determin if wifi should be started up.


Onno Dirkzwager
Joined
2016-06-04 21:36:48
Posts
67

In response to sbis (View post):

For the project I am doing I only want to use the OTA functionality in rare cases, when I want to up...

We recently added preSetConnWifiOnBoot(bool)

sbis
Joined
2020-07-09 10:55:52
Posts
2

Thank you, thats just what I needed. 👍