Home Community Blog Buy Now
Blog

Misty Community Forum

Connection to Azure IoT Hub Device Provisioning Service

Hello all,
I’m attempting to connect Misty to an Azure IoT Hub using the Azure Device Provisioning Service (DPS). Provisioning fails and the TPM display shows invalid data. Steps are below.
Also, I have other devices running Windows 10 IoT Core that I’m able to provision to Azure in a similar way, so I know the steps work for those cases.

  1. Connect to the IoT Core Device Portal :8080
  2. Go to TPM Configuration and install the latest tools.
    tpm01
  3. Go to Azure Clients and enter the Id Scope of the Azure DPS Service
  4. Click configure
  5. Install the latest Device Management client
  6. In the actions dropdown select “Start”
  7. Go back to TPM configuration to see the error:
    tpm02

I’ve tried resetting the TPM, rebooting Misty, etc. I can get this to work consistently on a Raspberry Pi running Windows 10 IoT Core with the simulated TPM. I don’t have any other hardware TPM devices on which to test. I appreciate any suggestions for resolving this.

Thanks,
Stacy

Hi Stacy,

Unfortunately, I don’t have a canned answer for you as I’ve not spent any time with the TPM recently. I’ll take a look later today and see if I can reproduce the issue. I’ll follow up as soon as I know more.

Morgan

Well, I followed your instructions and got the same result, so that’s good. I’m certainly not an expert with the fTPM on the 410, but I’ll keep digging in. I’ll test today with a Dragonboard 410C (which is the same hardware, more or less) and see if it works there. If it does, the problem may be in our OS build. I also have a contact at Microsoft who may be able to give us more specific direction in understanding how do diagnose the issue.

Additionally, I was looking for unrelated log information this morning and noticed that provisioning the DM tools created a dm directory on the file system. That directory had some log files, one of which had a relevant clue. Not sure what it means yet, but I thought I’d share. The pertinent log information is:

11-43-54 AM [00002724] [00003116] DpsRegisterDeviceAndModules11-43-54 AM [00002724] [00003116] DpsRegisterDevice11-43-54 AM [00002724] [00003116] tpm slot number: 011-43-54 AM [00002724] [00003116] dpsUri: global.azure-devices-provisioning.net11-43-54 AM [00002724] [00003116] id scope: 0ne000EBC1F11-43-54 AM [00002724] [00003116] Start registration process11-44-13 AM [00002724] [00003116] registation_status_callback11-44-13 AM [00002724] [00003116] Provisioning Status: PROV_DEVICE_REG_STATUS_CONNECTED11-44-15 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\adapters\hsm_client_tpm.c Func:insert_key_in_tpm Line:348 Failed Load Id key.11-44-15 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\adapters\hsm_client_tpm.c Func:hsm_client_tpm_import_key Line:542 Failure inserting key into tpm11-44-15 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\src\prov_auth_client.c Func:prov_auth_import_key Line:525 failure importing key into tpm11-44-15 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\src\prov_device_ll_client.c Func:prov_transport_challenge_callback Line:173 Failure to import the provisioning key11-44-15 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\src\prov_transport_http_client.c Func:prov_transport_http_dowork Line:961 NULL sas_token provided in challenge callback.11-44-16 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\src\prov_device_ll_client.c Func:on_transport_registration_data Line:763 Failure retrieving data from the provisioning service11-44-16 AM [00002724] [00003116] register_device_callback11-44-16 AM [00002724] [00003116] Failure encountered on registration: %s

PROV_DEVICE_RESULT_TRANSPORT11-44-22 AM [00002724] [00003116] Registration failed, retry11-44-22 AM [00002724] [00003116] Start registration process11-44-22 AM [00002724] [00003116] registation_status_callback11-44-22 AM [00002724] [00003116] Provisioning Status: PROV_DEVICE_REG_STATUS_CONNECTED11-44-24 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\adapters\hsm_client_tpm.c Func:insert_key_in_tpm Line:348 Failed Load Id key.11-44-24 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\adapters\hsm_client_tpm.c Func:hsm_client_tpm_import_key Line:542 Failure inserting key into tpm11-44-24 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\src\prov_auth_client.c Func:prov_auth_import_key Line:525 failure importing key into tpm11-44-24 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\src\prov_device_ll_client.c Func:prov_transport_challenge_callback Line:173 Failure to import the provisioning key11-44-24 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\src\prov_transport_http_client.c Func:prov_transport_http_dowork Line:961 NULL sas_token provided in challenge callback.11-44-25 AM [00002724] [00003116] Error: File:d:\git\csdkupdate3\deps\azure-iot-sdk-c\provisioning_client\src\prov_device_ll_client.c Func:on_transport_registration_data Line:763 Failure retrieving data from the provisioning service11-44-25 AM [00002724] [00003116] register_device_callback11-44-25 AM [00002724] [00003116] Failure encountered on registration: %s

Thanks for looking into this. I’ll take a closer look at the logs as well to see if I get any clues.

I’m continuing to dig into this. It looks like the stock Windows Iot Core image (17763) works correctly on a Dragonboard 410c. The SOM in the robot isn’t strictly identical, but I’d expect them to work the same. I’ll push the default image to my robot and see if that resolves that issue. If it does, there’s likely something nefarious in our OS image.

1 Like