Sending data from your thing to the cloud

Before you begin

  • Using a terminal emulator, send an AT command to ensure that the smart terminal can receive AT commands.

    For information about connecting a terminal emulator to the modem, see Attaching to the Intelligent Cloud Connect.

  • Send an AT+ETMINFO=version command to verify that the version number is 2.0.20 or higher.

    If the version number is not in this range, you will need to update the modem software. For more information, see Updating software – Cinterion® PLS62‑W Wireless Module.

  • Ensure you know the thing name that you set up in AWS.

To test that your thing can publish information to AWS:

  1. Create two publish topics in the Cinterion® PLS62‑W Wireless Module.

    1. Using a terminal emulator, type:

      at+emqpubopen=0,"PublishToCloud0"<return>

      at+emqpubopen=1,"PublishToCloud1"<return>

    2. Check that the first two index numbers are assigned a topic each. Type:

      at+emqpubopen?<return>

      A list of index numbers and their assigned topics appears.

  2. Subscribe to the newly created publish topics in AWS.

    1. UsingAWS IoT, in the left hand menu, select Test to open the MQTT test client, then ensure you are on the Subscribe to a topic tab.

    2. In the Topic filter box, type:

      +/<ThingName>

      This subscribes AWS to all topics related to your thing.

    3. Select Subscribe.

      A subscription appears, listed in the Subscriptions panel.

  3. Publish information to the topics you created in the Cinterion® PLS62‑W Wireless Module.

    You can send a maximum payload of 1000 characters to AWS.

    1. Using the terminal emulator, type:

      at+emqpublish=0,1,"{\"Temperature\": 24}"<return>

      at+emqpublish=1,1,"{\"BatteryPower\": \"Low\"}"<return>

      The emqpublish command uses the following syntax:

      at+emqpublish=IndexNumber,QoS,

      "{PublishDataInJSON}"

      These messages instantly appear in AWS.

  4. View the published information in AWS.

    1. In the Subscriptions panel, select +/<thingName> to view all published messages.

If you can see the messages in AWS, then your thing can successfully publish data into the cloud through the Cinterion® PLS62‑W Wireless Module.

Next, test that the cloud can publish messages to your thing.