azure-sphere - 如何解决 azuresphere“AZURE_SPHERE_PROV_RESULT_DEVICEAUTH_NOT_READY”中的问题?
问题描述
我在文档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 集线器。没有成功。不知道该怎么办了。
解决方案
授权访问。在 azure sphere“admin-azuresphere@mytenant.onmicrosoft.com”中作为租户访问的用户应在 Azure IOT hub 和 Azure Provisioning 服务中获得授权。
Azuere 门户 -> 资源 -> Azure Hub -> 访问控制 (IAM)
推荐阅读
- unity3d - 对象对撞机有时不工作
- api - 在soapUI 中使用Groovy 提取JSON 字段
- javascript - Angular2:highcharts-angular 图表不呈现
- java - @oneTomany:是否有可能让不是所有孩子的父母?
- r - R - 携带最后一次观察变化的次数
- facebook - 新的 Facebook 应用程序错误“检查您的连接...”
- symfony - 教义查询仅获得许多相关的“第一个”(执行连接和选择以避免 N+1)
- asp.net-core - 具有多个 ClaimsIdentity 的 ASP.NET Core ClaimsPrincipal
- c# - 为什么视频教程中的立方体生成效果不一样?
- docker - “卷”:docker-compose up 后为空