2026-04-01 1:14 PM - last edited on 2026-04-24 1:36 AM by TarikAb
I am working on a project that uses the ST67W611 for cloud connectivity, but I am experiencing some issues when trying to connect to AWS IoT Core.
Note: The NCP is already flashed with the T01 binary.
The AWS endpoint is correct — for the sake of this question, let’s assume it is:
xxxxxx-something.amazonaws.com.
Broker: test.mosquitto.org
I am able to publish data to the broker and receive data from it when using test.mosquitto.org.
However, I am now trying to get it working so that our custom device can connect to AWS IoT Core.
(This is my current MQTT configuration.)
#define MQTT_BROKER "xxxxxxxxxxxxxxxxxxus-west-1.amazonaws.com"
#define MQTT_PORT 8883
#define MQTT_CLIENT_ID "Thing01"
#define MQTT_USE_TLS 4
#define MQTT_KEEPALIVE_S 60
static const char s_aws_ca_cert[] =
"-----BEGIN CERTIFICATE-----\r\n"
"Conten........\r\n"
"Conten........\r\n"
.....
"-----END CERTIFICATE-----\r\n"
static const char s_aws_client_cert[] =
"-----BEGIN CERTIFICATE-----\r\n"
"Conten........\r\n"
"Conten........\r\n"
.....
"-----END CERTIFICATE-----\r\n"
static const char s_aws_private_key[] =
"-----BEGIN RSA PRIVATE KEY-----\r\n"
"Conten........\r\n"
"Conten........\r\n"
"-----END RSA PRIVATE KEY-----\r\n"
static W6X_MQTT_Connect_t s_mqtt_cfg = {
.HostName = MQTT_BROKER,
.HostPort = MQTT_PORT,
.MQClientId = MQTT_CLIENT_ID,
.KeepAlive = MQTT_KEEPALIVE_S,
.Scheme = MQTT_USE_TLS,
.SNI_enabled = 1,
.CACertificateContent = (char *)s_aws_ca_cert,
.CertificateContent = (char *)s_aws_client_cert,
.PrivateKeyContent = (char *)s_aws_private_key,
.CACertificateName = "aws_ca.pem",
.CertificateName = "aws_client.crt",
.PrivateKeyName = "aws_client.key",
};
W6X_MQTT_Init(&s_recv_data);
W6X_MQTT_Configure(&s_mqtt_cfg);
Device Logs:
--------------- ST67W6X info ------------
ST67W6X MW Version: 1.2.0
AT Version: 1.0.0
SDK Version: 2.0.97
Wi-Fi MAC Version: 1.6.44
BT Controller Version: 1.6.121
BT Stack Version: 1.10.70
Build Date: Nov 19 2025 11:32:00
Module ID: C6AFDBD111400004 (-B)
BOM ID: 2
Manufacturing Year: 2025
Manufacturing Week: 16
Battery Voltage: 3.308 V
Trim Wi-Fi hp: 6,6,6,6,6,6,6,6,7,7,7,8,8,8
Trim Wi-Fi lp: 5,6,6,7,7,8,8,8,9,9,9,10,10,10
Trim BLE: 5,5,5,6,7
Trim XTAL: 37
MAC Address: 40:82:7b:03:77:84
Anti-rollback Bootloader: 0
Anti-rollback App: 0
-----------------------------------------
WiFi: Connecting to "F1-FLOOR"...
WiFi: Associated
File content is different: Delete operation requested
File copied to NCP
File content is different: Delete operation requested
File copied to NCP
File content is different: Delete operation requested
File copied to NCP
WiFi: IP ready — 192.168.100.xxx
MQTT: Connecting to xxxxxxxxxxxxxxxxxx.ats.iot.us-west-1.amazonaws.com:8883...
MQTT: Connected and subscribed to "test/cmd"
MQTT: Ready to publish on "test/data"
MQTT:Data Published.
File content is different: Delete operation requested
File copied to NCP
File content is different: Delete operation requested
File copied to NCP
File content is different: Delete operation requested
File copied to NCP
Even though I am not changing anything, this process happens on every boot.
Note: I have already tested AWS connectivity using a test script written in Python with the Paho MQTT library, and it works correctly. Therefore, there does not appear to be an issue on the AWS side.
2026-04-28 7:03 AM
Hello @MSalm.2 ,
Thank you for your post. Indeed there was an issue in the detection of the certificates when using MQTT in v1.2.0 of X-CUBE-ST67W61 delivery.
The new v1.3.0 solve the override of the certificates when they did not change. You can download the latest delivery from Github.
For the connection issue you face using AWS, did you ensure to give the same certificates when using the Paho MQTT library and ST67 solution ?
Did you correctly store the CA certificate used to generate the client certificate ?
Please let us know.
Regards
Louis