States

Serial Modem Host Applications

tags
Serial Modem Host Applications

The following states are used by the module:

  • STATE_DISCONNECTED: The initial state, in which there is no cloud connection. A CLOUD_CONNECT message starts connecting.
  • STATE_CONNECTING: The module is attempting to connect, one attempt per CLOUD_PRIV_CONNECT_ATTEMPT message, until credentials and valid time are available. It publishes CLOUD_CONNECTED to itself on success, which is what moves the state machine on. Leaving the state cancels a scheduled retry.
  • STATE_CONNECTED: The cloud connection is up, and the module serves device message, shadow poll, Memfault post, and location requests. Leaving this state closes the CoAP session with nrf_cloud_coap_disconnect().