I’ve been trying for hours to find a way to receive messages on my esp running Mongoose OS from the Azure IoT Hub, my goals is to trigger some code(or function) from the Azure IoT Hub(using Functions apps, but I’ll figure this out later).
How can I connect these?
I was thinking of using MQTT but I can’t find any documentation on how to do this. Thank you very much!
To send messages from the cloud via the IoT Hub to devices, you do not use the MQTT protocol. Instead you (usually) use the IoT Hub Service SDK. See here for an example how to do this in C#: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-csharp-csharp-c2d#send-a-cloud-to-device-message
There are also SDKs for other languages. If you don't want to use any of the SDKs, you could also call the REST API of the IoT Hub's service side.
Here is also an example that shows how to do this in an Azure Function (just first google result): https://gist.github.com/jsturtevant/1d383c682d0d2c6422218bac4b7f5c8d#file-run-csx