-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/add_docs_to_provisioning_example' into 'master'
example/prov_dev_client_ll_sample: Cleanups and add documentation See merge request esp-components/esp-azure!7
- Loading branch information
Showing
8 changed files
with
104 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Azure CLI usage | ||
|
||
## login [any operation should login first] | ||
``` | ||
az login | ||
``` | ||
|
||
## list all device | ||
``` | ||
az iot hub device-identity list --hub-name [IoTHub Name] | ||
``` | ||
|
||
## get device connection string | ||
``` | ||
az iot hub device-identity show-connection-string -n [IoTHub Name] -d [Device ID] | ||
``` | ||
|
||
## create one device | ||
``` | ||
az iot hub device-identity create -n [IoTHub Name] -d [Device ID] | ||
``` | ||
|
||
## delete one device | ||
``` | ||
az iot hub device-identity delete -n [IoTHub Name] -d [Device ID] | ||
``` | ||
|
||
## monitor your device | ||
``` | ||
az iot hub monitor-events -n [IoTHub Name] --login 'HostName=myhub.azuredevices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=12345' | ||
``` | ||
|
||
## send message to device | ||
``` | ||
az iot device c2d-message send -d [Device Id] -n [IoTHub Name] | ||
``` | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#IoT HUB MQTT Client | ||
|
||
# Device Configuration | ||
|
||
Run `make menuconfig` -> `Example configuration` to configure IoT MQTT client example | ||
|
||
Fetch IoT device connection string | ||
``` | ||
az iot hub device-identity show-connection-string -n [IoTHub Name] -d [Device ID] | ||
``` | ||
|
||
## Building your demo and flash to ESP device | ||
|
||
Run the following command to flash and monitor the output | ||
|
||
``` bash | ||
make -j4 flash monitor | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Azure Provisioning Demo | ||
|
||
This example demonstrates X509 certificate based device access control to provisioning service. | ||
Refer [this](https://docs.microsoft.com/en-us/azure/iot-dps/concepts-security#controlling-device-access-to-the-provisioning-service-with-x509-certificates) to learn more. | ||
|
||
## Provisioning Setup | ||
|
||
Follow the [step-by-step tutorial](https://docs.microsoft.com/en-us/azure/iot-dps/#step-by-step-tutorials) to setup the provisioning service. | ||
|
||
## Device Leaf certificate and key | ||
|
||
Copy Device Leaf certificate to `main/certs/leaf_certificate.pem` and `main/certs/leaf_private_key.pem` | ||
|
||
## Device Configuration | ||
|
||
Run `make menuconfig` -> `Example configuration` to configure provsioning client example | ||
|
||
Fetch `IoT Hub Connection String` from [azure portal](https://portal.azure.com) | ||
or through Azure CLI by using the following command: | ||
|
||
``` | ||
az iot hub show-connection-string -n <IoT_hub_name> | ||
``` | ||
|
||
Fetch Unique Device Provisioning Service ID Scope from azure portal | ||
|
||
## Building your demo and flash to ESP device | ||
|
||
Run the following command to flash and monitor the output | ||
|
||
``` bash | ||
make -j4 flash monitor | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters