10

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?

Helmar
  • 8,450
  • 6
  • 36
  • 84

2 Answers2

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.

sob
  • 2,640
  • 3
  • 19
  • 37
rose
  • 141
  • 2