如何在“ azuresphere”“ AZURE_SPHERE_PROV_RESULT_DEVICEAUTH_NOT_READY”中解决问题?

时间:2019-04-02 19:26:24

标签: azuresphere

我正在使用https://docs.microsoft.com/pt-br/azure-sphere/app-development/azure-iot-sample文档中的以下步骤

我在azsphere中做过

设备准备调试

azsphere设备wifi显示状态-v

Start time (UTC): Monday, 01 April 2019 20:11:41
SSID                : namemywifi
Configuration state : enabled
Connection state    : connected
Security state      : psk
Frequency           : 2432
Mode                : station
Key management      : WPA2-PSK
WPA State           : COMPLETED
IP Address          : myishere
MAC Address         : 2c:f7:f1:08:92:65

看起来一切都已连接。

在Visual Studio中,运行应用程序时,我得到以下输出:

INFO: Opening MT3620_RDB_BUTTON_B.
INFO: Open RGB LED 0.
INFO: Open RGB LED 1.
INFO: Open RGB LED 2.
INFO: Currently connected WiFi network: 
INFO: SSID "mywifiname", BSSID 30:b5:c2:bc:d5:80, Frequency 2432MHz.

[Azure IoT] IoTHubDeviceClient_CreateWithAzureSphereDeviceAuthProvisioning returned 'AZURE_SPHERE_PROV_RESULT_NETWORK_NOT_READY'.
ERROR: Failed to connect to IoT Hub; will retry in 60 seconds**

如果我在AzSphere板上按下按钮“ A”,则会得到以下消息。 警告:无法发送报告的财产;未连接到IoT中心。

我的应用清单包含以下属性。

{
  "SchemaVersion": 1,
  "Name": "Mt3620AzureIoTHub1",
  "ComponentId": "mycomponentidishere",
  "EntryPoint": "/bin/app",
  "CmdArgs": [],
  "Capabilities": {
    "AllowedConnections": [ "global.azure-devices-provisioning.net", "myprojectinazuerehubishere.azure-devices.net" ],
    "AllowedTcpServerPorts": [],
    "AllowedUdpServerPorts": [],
    "Gpio": [ 8, 9, 10, 15, 16, 17, 18, 19, 20, 12, 13 ],
    "Uart": [],
    "I2cMaster": [],
    "SpiMaster": [],
    "WifiConfig": true,
    "NetworkConfig": false,
    "SystemTime": false,
    "DeviceAuthentication": "myidAuthenticationishere"
  }
}

我已经尝试过重新启动设备,关闭Visual Studio,清理缓存,验证证书(我还添加了一个新的注册组来为它们设置有效的证书)创建新的iot中心。没有成功不知道该怎么办了。

1 个答案:

答案 0 :(得分:0)

授权访问。作为租户访问天蓝色范围的用户 “ admin-azuresphere@mytenant.onmicrosoft.com”应该在Azure IOT中心和Azure Provisioning服务中具有授权。

Azuere门户->资源-> Azure Hub->访问控制(IAM)