7105 questions

8491 answers

13758 comments

10493 members

0 votes
994 views 7 comments
by
What is the best way to send data to AWS IoT using TRB140? Would prefer to use MQTT. Incoming data coming on UDP to TRB140.

How can I download AWS IoT SDK on TRB140 and start a connection with AWS IoT?
by
I can see various packages on TRB140 Wiki which can be uploaded onto the device, including Azure. Not able to see anything for AWS IoT though. Can I upload the AWS-IoT SDK downloaded from AWS onto TRB140?
by
Have done the setup as suggested in the answer below but still no data coming in the topic subscribed in AWS IoT Test section. What could be the possible reason? What do I need to check?

Also, why is there a separate MQTT publisher configuration available in TRB140 when it is already available in "Data to Server"? Is there any conflict in these two settings?

2 Answers

0 votes
by

Hello,

With the latest available TRB firmware: https://wiki.teltonika-networks.com/view/TRB140_Firmware_Downloads you can send Modbus data to AWS server.

Which one to use, is up to you but I would prefer MQTT over HTTPs for security reasons.

To start using TRB140 with AWS IoT you do not need to download any additional SDK packages. What you will need is:

- Working AWS account. To configure it correctly please try following this guide: https://docs.aws.amazon.com/iot/latest/developerguide/iot-gs.html

- To send Modbus data to AWS, go to Services -> Data to Server (if you do not see this option, enable Advanced mode, it can be done in the top right corner). Add new rule, select the protocol which you want to use (HTTPs or MQTT) then depending on the protocol, fill the URL / Host / Connection string field.

If using HTTPs URL should look like this: https://<endpoint link>:8443/topics/test

If using MQTT URL should look like this: https://a9fb89gxgcn2-ats.iot.us-east-2.amazonaws.com

But in the port section you need to enter: 8443

In topic section: test (or the topic name on which you will be listening for incoming information).

Now, to see if you are receiving data to AWS, go to TEST and create/add any topic, for this example topic was named: anyname. To test created topic, simple use Publish to a topic feature.

Best answer
by

I am slightly confused.

When I try and configure AWS IoT to communicate with my device, it asks for uploading the AWS SDK onto the device. See here https://ap-south-1.console.aws.amazon.com/iot/home?region=ap-south-1#/connectdevice/

Since you have mentioned that I do not need to upload anything onto TRB140, that means it already has AWS SDK and security certificates installed. Is that correct?

Also, ports mentioned on AWS for MQTT and HTTPs are as follows. The port 8443 is mentioned for HTTPs whereas you are recommending it for MQTT. Why is it so?

rotocol Authentication Port ALPN protocol name

MQTT over WebSocket

Signature Version 4 443

N/A

MQTT

X.509 client certificate

443

x-amzn-mqtt-ca

MQTT X.509 client certificate 8883 N/A

HTTPS

Signature Version 4

443

N/A

HTTPS

X.509 client certificate

443

x-amzn-http-ca

HTTPS X.509 client certificate 8443 N/A

Lastly, once I have configured a 'thing' on AWS IoT, and use TEST facility for MQTT on AWS, it works without any connection with my TRB140. So how do I actually check that my TRB140 is sending data successfully to the same topic on AWS?

by

Hello,

The latest available TRB140 firmware has all packages required for it to make secure connection to AWS.

- Also, ports mentioned on AWS for MQTT and HTTPs are as follows. The port 8443 is mentioned for HTTPs whereas you are recommending it for MQTT. Why is it so?

Here could be my typo issue, yes port 8443 is for HTTPS and 8883 is for MQTT.

- Lastly, once I have configured a 'thing' on AWS IoT, and use TEST facility for MQTT on AWS, it works without any connection with my TRB140. So how do I actually check that my TRB140 is sending data successfully to the same topic on AWS?

Yes, in TRB140 Data to Server tab you need to use the topic which you have configured on AWS, as AWS is listening on that topic. Here are some screenshots which should help you understand it better.

In the pictures you can see that I was using MQTT protocol for sending Modbus data to AWS server.

by
Many thanks for your time and support. That does clarify it for me.
by
Besides the configuration of "Data to Server" using MQTT, TRB140 configuration also has an option of MQTT Publisher setup. What is the difference between the two configurations? Do we need to always enable MQTT Pulisher first before we can use the MQTT protocol in "Data to Server"?
0 votes
by

Hello

by
Hello,

Could you confirm that the TRB142 works the same way as the TRB140? I mean, the TRB142 supports the AWS IoT SDK?

Thank you in advance