Azure IoT Middleware for Freertos - Failed to establish MQTT connection, error 0x00000006
I used the ESP32S3 for azure iot connection and according to the code I have done the following:
DPS:
prvConnectToServerWithBackoffRetries --> OK
AzureIoTProvisioningClient_Init --> OK
AzureIoTProvisioningClient_Register --> OK
AzureIoTProvisioningClient_GetDeviceAndHub --> OK
IoT Hub:
prvConnectToServerWithBackoffRetries --> OK
AzureIoTHubClient_OptionsInit --> OK
AzureIoTHubClient_Init --> OK
But it fails in the call to AzureIoTHubClient_Connect with the previous log messages. AzureIoTResult_t value is 1.
We also encountered the same problem, and then we updated the certificate and this problem still occurred:
E (28665) MQTT: Connection refused: not authorized.
E (28665) MQTT: CONNACK recv failed with status = MQTTServerRefused.
E (28675) MQTT: MQTT connection failed with status = MQTTServerRefused.
E (28685) AZ IOT: Failed to establish MQTT connection: Server=XXX.azure-devices.net, MQTT error=0x00000006.
In the same question, I saw that deleting the Module ID would allow me to connect to azure iot, but I tried to leave the MODULE ID unconfigured or leave it empty.
Can you please help me? Please help check it.