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

preguntada hace 5 años522 visualizaciones
1 Respuesta
0

Hi,

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

respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas