connection information for a registered device in advance

yabool2001 1 Reputation point
2022-01-23T19:15:15.233+00:00

Hello,

I'm reading Get connected to Azure IoT Central documentation. There is chapter Register a single device in advance describing how to register an individual device. Do you know where I could find description how to connect to IoT Central using SAS keys from the connection information for a registered device. I tried different combination of connection_string for create_from_connection_string and create_from_sastoken to construct IoTHubDeviceClient object with no success.

best regards
Maciej Zemlo

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

1 answer

Sort by: Most helpful
  1. Sander van de Velde 28,161 Reputation points MVP
    2022-01-24T08:09:54.567+00:00

    Hello @yabool2001 ,

    you seem to try to access the IoT Hub, part of IoT Central directly.

    IoT Central is the Software-as-a-Service IoT platform from Microsoft. This solution simplifies deploying IoT solutions. It uses Azure PaaS resources under the cover, including IoT Hub, Time Series Insights, Stream Analytics, and Device provisioning Services.

    It's not possible to connect to device registrations in the IoT Hub directly (there was a solution in the past but that has been deprecated).

    Please check out how to connect to the Azure Device provisioning Services and try it with one of the samples. There are examples for C, C#, Python, NodeJS, and Java.

    You will notice the same flow is used for IoT Central.

    As an alternative, perhaps the Azure IoT Central bridge could be helpful. This exposes a webhook endpoint using Azure Functions and redirects an incoming message directly to a device in IoT Central. If this device does not exist yet, it will be registered first.

    0 comments No comments