Azure IoT field gateway for ESP32, multiple device provisioning on 1 connection?

vv 0 Reputation points
2023-06-27T21:44:53.5766667+00:00

I'd like to have one ESP32 operate as a field gateway for Azure IoT. The ESP would be directly connected to Azure IoT (Central, preferable to Hub; preferably SAS auth), provision multiple Azure IoT Central devices, and send telemetry on their behalf via the same, single connection. The protocol (MQTT vs AMQP) isn't critical. FreeRTOS preferred.

I have some ESP32s running on Azure IoT Central and successfully sending telemetry for themselves, and I see examples on other platforms (Windows, Linux boxes) that operate as a field gateway, but I can't seem to find any running samples that do this and can be built for the ESP32 series.

Can anyone point me to a sample that does this?

From what I'm reading, this requires "multiplexing" only, which means Azure C SDK only (not for embedded, but I'm running it successfully because the ESP32 isn't THAT constrained), and AMQP only (currently using an MQTT sample). I'm also reading this simply isn't possible with the FreeRTOS Middleware packages from Microsoft.

I'm not sure if that's correct though. It seems like such an essential function that some code sample out there must be demonstrating this capability already. This is holding up multiple other projects, so I'd be very grateful for any help!

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
391 questions
Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
557 questions
{count} votes

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,951 Reputation points
    2023-07-05T23:41:32.8233333+00:00

    Hi @vv @OPname We noticed your feedback that the above answer was not helpful. Thank you for taking time to share your feedback.

    We have checked with the product team internally on the above request and here is the response we got from the team.

    1. We do not recommend using C-SDK on ESP32. For any resource constrained embedded devices (i.e. non-Linux/Windows/etc.) it is advised to use Embedded C SDK
      1. Embedded C SDK has support only for MQTT (AMQP/HTTP are not supported). 
        1. MQTT does not currently support multiplexing.
    2. Outside of Azure IoT Edge we currently do not support any gateway scenarios (i.e. acting "on-behalf-of" other device identities).

    Since ESP32 cannot act as IoT Edge device, I am afraid, the scenario you are trying to achieve cannot be tested/supported. I understand that this situation may have caused some inconvenience, and I want to express my gratitude for your efforts and patience in handling it. Hope this answers your question.

    We are here to help you and strive to make your experience better and greatly value your feedback. Looking forward to your reply. Much appreciate your feedback!