7

I have been using AWS IoT implemented in a RPi for a while. I was wondering if I could use a controller like Atmega328 or some NRF based controllers or STM32 to publish and subscribe to AWS IoT MQTT broker ?

I did a bit of research on that and I'm stuck at how to do the authentication with the server with the certificates.

How do I integrate these controllers with AWS IoT?

  • 1
    Neither of these has the appropriate connectivity; to obtain that economically, you'll probably end up involving something that is a more capable computer, so you might as well use that and not these chips at all. In other woulds, you could do this if you tried hard enough to find a roundabout way, but it would be a fundamentally bad idea. – Chris Stratton Nov 11 '17 at 13:54
  • 1
    This might be of use github.com/copercini/esp8266-aws_iot – cujo Nov 11 '17 at 22:58
  • Than you for your suggestion @ChrisStratton . Do you think it will be possible with other mqtt brokers with limited authentication requirements ? – A.Rajib Kumar Gupta Nov 17 '17 at 6:06
  • 2
    You seem to be missing the point - an Arduino by itself has no wired or wireless network interface that would make it able to communicate with this service. In contrast, the economical things that do (ESP8266, Linux wifi router chip, etc) will have an easier time of performing the required operations than an Arduino would. So solve the communication problem, and you'll likely find a solution to the protocol one. – Chris Stratton Nov 17 '17 at 6:22
4

AWS IOT requires that your device understand TCP/IP and encryption.

The ATMega328 has 2K bytes of RAM, but Ethernet frames can be up to 1500 bytes long. Even if you could receive a packet, there wouldn't be any room left to process it.

The nRF51822 has 16K RAM, which is plenty for Ethernet, but not enough to do TCP/IP and WiFi. (Both of which require storing a lot of state.)

The smallest practical device with WiFi+TCP/IP is the ESP8266, which has 96K of RAM. Even then, you generally can only have one TCP connection at a time. They are getting cheaper all the time ($2). In fact, trying to add WiFi to an AtMega will mean you are adding a processor at least as big as the ESP8266. Some Arduino WiFi adapters have 10x the power of an ESP8266 (and 10x the price).

4

You might want to check out Amazon FreeRTOS.

Amazon FreeRTOS (a:FreeRTOS) is an operating system for microcontrollers that makes small, low-power edge devices easy to program, deploy, secure, connect, and manage. Amazon FreeRTOS is based on the FreeRTOS kernel, a popular open source operating system for microcontrollers, and extends it with software libraries that make it easy to securely connect your small, low-power devices to AWS cloud services like AWS IoT Core or to more powerful edge devices running AWS Greengrass.

There is support for connecting (and setting up credentials for) several small microcontrollers with AWS including an STM32 device.

  • That linked STM32 "device" is actually a board containing an STM32, and then another STM32 inside the Inventek serial-wifi submodule module. An efficient solution would just run the application inside the serial-wifi module (or its equivalent circuit), rather than use two processors to do the job of one. – Chris Stratton Mar 31 '18 at 19:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.