Recently I purchased a TP-Link HS100 smart plug which I configured using an app and all is working well. Now I am trying to understand the underlying software and hardware architecture for such an implementation. Based on simple Google searches, the following is my understanding.
The headless smart plug makes a peer to peer connection to a device such as a mobile phone or computer. Using a device with a UI, network configurations are entered into the IoT device. The IoT device then connects to the access point to make some type of authentication with a cloud service, and establishes a connection. The mobile app communicates the commands to the cloud service which then relays the command to the smart plug. This is pretty straightforward.
I like to understand a little bit deeper in both software and hardware architecture for this type of design. It is fair say that there is some type of Wi-Fi device like the CC3100 Wi-Fi chip or similar. There is some type of microcontroller like an ARM Cortex. It could be an integrated Wi-Fi controller such as a CC3200.
What is the underlying software and hardware architecture to implement such a design to setup and establish a secure communication link? What type of minimum security needs to be implemented to secure the device? I am hoping someone on this site has experience with such an adaptation (2.4 GHz) and is willing to share their experience.