Step 6: Verify

Serial Modem Host Applications

tags
Serial Modem Host Applications

The application runs a cloud synchronization 5 seconds after the network connects, and then every 10 minutes (CONFIG_APP_SYNC_BOOT_DELAY_SECONDS and CONFIG_APP_SYNC_INTERVAL). Each synchronization requests a location fix and reports the battery level.

  1. Wait for the next synchronization, or press Button 1 on the DK, or run button 1, to start one right away.
  2. Check that the console logs the location result and the battery report:

    <dbg> location: Location: 63.421,10.437 Uncertainty: 25m Method: Wi-Fi
    <dbg> cloud: Battery percentage reported: 87%
    

    The location line only appears after nRF Cloud has answered, so it confirms the whole round trip. Method is the source nRF Cloud used, which can differ from the requested one when several are allowed. The battery line means the modem accepted the message for sending.

  3. In nRF Cloud, go to Fleet > Devices and click your device. The device page shows the location fixes from each synchronization.

To test the cloud path by hand, send a message or request a location with the at shell. Single quotes keep the JSON double quotes intact:

uart:~$ at 'AT%NRFCLOUDMESSAGE={"appId":"TEST","data":"hello"}'
%NRFCLOUDMESSAGE: SENT
OK
uart:~$ at AT%NRFCLOUDLOCATION=1,1
OK
<dbg> location: Location: 63.421,10.437 Uncertainty: 1200m Method: Single-cell

If no location or battery data shows up, see Troubleshooting.