How to Connect Downstream Device using x509 Certificates

Connor 6 Reputation points

I am having trouble figuring out how to connect a downstream device to my IoT Central application. There is sample code showing how to do it using symmetric keys, but I am interested in using x509 certificate ( I've tried using the code in the EdgeX509AuthDownstreamDevice sample, but I am not sure what to put for the IOTHUB_HOSTNAME environment variable since IoT Central doesn't expose the IoT Hub. Any advice would be appreciated. Thank you.

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
331 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 25,531 Reputation points

    @Connor Welcome to Microsoft Q&A forum!
    I see you that you have raised the issue on Stack Overflow as well and same has been addressed by Ranga Vadlamudi.

    The variables used are misleading. You don't see the IoTHUB connection string. Below, just replace the device shared key and it should work:

    export IOTHUB_DEVICE_CONNECTION_STRING="HostName=edgegateway;DeviceId=thermostat1;SharedAccessKey={your device shared key}"  

    Hope this will help. Please let us know if you have any further queries.


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.