This commit is contained in:
preethi ravi 2022-12-16 18:38:26 +05:30
Родитель 838413ac15
Коммит 1da31d3134
1 изменённых файлов: 0 добавлений и 36 удалений

Просмотреть файл

@ -92,9 +92,6 @@ To run the samples, ensure you have the following programs and tools installed o
- Have the following build environment setup: - Have the following build environment setup:
<summary><i>Instructions:</i></summary>
<p>
Linux: Linux:
```bash ```bash
@ -106,15 +103,11 @@ To run the samples, ensure you have the following programs and tools installed o
- Have [Microsoft Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) installed with [C and C++ support](https://docs.microsoft.com/cpp/build/vscpp-step-0-installation?view=vs-2019). - Have [Microsoft Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) installed with [C and C++ support](https://docs.microsoft.com/cpp/build/vscpp-step-0-installation?view=vs-2019).
</p>
- Have [Git](https://git-scm.com/download) installed. - Have [Git](https://git-scm.com/download) installed.
- Have Microsoft [vcpkg](https://github.com/microsoft/vcpkg) package manager and [Eclipse Paho MQTT C client](https://www.eclipse.org/paho/) installed. This installation may take an extended amount of time (~15-20 minutes). - Have Microsoft [vcpkg](https://github.com/microsoft/vcpkg) package manager and [Eclipse Paho MQTT C client](https://www.eclipse.org/paho/) installed. This installation may take an extended amount of time (~15-20 minutes).
<summary><i>Instructions:</i></summary>
<p>
NOTE: For the correct vcpkg commit, see [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/main/eng/vcpkg-commit.txt). NOTE: For the correct vcpkg commit, see [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/main/eng/vcpkg-commit.txt).
Linux: Linux:
@ -137,14 +130,9 @@ To run the samples, ensure you have the following programs and tools installed o
.\vcpkg.exe install --triplet x64-windows-static curl[winssl] cmocka paho-mqtt # Update triplet per your system. .\vcpkg.exe install --triplet x64-windows-static curl[winssl] cmocka paho-mqtt # Update triplet per your system.
``` ```
</p>
- Have OpenSSL installed. - Have OpenSSL installed.
<summary><i>Instructions:</i></summary>
<p>
Linux: Linux:
```bash ```bash
@ -162,14 +150,9 @@ To run the samples, ensure you have the following programs and tools installed o
$env:PATH=$env:PATH + ';<FULL PATH to vcpkg>\installed\x64-windows-static\tools\openssl' # Update complete path as needed. $env:PATH=$env:PATH + ';<FULL PATH to vcpkg>\installed\x64-windows-static\tools\openssl' # Update complete path as needed.
``` ```
</p>
- Have CMake installed. The minimum required is 3.10. - Have CMake installed. The minimum required is 3.10.
<summary><i>Instructions:</i></summary>
<p>
Linux: Linux:
- Ubuntu 18.04 or 20.04: - Ubuntu 18.04 or 20.04:
@ -190,7 +173,6 @@ To run the samples, ensure you have the following programs and tools installed o
- Use the Windows installer. - Use the Windows installer.
</p>
- Have the Azure SDK for Embedded C IoT repository cloned. - Have the Azure SDK for Embedded C IoT repository cloned.
@ -342,7 +324,6 @@ Set the following environment variables for all samples:
Set the following environment variables if running any of these samples: `paho_iot_hub_c2d_sample`, `paho_iot_hub_methods_sample`, `paho_iot_hub_telemetry_sample`, `paho_iot_hub_twin_sample`, `paho_iot_pnp_sample`, `paho_iot_pnp_component_sample` Set the following environment variables if running any of these samples: `paho_iot_hub_c2d_sample`, `paho_iot_hub_methods_sample`, `paho_iot_hub_telemetry_sample`, `paho_iot_hub_twin_sample`, `paho_iot_pnp_sample`, `paho_iot_pnp_component_sample`
<summary><i>Instructions to set environment variables for IoT Hub X.509 Certificate samples:</i></summary> <summary><i>Instructions to set environment variables for IoT Hub X.509 Certificate samples:</i></summary>
<p>
1. Retrieve variable information: 1. Retrieve variable information:
@ -367,15 +348,12 @@ Set the following environment variables if running any of these samples: `paho_i
$env:AZ_IOT_HUB_HOSTNAME='<hostname>' $env:AZ_IOT_HUB_HOSTNAME='<hostname>'
``` ```
</p>
#### IoT Provisioning X.509 Certificate Sample #### IoT Provisioning X.509 Certificate Sample
Set the following environment variables if running the sample: `paho_iot_pnp_with_provisioning_sample`, `paho_iot_provisioning_sample` Set the following environment variables if running the sample: `paho_iot_pnp_with_provisioning_sample`, `paho_iot_provisioning_sample`
<summary><i>Instructions to set environment variables for DPS X.509 Certificate sample:</i></summary> <summary><i>Instructions to set environment variables for DPS X.509 Certificate sample:</i></summary>
<p>
1. Retrieve variable information: 1. Retrieve variable information:
@ -400,7 +378,6 @@ Set the following environment variables if running the sample: `paho_iot_pnp_wi
$env:AZ_IOT_PROVISIONING_ID_SCOPE='<id-scope>' $env:AZ_IOT_PROVISIONING_ID_SCOPE='<id-scope>'
``` ```
</p>
#### IoT Hub Symetric Key (SAS) Sample #### IoT Hub Symetric Key (SAS) Sample
@ -408,7 +385,6 @@ Set the following environment variables if running the sample: `paho_iot_pnp_wi
Set the following environment variables if running the sample: `paho_iot_hub_sas_telemetry_sample` Set the following environment variables if running the sample: `paho_iot_hub_sas_telemetry_sample`
<summary><i>Instructions to set environment variables for IoT Hub Symmetric Key sample:</i></summary> <summary><i>Instructions to set environment variables for IoT Hub Symmetric Key sample:</i></summary>
<p>
1. Retrieve variable information: 1. Retrieve variable information:
@ -436,15 +412,12 @@ Set the following environment variables if running the sample: `paho_iot_hub_sa
$env:AZ_IOT_HUB_HOSTNAME='<hostname>' $env:AZ_IOT_HUB_HOSTNAME='<hostname>'
``` ```
</p>
#### IoT Provisioning Symmetric Key (SAS) Sample #### IoT Provisioning Symmetric Key (SAS) Sample
Set the following environment variables if running the sample: `paho_iot_provisioning_sas_sample` Set the following environment variables if running the sample: `paho_iot_provisioning_sas_sample`
<summary><i>Instructions to set environment variables for DPS Symmetric Key sample:</i></summary> <summary><i>Instructions to set environment variables for DPS Symmetric Key sample:</i></summary>
<p>
1. Retrieve variable information: 1. Retrieve variable information:
@ -472,8 +445,6 @@ Set the following environment variables if running the sample: `paho_iot_provisi
$env:AZ_IOT_PROVISIONING_ID_SCOPE='<id-scope>' $env:AZ_IOT_PROVISIONING_ID_SCOPE='<id-scope>'
``` ```
</p>
## Build and Run the Sample ## Build and Run the Sample
@ -518,11 +489,9 @@ This section provides an overview of the different samples available to run and
This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_c2d_sample.c) receives incoming cloud-to-device (C2D) messages sent from the Azure IoT Hub to the device. It will successfully receive up to 5 messages sent from the service. If a timeout occurs while waiting for a message, the sample will exit. X509 authentication is used. This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_c2d_sample.c) receives incoming cloud-to-device (C2D) messages sent from the Azure IoT Hub to the device. It will successfully receive up to 5 messages sent from the service. If a timeout occurs while waiting for a message, the sample will exit. X509 authentication is used.
<summary><i>How to interact with the C2D sample:</i></summary> <summary><i>How to interact with the C2D sample:</i></summary>
<p>
<b>To send a C2D message:</b> Select your device's "Message to Device" tab in the Azure Portal for your IoT Hub. Enter a message in the "Message Body" and select "Send Message". <b>To send a C2D message:</b> Select your device's "Message to Device" tab in the Azure Portal for your IoT Hub. Enter a message in the "Message Body" and select "Send Message".
</p>
### IoT Hub Methods Sample ### IoT Hub Methods Sample
@ -532,7 +501,6 @@ This section provides an overview of the different samples available to run and
This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_methods_sample.c) receives incoming method commands invoked from the the Azure IoT Hub to the device. It will successfully receive up to 5 method commands sent from the service. If a timeout occurs while waiting for a message, the sample will exit. X509 authentication is used. This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_methods_sample.c) receives incoming method commands invoked from the the Azure IoT Hub to the device. It will successfully receive up to 5 method commands sent from the service. If a timeout occurs while waiting for a message, the sample will exit. X509 authentication is used.
<summary><i>How to interact with the Methods sample:</i></summary> <summary><i>How to interact with the Methods sample:</i></summary>
<p>
A method named `ping` is supported for this sample. A method named `ping` is supported for this sample.
@ -544,8 +512,6 @@ This section provides an overview of the different samples available to run and
No other method commands are supported. If any other methods are attempted to be invoked, the log will report the method is not found. No other method commands are supported. If any other methods are attempted to be invoked, the log will report the method is not found.
</p>
### IoT Hub Telemetry Sample ### IoT Hub Telemetry Sample
@ -566,7 +532,6 @@ This section provides an overview of the different samples available to run and
This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_twin_sample.c) utilizes the Azure IoT Hub to get the device twin document, send a reported property message, and receive up to 5 desired property messages. If a timeout occurs while waiting for a message from the Azure IoT Hub, the sample will exit. Upon receiving a desired property message, the sample will update the twin property locally and send a reported property message back to the service. X509 authentication is used. This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_twin_sample.c) utilizes the Azure IoT Hub to get the device twin document, send a reported property message, and receive up to 5 desired property messages. If a timeout occurs while waiting for a message from the Azure IoT Hub, the sample will exit. Upon receiving a desired property message, the sample will update the twin property locally and send a reported property message back to the service. X509 authentication is used.
<summary><i>How to interact with the Twin sample:</i></summary> <summary><i>How to interact with the Twin sample:</i></summary>
<p>
A desired property named `device_count` is supported for this sample. A desired property named `device_count` is supported for this sample.
@ -582,7 +547,6 @@ This section provides an overview of the different samples available to run and
No other property names sent in a desired property message are supported. If any are sent, the log will report there is nothing to update. No other property names sent in a desired property message are supported. If any are sent, the log will report there is nothing to update.
</p>
### IoT Plug and Play Sample ### IoT Plug and Play Sample