The objective of the overall project was to build a chip to cloud reference implementation that clients can use in their end products.
Our goal to was to write firmware for AWS IoT connectivity, setup AWS EC2 infrastructure to save and process reference data.
The expertise we have gained building AWS IOT solutions helped us immensely building out the firmware for the project. The PoC hardware setup involved a RPi and a reference EVK
- Device Provisioning was accomplished by hard coding the certificates as this is a time critical PoC
- Data ingest was achieved with MQTT
- We utilized device driver already built to read data over SPI interface. The intial implementation was done with inter-process communication and sharing files. This was improved to include buffers for better error handling a singular code base
- Built on boot deployment with systemD for the executables to be ran upon boot.
- Built and ran tests to ensure data integrity
- Built and ran tests for device to cloud latency
Cloud Infrastructure and Development
We developed the first version of cloud architecture required to accomplish the PoC goals. The design was also done to ensure it supports scaling as desired. Project involved utilizing key AWS components to accomplish a full demonstrable solution. Key architecture tasks involved
- Selecting appropriate AWS services
- Understand product cloud requirements and selecting appropriate EC2 configurations
- Defining and implement DB Schemas
The AWS IoT core manages all the devices on the platform. Handles incoming raw location data, forwards them to the lambda function. Receive the computed location data and share it with one or more clients subscribed to a particular topic.
AWS EC2 Reference Data Server
The EC2 provides APIs to receive POST requests for reference data. The reference data shall be parsed and stored appropriately.
The EC2 instance was setup with following components
- Postgresql database
- Express Js
- Node Js
- Two Lambda functions were setup, first one to receive data from the RasPi and process it and second one to publish processed data.
- This was later optimized to use a single lamda function.
The PoC was successfully developed and delivered to the client. We relished the experience of building a device to cloud PoC with a very small team.