Skip to content

Latest commit

 

History

History
52 lines (29 loc) · 3.03 KB

iot-hub-get-started-create-hub-and-device.md

File metadata and controls

52 lines (29 loc) · 3.03 KB

Create an IoT hub

  1. In the Azure portal, click New > Internet of Things > IoT Hub.

    Create an iot hub in the Azure portal

  2. In the IoT hub pane, enter the following information for your IoT hub:

    Name: It is the name for your IoT hub. If the name you enter is valid, a green check mark appears.

    Pricing and scale tier: Select the free F1 tier. This option is sufficient for this demo. See pricing and scale tier.

    Resource group: Create a resource group to host the IoT hub or use an existing one. See Using resource groups to manage your Azure resources.

    Location: Select the closest location to you where the IoT hub is created.

    Pin the dashboard: Check this option for easy access to your IoT hub from the dashboard.

    Fill in the fields for creating your Azure IoT hub

  3. Click Create. It could take a few minutes for your IoT hub to be created. You can see progress in the Notifications pane.

    See notifications of your IoT hub creation progress

  4. Once your IoT hub is created, click it from the dashboard. Make a note of the Hostname, and then click Shared access policies.

    Get the hostname of your IoT hub

  5. In the Shared access policies pane, click the iothubowner policy, and then copy and make a note of the Connection string of your IoT hub. For more information, see Control access to IoT Hub.

    Get your IoT hub connection string

Register a device in the IoT hub for the your device

  1. In the Azure portal, open your IoT hub.

  2. Click Device Explorer.

  3. In the Device Explorer pane, click Add to add a device to your IoT hub.

    Device ID: The ID of the new device.

    Authentication Type: Select Symmetric Key.

    Auto Generate Keys: Check this field.

    Connect device to IoT Hub: Click Enable.

    Add a device in the device explorer of your IoT hub

  4. Click Save.

  5. After the device is created, open the device in the Device Explorer pane.

  6. Make a note of the primary key of the connection string.

    Get the device connection string