Trouble Connecting ESP32 to Azure IoT Hub - Missing AzureIoTUtility.h Library

Vinu George 45 Reputation points
2024-10-02T05:29:29.19+00:00

Hi everyone,

I'm trying to connect my ESP32 to Azure IoT Hub using the Arduino IDE. I've followed the steps to install the required libraries (AzureIoTHub, AzureIoTProtocol_MQTT, etc.), but I keep encountering a compilation error. The error specifically states that the AzureIoTUtility.h file is missing:

yaml
Copy code
fatal error: AzureIoTUtility.h:

I attempted to download the library from GitHub, but it seems the AzureIoTUtility file is no longer present in the current repository version. Here's the link I tried, but it returns a 404 error: https://github.com/Azure/azure-iot-arduino/tree/master/src/AzureIoTUtility.

Steps I've taken so far:

  1. Installed AzureIoTHub via the Arduino Library Manager.
  2. Searched the GitHub repository for the missing file.
  3. Tried to include other Azure-related libraries, but the error persists.

My Setup:

  • ESP32
  • Arduino IDE
  • Installed Azure IoT Hub libraries using the Arduino Library Manager
  • Target: Connect ESP32 to Azure IoT Hub and send telemetry data.

Has anyone else encountered this issue, or can someone guide me on how to ensure I have the latest libraries installed for Azure IoT on ESP32? Is there a workaround or updated repository location for these files?

Thanks in advance for your help!

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,272 questions
Azure | Azure Startups
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 36,766 Reputation points MVP Volunteer Moderator
    2024-10-02T07:45:06.0166667+00:00

    Hello @Vinu George,

    welcome to this moderated Azure community forum.

    Because you are using code from a GitHub repo, I recommend submitting an issue in the repo with the question (please add a reference to that issue here).

    Then, the owners of that azure-iot-arduino repo are aware about this question.

    Because you use C, have you seen these samples?

    See also this list of embedded device SDKs

    As an alternative, check out the nanoFramework where you run C# code on a ESP32. You can even connect to the new EventGrid MQTT broker.


    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.