This guide will walk you through the simple UDP integration of your Murata 1SC module and AWS IoT Core.
Murata AWS IoT Core Setup
solution template, and the associated Cloud Formation template.IoT Bridge
.Solution Templates
.Murata to AWS IoT Core (Simple)
template and click Import
.Help
at the bottom of the screen and open a ticket requesting a port be assigned for your application.In the future this step will not be required, but while routing via the internet, unique ports are required.
4.2. Enter the AWS IoT Core MQTT endpoint. The value should be just your host, such as aukyn7vasdf0dt-ats.iot.ca-central-1.amazonaws.com
.
4.3. Set an appropriate timeout. If there is no UDP activity within the timeout window, the MQTT connection to AWS IoT Core will be closed.
5. Click Import
. There should be no errors.
We will use the MQTT client built into the AWS Console to view the messages from our device.
IoT Core
.MQTT Test Client
in the left hand menu.Topic Filter
field, enter "#" and click Subscribe
.AT%SOCKETCMD="ALLOCATE",1,"UDP","OPEN","nostromo-udp.tartabit.com",<port>,5000
AT%SOCKETCMD="ACTIVATE",1
AT%SOCKETCMD="ALLOCATE",1,"UDP","OPEN","nostromo-udp.tartabit.com",<port>,5000
%SOCKETCMD:1
OK
AT%SOCKETCMD="ACTIVATE",1
OK
We will be sending the string "Hello, world!", strings must first be hex encoded before being transmitted.
AT%SOCKETDATA="SEND",1,13,"48656C6C6F2C20776F726C6421"
AT%SOCKETDATA="SEND",1,13,"31656C6C6F2C20776F726C6421"
%SOCKETDATA:1,13
OK
Now let's send a packet from AWS IoT Core and see it on our module.
Because we are using the internet for our communications, we have to navigate NAT timeouts, as such, you must send server to cloud messages within 1-2 minutes of sending a device to cloud message.
Publish to a topic
.Publish
to send the message.%SOCKETEV:1,1
AT%SOCKETDATA="RECEIVE",1,15
%SOCKETEV:1,1
AT%SOCKETCMD="INFO",1
%SOCKETCMD:"ACTIVATED","UDP","10.173.253.197","34.31.200.41",5000,5002
OK
AT%SOCKETDATA="RECEIVE",1,15
%SOCKETDATA:1,15,0,"48656C6C6F2066726F6D2073657276","34.31.200.41",5002
OK
AT%SOCKETCMD="DEACTIVATE",1
AT%SOCKETCMD="DELETE",1
``
> You have completed this getting started guide.
{.is-info}