AWS IoT ExpressLink SARA-R5 Starter Kit - Getting started
UBX-21042016 - R02
Connecting to and interacting with the AWS cloud
Page 16 of 20
C1-Public
Wait for a handful of seconds for the message to arrive at the device (or monitor the
EVENT
pin) and
then, in the terminal application, type the command
AT+GET1
and press <return>.
You should receive the response
OK Hello from AWS IoT console
.
6.4
Exchanging Thing-specific data and commands with the
AWS cloud
If you leave the leading
/
off the topic name then the
TopicRoot
, which defaults to the
ThingName
,
will automatically be prepended to the subscription.
For instance, if you typed the command
AT+CONF Topic2=MyTopic
(i.e., leaving off the leading
/
) and
pressed <return>, then subscribed to that topic by typing the command
AT+SUBSCRIBE2
and
pressing <return>:
…th
en in the AWS IoT console
MQTT test client
, under
Publish to a topic
, you typed
/
ThingName
/MyTopic
into the
Topic name
field and, under
Message payload
, entered
Hello just to
ThingName
(or any message you like) and then clicked
Publish
:
…and t
hen a few seconds later, in the terminal application, you typed the command
AT+GET2
and
pressed <return>, you should receive the response
OK Hello just to
ThingName
.
You can also send to a
TopicX
using the command
AT+SENDx
<message>
; if that
TopicX
does not
start with a leading
/
then your entire send/get exchange will automatically occur beneath the unique
ThingName
of this device.