weixin_39707536
weixin_39707536
2020-12-28 07:20

Group Enrollment with x.509 authentication.

We have referred the below-mentioned documents.

1) https://github.com/espressif/esp-azure

2)https://github.com/espressif/esp-azure/tree/master/examples/iothub_devicetwin_samples_and_methods

3)https://github.com/espressif/esp-azure/tree/master/examples/prov_dev_client_ll_sample

Here the 2 document provides communication using the direct method with a connection string. And document 3 provides device provisioning using x.509 authentication. But actually, we are looking for direct communication between Azure IOT Hub and Esp32 device using x.509 authentication. So kindly share some documents or sample codes related to this.

该提问来源于开源项目:Azure/azure-iot-sdk-c

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39683176 weixin_39683176 3月前

    Hi , thanks for pointing this out. We will investigate and get back to you. As we understand it, you want a sample created to authenticate the client with X.509 from an ESP32. One note to clarify: do you mean a sample that is using telemetry, or direct methods?

    点赞 评论 复制链接分享
  • weixin_39707536 weixin_39707536 3月前

    Thanks for your replay

    You are absolutely right, I am looking for sample code or some supporting documents to authenticate ESP32 to Azure IOT hub using X.509 authentication using Direct method.

    点赞 评论 复制链接分享
  • weixin_39736934 weixin_39736934 3月前
    /home/admin1/azure-iot-sdk-c/iothub_client/samples/iothub_ll_client_x509_sample//iothub_ll_client_x509_sample.c , may this meets your requrement.
    
    点赞 评论 复制链接分享
  • weixin_39611070 weixin_39611070 3月前

    Hello: Di you find the soluttion? I dont know what is the connection string when you use X509 certificate. I have tried IoTHubClient_LL_CreateFromDeviceAuth with the firts string the IoTHub connection string, the second string the DevideID=xxxx string but it doesn.t work.

    For Windows developers is easy:

    
     var cert = new X509Certificate2(@"<absolute-path-to-your-device-pfx-file>", "1234");
        var auth = new DeviceAuthenticationWithX509Certificate("<device-id>", cert);
        var deviceClient = DeviceClient.Create("<your-iot-hub-name>.azure-devices.net", auth, TransportType.Amqp_Tcp_Only);
    </your-iot-hub-name></device-id></absolute-path-to-your-device-pfx-file>

    But I dont find the same functions in the IoT-SDK-C

    点赞 评论 复制链接分享
  • weixin_39793189 weixin_39793189 3月前

    You should be able to refer to the sample on our repository here: https://github.com/Azure/azure-iot-sdk-c/tree/09d68458675ede0452db20280e589109f0bd6e40/iothub_client/samples/iothub_ll_client_x509_sample

    Please let us know if you have any issues running this.

    Espressif maintains this port for ESP32 on the repo you referenced above, we'd also recommend opening an issue there for them to add this sample.

    点赞 评论 复制链接分享
  • weixin_39710361 weixin_39710361 3月前

    , , , , -msft, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey

    点赞 评论 复制链接分享
  • weixin_39707536 weixin_39707536 3月前

    Hi We are still having the same issue, We are not able to implement the same with the above references and Please excuse for the late reply.

    点赞 评论 复制链接分享
  • weixin_39793189 weixin_39793189 3月前

    Hi We are still having the same issue, We are not able to implement the same with the above references and Please excuse for the late reply.

    did you try the code sample I linked to above? have you also opened up an issue in the ESP32 repo?

    点赞 评论 复制链接分享

为你推荐