System overview

Serial Modem Host Applications

tags
Serial Modem Host Applications

Each application runs on the host MCU and uses a Serial Modem for cellular connectivity. The application is split into modules that each own one zbus channel. Both the requests sent to a module and the notifications it publishes go on that channel. All communication passes through the Main module, which implements the business logic and is the only module that knows about the others.

flowchart LR
    Main["Main module: business logic"]
    Network["Network module"] <-->|network_chan| Main
    Cloud["Cloud module"] <-->|cloud_chan| Main
    Location["Location module"] <-->|location_chan| Main
    Other["Other modules: FOTA, battery, buttons"] <-->|"one channel each"| Main

The following steps show the simplified flow of a typical operation:

  1. The Network module brings up the cellular link on startup and publishes NETWORK_CONNECTED on network_chan once it is usable.
  2. The Main module responds by starting a periodic cloud synchronization. Depending on the application, it connects to nRF Cloud, sends data, requests a location fix, and polls for firmware updates, one step at a time, by publishing requests on the other modules' channels and waiting for their replies.
  3. Each module does its work in its own thread and publishes the result on its channel, which the Main module uses to move to the next step.

See the module overview of each application for its modules and the diagram of the channels between them, for example the PPP modules.