Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in MQTT Connection #54

Open
Martin-Biomed opened this issue Mar 27, 2022 · 2 comments
Open

Error in MQTT Connection #54

Martin-Biomed opened this issue Mar 27, 2022 · 2 comments

Comments

@Martin-Biomed
Copy link

Hi everyone,

I'm having an issue where my MQTT connection to AWS is failing to connect.

image

I'm a complete noob to both mbed and AWS, but I've modified the mbed_app.json file according to the README instructions. I haven't been able to connect to MQTT yet, and this is after trying different variables for "aws-mqtt-topic", I'm not sure what else I can do.

image

I've also attached some screenshots of how I've configured my IoT AWS Thing in the AWS IoT GUI:

image

image

I did notice that there aren't instructions on how to set the MQTT Broker Port to use 8883.

Really, I don't have a lot of ideas, does anyone have a suggestion (or even better, a solution) to this issue? or has anyone had a similar issue in the past?

Thanks in advance

@Martin-Biomed
Copy link
Author

Martin-Biomed commented Apr 5, 2022

Hi,

I've been doing a bit more digging on this problem. I went back to look at the github page for the AWSClient for mbed:
https://github.com/ARMmbed/mbed-client-for-aws/blob/master/source/AWSClient.cpp

I have been able to see that the message that pops up in the terminal is linked to this section of the code (part of the AWSClient::connect function):

image

I've gone back to see if the "Thing Name" I created in AWS matches up with what I wrote on the JSON file:

image

This left me confused, as it looks like the "aws-client-identifier" value in the mbed_app.json is exactly the same as the Thing Name in AWS. All security certificates for this "Thing" are active (as shown in the previous post).

I'm even using the wildcard option for the MQTT topic (after trying to subscribe to a specific topic). So I still don't know what could be going wrong:

image

@Martin-Biomed
Copy link
Author

NVM, I solved it, please refer to this link for the resolution: https://forums.mbed.com/t/mqtt-connection-error-for-aws-example-project/16707/7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant