awsiot | ESP8266 / ESP32 examples with Amazon AWS IoT

 by   HarringayMakerSpace C++ Version: Current License: No License

kandi X-RAY | awsiot Summary

kandi X-RAY | awsiot Summary

awsiot is a C++ library typically used in Internet of Things (IoT), Arduino, Amazon S3 applications. awsiot has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

ESP8266 / ESP32 examples with Amazon IoT.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              awsiot has a low active ecosystem.
              It has 40 star(s) with 22 fork(s). There are 8 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 1 have been closed. On average issues are closed in 176 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of awsiot is current.

            kandi-Quality Quality

              awsiot has 0 bugs and 0 code smells.

            kandi-Security Security

              awsiot has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              awsiot code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              awsiot does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              awsiot releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of awsiot
            Get all kandi verified functions for this library.

            awsiot Key Features

            No Key Features are available at this moment for awsiot.

            awsiot Examples and Code Snippets

            No Code Snippets are available at this moment for awsiot.

            Community Discussions

            QUESTION

            Custom IoT Endpoint
            Asked 2022-Mar-23 at 06:11

            We need to use a custom IoT endpoint due to firewall restrictions and needing to utilize Static Ips. We followed this AWS doc to get our endpoint with static Ips.. From here we are attempting to call the CreateKeysAndCertificate via Java. Now when we call IoT with our custom domain name, iot.custom.domain.name.com, with the regular Java SDK it works fine. However, whenever we try to use the Android SDK and call setEndpoint with our custom domain we get the following error

            ...

            ANSWER

            Answered 2022-Mar-23 at 06:11

            When using the Android SDK for establishing IOT connections, the CreateKeysAndCertificateRequest API is available through the AWSIotClient class. If you are using the AWSIotClient for creating new certs/keys, the SDK places this request on the generic iot..amazonaws.com endpoint. The setEndpoint method just allows you to change the region. This is because the request goes to the Control plane, whereas the endpoint that you have created would mostly likely be on the Data plane. There is no way around to create new certs/keys using the AWSIotClient on the custom endpoint.

            There is an alternate option that you can make use of. Almost all "requests" that you place on the IOT endpoint are messages that are published to "reserved topics". If you open up the Java SDK's PublishCreateKeysAndCertificate API, you will see that it is ultimately publishing a message over a reserved topic. You can do something similar on Android using the Android SDK as well.

            First, you will have to establish an authenticated connection. We cannot use CognitoCredentialsProvider because of that auth request going to the Control Plane. Instead, you can use the provisioning certificates for the first time authentication. This is through provision certificates generated for a Provisioning Fleet. You can create a Provisioning Fleet and use those certificates in your device's keystore (or, a PKCS12 cert file). Using that, you can create a new awsIotMqttManager object and publish a message on the reserved topic meant for creating new certs/keys. You can also subscribe to reserved topics meant for receiving the "accepted"/"rejected" responses for this request.

            TL;DR

            • Create an awsIotMqttManager using the provision certs
            • Subscribe to topic for listening for accepted/rejected response for CreateKeysAndCertificates request
            • Publish a message over the reserved topic meant for CreateKeysAndCertificates
            • Register the thing using the ownershipToken received in the response
            • Store the new certs and use them for all future connections (make sure the policy attached to the certs have the necessary permissions)

            Source https://stackoverflow.com/questions/71515818

            QUESTION

            Issues publishing to device shadow using the aws-iot-device-sdk-python-v2
            Asked 2021-Oct-25 at 09:24

            In a python application that uses the aws iot device sdk for python v2 (v1.7.1) I am running into an issue where I cannot update the device shadow.

            After starting the program, the DeviceShadowManager will attempt to get the latest shadow state and set it locally. If a delta state is present the DeviceShadowManager will merge the last reported state and delta state and publish it. That works. However, when the manager subscribes for updates, after the initial setup, I am running into an error, where when the desired state changes, the manager cannot update the reported state. Here is the error:

            ...

            ANSWER

            Answered 2021-Oct-25 at 09:24

            I am pretty sure the problem lies within

            Source https://stackoverflow.com/questions/69696291

            QUESTION

            React & AWS IoT MQTT over WSS - "connection lost - will attempt reconnection in x seconds"
            Asked 2021-Jun-21 at 20:20

            I am unable to successfully connect to an AWS IoT device via MQTT using websockets with authenticated cognito users. I am using aws-iot-device-sdk in a react application. Upon trying to connect, the following debug logs get printed to the web browser console:

            ...

            ANSWER

            Answered 2021-Jun-21 at 20:20

            Resolved this problem.

            In case anyone else was having this issues: the problem I was having was the Cognito User did not have a necessary certificate associated with it in order to access the resource.

            Source https://stackoverflow.com/questions/68038468

            QUESTION

            How to Run AWS in React App Without Call Tries Exceeded Error?
            Asked 2021-Mar-23 at 02:36

            I'm trying to build a React phone app that connects to AWS once it starts up. The first time I ran the app using Expo I got an error about missing the module "Util," so I followed this separate thread to resolve that issue. Afterwards, I got another issue regarding "filesys.existsSync is not a function," so I followed this other thread to resolve that issue.

            When I followed the second thread, I connected the client through a websocket protocol rather than using a certificate. After making these changes, I tested to see if the connection worked in a node.js file, and it connected without any issues. I can also confirm that the React app runs without error on Expo without the AWS code. However, as soon as I try to combine the two, I get the following error.

            In Expo, I get the following error logging:

            ...

            ANSWER

            Answered 2021-Mar-23 at 02:36

            After messing around with things for a while, I managed to figure out the issue. For whatever reason, expo/React did not like the import import Aws from 'aws-sdk/dist/aws-sdk-react-native';, so I instead changed it to import Aws from 'aws-sdk'. Even with the changed import, I could still call Aws.config, so nothing needed to change drastically with the code. I also moved the following codeblock into the IoTConnect function:

            Source https://stackoverflow.com/questions/66687440

            QUESTION

            Using awsiotsdk when subscribing to a topic with QoS.EXACTLY_ONCE, encountering AWS_ERROR_MQTT_UNEXPECTED_HANGUP
            Asked 2021-Jan-22 at 22:44

            I'm following the example pub/sub in awsiotsdk.

            ...

            ANSWER

            Answered 2021-Jan-22 at 22:44

            EXACTLY_ONCE (MQTT QOS level 2) is not currently supported by the AWS IoT Core server. This is mentioned in the source:

            Source https://stackoverflow.com/questions/65849905

            QUESTION

            not able to subscribe dynamic topic. using aws-iot-device-sdk
            Asked 2020-Dec-04 at 01:24

            when I subscribe dynamic topic for connecting shadow. I m not able to establish connect the device. with out subscribe it's connected but not able to receive message payload.

            Code

            ...

            ANSWER

            Answered 2020-Dec-04 at 01:24

            yes you can't able to subscribe dynamic topic you have to change the policy "arn:aws:iot:ap-south-1:453533943651:topic/${iot:Connection.Thing.ThingName}/*" to *..for allow all device.then you can subscribe.topic/${iot:Connection.Thing.ThingName} this denotes the thingname should be come end of the topic. change to allow all you will able to subscribe.

            Source https://stackoverflow.com/questions/65075458

            QUESTION

            AWS IOT GetThingShadow API request sends response "Signature expired"
            Asked 2020-Oct-17 at 13:26

            ...

            ANSWER

            Answered 2020-Oct-17 at 13:26

            I am posting the correct final version of my code in case anyone is facing similar issue. Three things were wrong in my original code.

            • X_AMZ_DATE (YYYYMMDDTHHMMSSZ) didn't use it in HEADERS and STRING_TO_SIGN. Hence, was getting Signature expired error.
            • SERVICE I thought would be iot but it is iotdata. Credential should be scoped to correct service error was resolved.
            • CANONICAL_URI should only contain part after the domain and before query parameters. Eg. If request URI is https://foo.bar.baz.com/foo1/foo2/foo3?bar1=baz1&bar2=baz2 then CANONICAL_URI = "/foo1/foo2/foo3"

            Source https://stackoverflow.com/questions/64400319

            QUESTION

            How does the AWS IoT security system utilize the keyPath, certPath, caPath to establish a secure connection?
            Asked 2020-Oct-05 at 05:57

            To send telemetry from a thing (say Sensor1) to AWS IoT Core endpoint, we need:

            1. AWS IoT Certificate Authority Public Certificate
            2. Certificate with appropriate policy and Sensor1 attached
            3. Private key of certificate from point 2
            ...

            ANSWER

            Answered 2020-Oct-03 at 06:57

            The certificates and private key are used to resolve three questions:

            1. As a client, am I talking to the real AWS IoT server and not an imposter?
            2. As the AWS IoT server, am I talking to a registered client and not an imposter?
            3. Can the client and server communicate securely without someone listening in?

            The certificates and private key are used to implement mutual TLS to resolve these questions. This allows the client to authenticate the AWS IoT server (question 1) as well as the server to authenticate the client (question 2). The certificates also enable a secure TLS communication channel between the client and server (problem 3)

            For the client authenticating the AWS IoT server (from https://docs.aws.amazon.com/iot/latest/developerguide/server-authentication.html):

            When your device or other client attempts to connect to AWS IoT Core, the AWS IoT Core server will send an X.509 certificate that your device uses to authenticate the server. Authentication takes place at the TLS layer through validation of the X.509 certificate chain This is the same method used by your browser when you visit an HTTPS URL.

            The client uses the certificate referenced by the caPath to validate the certificate that it receives from the server that it connects to.

            For the AWS IoT server to authenticate the client (from https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html#x509-client-cert-basics):

            AWS IoT authenticates client certificates using the TLS protocol's client authentication mode.

            In TLS client authentication, AWS IoT requests an X.509 client certificate and validates the certificate's status and AWS account against a registry of certificates. It then challenges the client for proof of ownership of the private key that corresponds to the public key contained in the certificate.

            The server authenticates the client by receiving the registered certificate referenced by certPath and by the client using the private key referenced by keyPath to sign a message that proves that the client holds the private key.

            Source https://stackoverflow.com/questions/64149119

            QUESTION

            AWS IoT Connection error : Invalid "caCert" option supplied with aws-iot-device-sdk
            Asked 2020-Apr-13 at 16:39

            I've provisioned a device in AWS with device Certificate which is signed by my CA. Also, I've registered my CA along with verificationCert in AWS previously.

            Now when I send the data, In the options,

            ...

            ANSWER

            Answered 2020-Apr-11 at 20:16

            The doc implies you should be passing paths to the files for the TLS certificate's and key.

            e.g.

            Source https://stackoverflow.com/questions/61161984

            QUESTION

            "certificate verify failed" when bridging AWS IoT with local Mosquitto MQTT
            Asked 2020-Mar-20 at 02:16

            I have a mosquitto MQTT on a local raspberry pi working like a charm. I created a MQTT broker on AWS IoT that works as well.

            On my raspberry pi I can connect, publish and subscribe on the AWS broker "manually", using the commands mosquitto_pub and mosquitto_sub. When I do this manually, i use all the certificates and stuff. The command I use is:

            ...

            ANSWER

            Answered 2020-Mar-20 at 02:16

            Ok, I have no idea of what I did, I just know it fixed the problem.

            At first I did a clean install of mosquitto on a Ubuntu VM I have and everything worked correctly.

            Then I uninstalled Mosquitto from my raspberry pi and installed it again. Configured it just the way I configured the Ubuntu VM and still no luck. I started to think the problem was my raspbian image... but after fiddling a little bit on the configurations, moving the certificates files from one directory to another, changing their permissions, changing the bridge.conf file directory and stuff... It started working and now it's ok.

            So if youre having this problem in the future: maybe is just the permissions of the files or directories.

            EDIT (one day later): as I tried to replicate the same thing on another broker, I did everything the same but as soon as my local broker stablished the connection with AWS IoT bridge the connection was lost (message below. No certificate error this time):

            Source https://stackoverflow.com/questions/60708669

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install awsiot

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/HarringayMakerSpace/awsiot.git

          • CLI

            gh repo clone HarringayMakerSpace/awsiot

          • sshUrl

            git@github.com:HarringayMakerSpace/awsiot.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular C++ Libraries

            tensorflow

            by tensorflow

            electron

            by electron

            terminal

            by microsoft

            bitcoin

            by bitcoin

            opencv

            by opencv

            Try Top Libraries by HarringayMakerSpace

            ESP-Now

            by HarringayMakerSpaceC++

            usb-esp

            by HarringayMakerSpaceC++

            sonoff-adhoc

            by HarringayMakerSpaceC++

            WiFiPowerMeter

            by HarringayMakerSpaceC++

            gd32vf103-rust

            by HarringayMakerSpaceRust