Sending data from your thing to the cloud
Before you begin
-
Using a terminal emulator, send an
AT<CR>
command to ensure that the smart terminal can receive AT commands. For more information, see General AT Commands.For information about connecting a terminal emulator to the modem, see Connecting to the LTE IoT 2 click.
-
Send an
AT+ETMINFO=version
command to verify that the version number is AnyNet SMARTconnectâ„¢ V0.99_ma or higher.If the version number is not in this range, you will need to update the modem software. For more information, see Over-the-air (OTA) updates.
-
Send an
AT+ETMSTATE="startmqtt"
command to enable the MQTT protocol -
Ensure you know the thing name that you set up in the cloud.
The example below uses AWS. The current AWS interface may differ slightly from the one we used in the example.
To test that your thing can publish information to the cloud:
-
Create two publish topics in the module.
-
Subscribe to the newly created publish topics using your cloud provider's console.
-
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.
-
In the Topic filter box, type:
+/<ThingName>
This subscribes AWS to all topics related to your thing.
-
Select Subscribe.
A subscription appears, listed in the Subscriptions panel.
-
-
Publish information to the topics you created in the module.
You can send a maximum payload of 1000 characters to AWS.
-
View the published information in the cloud.
If you can see the messages in the cloud, then your thing can successfully publish data into the cloud through the module.
Next, test that the cloud can publish messages to your thing.