The module subscribes to the channels of all enabled modules, plus its own private channel:
| Channel | Purpose |
|---|---|
network_chan |
Connect or disconnect the cloud session as connectivity comes and goes |
cloud_chan |
Track the cloud connection state |
fota_chan |
Coordinate firmware updates and the reboot that applies them |
location_chan |
Forward Wi-FiĀ® scan results to the Cloud module |
main_priv_chan |
Receive the periodic cloud synchronization trigger |
The periodic synchronization runs on a dedicated workqueue rather than in the state machine. The delayed work only publishes MAIN_PRIV_CLOUD_SYNCHRONIZATION on the private channel main_priv_chan and reschedules itself, so that the work never touches the state machine directly, and the synchronization itself is performed in the main() thread like every other event.