Cellular
on()
Cellular.on()
turns on the Cellular module. Useful when you've turned it off, and you changed your mind.
Note that Cellular.on()
does not need to be called unless you have changed the system mode or you have previously turned the Cellular module off. When turning on the Cellular module, it will go through a full re-connect to the Cellular network which will take anywhere from 30 to 60 seconds in most situations.
// SYNTAX
Cellular.on();
Note: Cellular.on()
API is non-blocking on all platforms except for Electron with threading disabled.
Since 2.1.0:
Cellular.isOn()
can be used to actively wait for when the modem gets powered on. Alternatively network system events can be used to track the power state of the modem.