When I click on Onboard option in AWS IoT console, I see an option to register a thing. Clicking on it, followed by Get Started, shows me a page to select an SDK for registration. The first step is to select OS and then a language. At this point, I do not see an option to select a C or a C++ SDK!
The page for AWS IoT SDKs shows the C/C++ SDK. But, the page for AWS IoT Device SDK does not show the C++ SDK.
So, what are these various AWS SDKs? How are they different?
What are the differences between a AWS IoT SDK and a Eclipse Paho client for connecting to a MQTT broker?
What changes maybe needed for an Eclipse Paho client to connect to an AWS IoT MQTT end-point?
My goal is to build MQTT client in C/C++ for a RTOS device. I would register it 'outside' of the device.
1. Different SDKs
There are 2 main categories of AWS SDKs when it comes to AWS IOT.
You have the device SDKs that you typically run on a device
You have the AWS SDKs that you typically run in the cloud
Both come in a variety of languages. Device SDKs typically use MQTT and x509 certificates for authentication to AWS IOT but you can communicate over https as well. An overview of the supported protocols for iot clients can be found here. Keep in mind that devices typically tend to use bi-directional long lived communication with aws iot using MQTT (publish / subscribe). The http protocol can only be used to send messages from the device to AWS IOT.
If you're on a C based system you have 2 options :
CPP : https://github.com/aws/aws-iot-device-sdk-cpp
Embedded C : https://github.com/aws/aws-iot-device-sdk-embedded-C
These use standard MQTT communication.
2. Difference between AWS IoT SDK and Eclipse Paho
Both will use MQTT / x509 certificates and MQTT_SSL_VERSION_TLS_1_2.
In theory both should work with Aws IOT and I have seen working samples of the Eclispe Paho MQTT client in C++ running against Aws IOT.
From my experience, you're typically better off using the vendors SDK as they will have better support / samples / features then the more generic MQTT libs.
There's also some value about being cloud agnostic and using standard protocols / libraries like MQTT/Paho to avoid (aws) vendor lock-in.
3. Paho client and AWS IOT
AWS IoT needs TLS V1.2 so your Paho client needs to support that. I believe it should be possible now with Paho cpp.
Related
I am building an integration between IOT Edge Quectel_BG96 and AWS IOT Core. The requirements are:
These IOT edges should authenticate using Custom Authenticator ( Username and password )
Quectel_BG96 has difficulties to implment ALPN. This means that I am not able to connect from the device, as there is no way for us to set this parameter in the TLS connection.
I built everything and all pieces are working as expected: Able to authenticate, able to pub/sub with no issues, BUT not from the modem Quectel_BG96.
My question to the community is: Is there away I can skip the ALPN requirement? Or to anything in AWS infra that plays as a middleware between two devices: Edge and AWS IOT Core?
Thank you in advance for any help
I tried connecting to AWS IOT Core using mosquito_pub and it works with no issues. I am expecting to be able to connect to AWS IOT Core from the iot edge and without setting up the ALPN.
According to the doc, you can use mqtt over port 8883 without setting the ALPN. But it is with x509 certificates. Otherwise it is mqtt over websockets.
Here is the link:
https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html
I am already experienced with the Microsoft Azure Device Provisioning Service, which enables my devices to register themselfes through e.g. Certificates in the Microsoft Azure IoT Hub. That makes of course enrollment of thousand of devices easier.
I have no experience in Google Cloud Platform and i have seen that there is MQTT Broker and an IOT Core Service within GCP.
But i didnt get it and it does not seem to be, that the IOT Core Service offers a similar functionality to the Microsoft Azure Device Provisioning Service.
Is this correct? Or how could i enroll lots of devices in an GCP IoT Architecture with automatic device registry and "distribution" over multiple IoT Core Services?
You could take a look at the Registeries and Device APIs to do the same. Having said that, one api call equals creation of one device.
I am working on a project wherein a mobile app (Flutter app) should create a unique identity (IOT thing) of my IOT device machine (on AWS) as soon as the user logins onto the app and also it should establish a connection (and subsequent communications) with the isolated IOT device after its configuration (Somewhat similar to Google Home configuration process).
The process starts with user logging onto the app (using AWS Amplify/Congnito to automatically add the user account in the cloud). Subsequently, the app needs to configure the IOT device (ESP32) and send Wifi credentials of home network by connecting to ESP's WiFi AP. However, since both the app and IOT device are isolated from each other (except during the configuration process), I don't have much idea on how exactly will mobile app connect (creating a unique IOT thing automatically) and communicate with the isolated IOT device over AWS IOT cloud.
I have worked with some of the AWS services like AWS Lambda, DynamoDB, AWS IOT for quite a while, hence I am aware of the basics. One of the possible solutions for the above maybe Fleet Provisioning by a Trusted User feature provided by AWS IOT (I did read it's documentation, but still confused). We can also use ESP32's Bluetooth feature for the app to scan nearby devices with which it needs to connect with, but I am not sure how will the connection establish through AWS cloud.
Since I am a beginner to AWS cloud services, it'd be great if someone can provide a possible solution for the above in detail. Also if possible, please provide a solution which would work incase of a large-scale deployment of the above project.
The parts you may be missing are missing are 1) MQTT messaging, which is the IoT message broker service provided by IoT Core, and 2) the need for an application program interface to handle creating and activating devices.
MQTT is a lightweight and widely adopted messaging protocol that is designed for constrained devices.
Your devices (things) will need to communicate back to AWS via MQTT messages, which are captured and processed by the IoT Rules service.
These rules typically trigger Lambda functions, which implement the process logic you need for your application.
See https://mqtt.org/ and https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html
2} you will want to implement a simple API to handle device activation. The AWS API Gateway service makes it easy to implement APIs. For example, you can implement an endpoint for POST /device/ to create a device. That endpoint can trigger a Lambda handles device provisionsing.
IoT beginner here... I am looking to build a mobile app to communicate to one of my devices using AWS / Azure IoT. Before start building the app I thought to get advice from experts. Does AWS / Azure IoT has any built-in mobile app which I can reuse or do I need to build app from scratch? I would really appreciate if anybody can share the whole process (Not AWS / Azure IoT communication but the steps to build mobile app for AWS / Azure IoT)
This is really off-topic for SO, however each IoT Provider like Azure and AWS does have it's own quick start guides.
Raspberry Pi 3, running Windows 10 IoT Core OS has some built in support for their IoT Hub integration, if you are familiar with C# its a very easy entry point to IoT in general.
See Windows 10 Internet of Things
I am new to AWS IOT. I'm working on a project where I use BeagleBone boards as device gateways which will connect to AWS IoT. I wish to use either the C or C++ device SDKs on the boards to communicate with AWS IoT.
The problem I have is with the provisioning and authentication phase. It is easy to create a "thing" via AWS IoT cloud, generate keys, X.509 certificates for the device and then copy them to the device.
However, it would be ideal to generate the keys and certificate on the device itself during provisioning (this is possible of course), but then automatically communicate with AWS IoT via the SDKs and assign the X.509 certificate to a "thing" already registered there.
Is there any API for doing this? I feel there is a lack of application examples out there. Thanks in advance for any suggestions.