I try to connect a Controller to Azure IoT Hub using a Root Certificate put on the controller in /etc/ssl/certs und SAS Token for IoT Hub instead of X.509 certificates.
The TLS Handshake is successful when I test in terminal using openssl. It seems that the Controller doesn't start this process. I use the Azure IoT Hub library and the Net Base Services.
Is there something left or something you can recommend?
Best regards
Mo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It sounds like your TLS setup is basically correct, since the handshake works via OpenSSL, so the issue is likely on the CODESYS side rather than the certificates themselves. From what Iβve seen with the Azure IoT Hub Client SL library, you should double-check that the SAS token is actually being generated and passed correctly to the function blocks (especially wsDeviceSaS) and that the MQTT/HTTPS FB is really triggered cyclically-otherwise the controller wonβt initiate the connection at all.
Also, make sure DNS, time (NTP), and full certificate chain trust are properly configured on the controller, since IoT Hub authentication depends on them even when using SAS tokens. Another thing worth checking is the library/runtime version-there are reports that certain versions changed behavior and caused connection issues.
Iβd recommend starting with the official demo project (AzureMQTTDemo) and comparing it step by step with your setup to see whatβs missing or not triggered. Speed Stars
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I try to connect a Controller to Azure IoT Hub using a Root Certificate put on the controller in /etc/ssl/certs und SAS Token for IoT Hub instead of X.509 certificates.
The TLS Handshake is successful when I test in terminal using openssl. It seems that the Controller doesn't start this process. I use the Azure IoT Hub library and the Net Base Services.
Is there something left or something you can recommend?
Best regards
Mo
It sounds like your TLS setup is basically correct, since the handshake works via OpenSSL, so the issue is likely on the CODESYS side rather than the certificates themselves. From what Iβve seen with the Azure IoT Hub Client SL library, you should double-check that the SAS token is actually being generated and passed correctly to the function blocks (especially wsDeviceSaS) and that the MQTT/HTTPS FB is really triggered cyclically-otherwise the controller wonβt initiate the connection at all.
Also, make sure DNS, time (NTP), and full certificate chain trust are properly configured on the controller, since IoT Hub authentication depends on them even when using SAS tokens. Another thing worth checking is the library/runtime version-there are reports that certain versions changed behavior and caused connection issues.
Iβd recommend starting with the official demo project (AzureMQTTDemo) and comparing it step by step with your setup to see whatβs missing or not triggered.
Speed Stars