Robson Luis
Robson Luis

Reputation: 21

How to fix the problem in azuresphere "AZURE_SPHERE_PROV_RESULT_DEVICEAUTH_NOT_READY"?

I´m using the following steps in the documentation https://learn.microsoft.com/pt-br/azure-sphere/app-development/azure-iot-sample

I did in azsphere

device prep-debug

azsphere device wifi show-status -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

looks like everything is connected.

At visual studio when I run the app I got the following output :

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**

if I press the button "A" at AzSphere board I got the following msg. WARNING: Cannot send reported property; not connected to the IoT Hub.

My app manifest contains the following attributes.

{
  "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"
  }
}

I already tried restart the device, close visual studio, clean cache, verify the certificate (I also add a new enrollment group to set the valid certificate to them) create new iot hub. No success. don´t know what to do anymore.

Upvotes: 1

Views: 801

Answers (1)

Robson Luis
Robson Luis

Reputation: 21

Authorization access. The user who as the tenant access in azure sphere "[email protected]" should have authorization in Azure IOT hub and Azure Provisioning service.

Azuere Portal -> resources -> Azure Hub -> Access control (IAM)

Upvotes: 1

Related Questions