Connecting to azure IOT hub with MQTT

i’m trying to use the MQTT-TLS library to send data from a boron to azure’s iot hub. i’m using X.509 authentacion as i don’t whant to have to update SAS tokens every day and i can’t find any informaion on how to do this.

this is what i’ve peced to gether:

MQTT client(host, port, callback);

client.enableTls(azureIoTHubRootCaPem, sizeof(azureIoTHubRootCaPem));//, device_crt, sizeof(device_crt), device_key, sizeof(device_key));

bool resalt = client.connect("device id", "link to iot hub", device_crt);

client.connect is retruning false, what am i doing wrong?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.