IoTSampleSwift Not Connecting to MQTT Client

0

Background:

I am fairly new to exploring the services provided by AWS and am testing out some IoT projects.

I have a device that connects to my MQTT Server (AWS IoT) and can publish messages. This device does have a certificate attached to it, and that certificate has two policies attached as well. Both policies have admin rights for development and testing purposes.

I have created a federated user pool and allowed authorized and unauthorized clients to connect, and following the guide at https://github.com/awslabs/aws-sdk-ios-samples/tree/master/IoT-Sample/Swift

Within the constants file of the IoTSampleSwift:

I have updated AWSRegion to my correct region,
I have updated my IOT_ENDPOINT with the endpoint provided by AWS IOT,
I have tried both policies name's for the value of PolicyName.

Within the awsconfiguration.json file:

I have updated the PoolId to the pool Id provided by my federated pool,
I have updated my regions to the correct region "us-east-2"

The errors I get are:
MQTT Session error, error code 2 and Connection Status = 5

I would greatly appreciate any feedback or help anyone can provide

[edit] I figured it out. If you have a certificate associated with your thing, you need to load that certificate to your app client as well.

Edited by: theYeroc on May 28, 2019 6:28 AM

asked 5 years ago509 views
1 Answer
0

Hi,

I am facing the same problem. Could you please elaborate by loading the certificate to the app client? Thanks

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions