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

질문됨 5년 전524회 조회
1개 답변
0

Hi,

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

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠