Azure-docs: Confusion on IoT Hub Connection String

Created on 30 Aug 2018  Â·  16Comments  Â·  Source: MicrosoftDocs/azure-docs

Hi, first of all this is a nicely packaged introductory article for using the IoT DevKit with Azure IoT Hub.

I was working through the final parts of the tutorial and ran into some issues that prevented me from finishing. It looks like the issues in the tutorial are resolved here .

Is this simply not updated to match that tutorial?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 assigned-to-author doc-bug iot-husvc triaged

Most helpful comment

Hi apologies looks like my initial response did not go through.

In the steps working with the IoTHub Workbench for VSCode, there are prompts given to the user that do not align with the prompts in the guide.

From the Guide

In this step: Click F1 to open the command palette, type and select IoT Workbench: Device, then select Config Device Settings > Select IoT Hub Device Connection String

Observed Behavior

When one clicks Config Device Settings, the option for Select IoT Hub Device Connection String only appears if you have also set up the IoTHub through the Cloud Provision interface outlined in the steps before. If, like me you had already set up an IoTHub online through the Azure Portal then the option for Select IoTHub Device would not show up, in which case it may be difficult for users to find the connection string (particularly for first time users.

Suggested Fix

Update the instructions to include a screenshot of the dropdown with both Select IoT Hub Device Connection String and Configure IoT Hub Device Connection String. Also add a note that if one has set up their IoT Hub with the Cloud Provision VSCode interface then the connection string will be automatically loaded for them, otherwise they will need to go into Azure Portal and retrieve the connection string from the settings. Providing sub-instructions on how to grab the connection string from the Azure Portal would also be useful.

Sorry for the delay hope these are helpful.

All 16 comments

@YoDaMa Thanks for the feedback! Can you point the issues in this doc that prevented you from finishing it so that we can update the document accordingly?

Thank you!

Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Hi apologies looks like my initial response did not go through.

In the steps working with the IoTHub Workbench for VSCode, there are prompts given to the user that do not align with the prompts in the guide.

From the Guide

In this step: Click F1 to open the command palette, type and select IoT Workbench: Device, then select Config Device Settings > Select IoT Hub Device Connection String

Observed Behavior

When one clicks Config Device Settings, the option for Select IoT Hub Device Connection String only appears if you have also set up the IoTHub through the Cloud Provision interface outlined in the steps before. If, like me you had already set up an IoTHub online through the Azure Portal then the option for Select IoTHub Device would not show up, in which case it may be difficult for users to find the connection string (particularly for first time users.

Suggested Fix

Update the instructions to include a screenshot of the dropdown with both Select IoT Hub Device Connection String and Configure IoT Hub Device Connection String. Also add a note that if one has set up their IoT Hub with the Cloud Provision VSCode interface then the connection string will be automatically loaded for them, otherwise they will need to go into Azure Portal and retrieve the connection string from the settings. Providing sub-instructions on how to grab the connection string from the Azure Portal would also be useful.

Sorry for the delay hope these are helpful.

Hello @YoDaMa thank you for coming back. Your feedback definitely help us improve the documentation :).

I know some changes were made after you opened this issue and other changes will be submitted soon.

I have assigned the issue to the content authors to evaluate and update as appropriate.

I am a new user to the MXChip and related tutorials. I have setup an Azure IoT hub prior to this instruction. I have found my connection string; however, I can not use it with the instructions. It says the format is invalid. It looks like it may be missing the DeviceId.

Any advice on what is wrong here would be helpful if you have any?

I am getting an error when after I upload and the device displays DPS failed.

This is the error below.

Error: Time:Thu Mar 21 18:05:29 2019 File:C:\Users\douga\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1libraries\AzureIoT\src\DevkitDPSClient.cpp Func:DevkitDPSClientStart Line:222 DiceInit failed! Check UDS string provided or set on configuration mode


* MXChip - Microsoft IoT Developer Kit *


You can 1. press Button A and reset to enter configuration mode.
2. press Button B and reset to enter AP mode.

Wi-Fi Verizon Moto Z (2) 4597 connected.
Time from pool.ntp.org, now is (UTC): Thu Mar 21 18:06:34 2019

Info: DPS Version: 1.2.12

Error: Time:Thu Mar 21 18:06:36 2019 File:C:\Users\douga\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1libraries\AzureIoT\src\DevkitDPSClient.cpp Func:DevkitDPSClientStart Line:222 DiceInit failed! Check UDS string provided or set on configuration mode

@DaDug, could you double check that you have set the UDS format correctly?

I'm having trouble with Step 6/7 of the "Send DevKit Telemetry". I am able to get the device into AP mode fine, bring up the web page running on the device at 192.168.0.1 fine, find my SSID fine. When I enter the connection string along with the SSID password and hit save, I either get a time out page or a "File /result not_found" HTTP response back. And when I check my Azure IOT hub state in the azure portal, I can see the hub and the device but no telemetry. I have tried this with getting the connection string via the Azure CLI and also by copying and pasting it from the Azure Portal.

Anyone else run into this?

Step 8. My device is simply stuck in "running" no telemetry gets to send. What shall I do?

Step 5 in Prepare the development environment - there is no option for the 3 dots - ... in my current and most updated VS Code version. I can only search and then do it, but what shall I search for here then?

@jakubsvobodacz you are looking for settings.json this is for VS Code settings and you can find it at
File > Preferences > Settings

I think you misunderstood my comment regarding step 5. I cannot just click the ... to get all the settings in JSON as shown here in this manual. the option does not show up until I search for something..

@jakubsvobodacz sorry about that. Thanks for the clarification. So this doc needs an update on the instructions and screenshot for finding the settings.json @liydu for awareness

Hi guys, is anybody looking into these comments? Step 8. My device is simply stuck in "running" nothing happens and no data is shown nor send. What shall I do? I purchased 2 of these kits and both of them end up in the same state while exactly following your instructions.. What is wrong here?

@jakubsvobodacz We will get you help from support engineer. Can you please file a support request @ https://aka.ms/azsupt? If you do not have access to a support plan, please reach out @ [email protected] with a link to this Doc/Issue as well as your subscription ID and we can help get the support ticket opened for this issue.

@jakubsvobodacz If you are still blocked, please contact support for further help.
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

varma31 picture varma31  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

bityob picture bityob  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments