Does anyone know how to fix this? Thanks in advance for your help.
Jaime.
Hello @Jaime,
you can see how the IoT Hub supports MQTT without using any of the Azure IoT Device SDKs here.
The example is written in C# but you get a feeling on how the specific topics are working.
There, you see you need to provide the SAS token for a device.
Is your device named 'device' as seen in:
hostname: tcp://OffimanIoT.azure-devices.net/device/?api-version=2021-04-12:1883
I'm not sure if the 'tcp://' or 'mqtt://' are working.
Regarding the port, please check if you use 8883 as documented.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.