cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the Nx_MQTT_Client (STM32Cube_FW_U5_V1.1.0) connect to AWS?

Scott Löhr
Senior II

Hello - just trying to make a sanity connection to AWS IOT, unsecured port 1883, but it fails with a very non-specific error like not connected. I changed the demo app to use unsecure port 1883 and it connects and successfully sends the MQTT messages to the mosquito as well as the hivemq test server. But when I plug in my AWS IOT endpoint for MQTT_BROKER_NAME it does not connect. Any hints or tips or tricks?

On a side note, when I undefined the secure connect variables (NX_SECURE_ENABLE and NXD_MQTT_REQUIRE_TLS) there was a bit of work to do to make it compile (and thereby connect in unsecure mode). It was not a big deal, but it would be nice if it was already done for the sake of sanity for the MQTT / IOT newbie.

1 ACCEPTED SOLUTION

Accepted Solutions
Scott Löhr
Senior II

Well, I figured it out - I got the ST Nx_MQTT_Client sample app to connect and publish and receive MQTT messages with my account on AWS IOT after days of study and tedious trial and error. It has to be only by using secure with the x509 certificate, apparently AWS does not allow unsecure.

What a bummer that an AWS IOT MQTT connection is not one of the sample apps ready to use. And what a disappointment that ST is not supporting this forum by assigning an FAE to cover it the way that Remy is all over the important questions posted to STM32 Wireless / STM32 BLE forums.

View solution in original post

1 REPLY 1
Scott Löhr
Senior II

Well, I figured it out - I got the ST Nx_MQTT_Client sample app to connect and publish and receive MQTT messages with my account on AWS IOT after days of study and tedious trial and error. It has to be only by using secure with the x509 certificate, apparently AWS does not allow unsecure.

What a bummer that an AWS IOT MQTT connection is not one of the sample apps ready to use. And what a disappointment that ST is not supporting this forum by assigning an FAE to cover it the way that Remy is all over the important questions posted to STM32 Wireless / STM32 BLE forums.