You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-connect-downstream-iot-edge-device.md
+54-2Lines changed: 54 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: How to configure an IoT Edge device to connect to Azure IoT Edge ga
4
4
author: kgremban
5
5
6
6
ms.author: kgremban
7
-
ms.date: 03/01/2021
7
+
ms.date: 01/09/2022
8
8
ms.topic: conceptual
9
9
ms.service: iot-edge
10
10
services: iot-edge
@@ -532,8 +532,60 @@ The API proxy module was designed to be customized to handle most common gateway
532
532
1. Select **Review + create** to go to the final step.
533
533
1. Select **Create** to deploy to your device.
534
534
535
+
## Integrate Microsoft Defender for IoT with IoT Edge gateway
536
+
537
+
Leaf devices can be used to integrate the Microsoft Defender for IoT's micro agent with the IoT Edge gateway using leaf device proxying.
538
+
539
+
Learn more about the [Defender for IoT micro agent](../defender-for-iot/device-builders/overview.md#defender-for-iot-micro-agent).
540
+
541
+
**To integrate Microsoft Defender for IoT with IoT Edge using leaf device proxying**:
542
+
543
+
1. Sign in to the Azure portal.
544
+
545
+
1. Navigate to **IoT Hub**>**`Your Hub`**>**Device management**>**Devices**
546
+
547
+
1. Select your device.
548
+
549
+
:::image type="content" source="media/how-to-connect-downstream-iot-edge-device/select-device.png" alt-text="Screenshot showing where your device is located for selection.":::
550
+
551
+
1. Select the `DefenderIotMicroAgent` module twin that you created from [these instructions](../defender-for-iot/device-builders/quickstart-create-micro-agent-module-twin.md#create-defenderiotmicroagent-module-twin).
552
+
553
+
:::image type="content" source="media/how-to-connect-downstream-iot-edge-device/defender-micro-agent.png" alt-text="Screenshot showing the location of the DefenderIotMicroAgent.":::
554
+
555
+
1. Select the :::image type="icon" source="media/how-to-connect-downstream-iot-edge-device/copy-icon.png" border="false"::: button to copy your Connection string (primary key).
556
+
557
+
1. Paste the Connection string into a text editing application, and add the GatewayHostName to the string. For example, `HostName=nested11.azure-devices.net;DeviceId=leaf1;ModuleId=module1;SharedAccessKey=xxx;GatewayHostName=10.16.7.4`.
558
+
559
+
1. Open a terminal on the leaf device.
560
+
561
+
1. Use the following command to place the connection string encoded in utf-8 in the Defender forCloud agent directory into the file `connection_string.txt`in the following path: `/var/defender_iot_micro_agent/connection_string.txt`:
:::image type="content" source="media/how-to-connect-downstream-iot-edge-device/device.png" alt-text="Screenshot showing how to navigate back to your device.":::
578
+
579
+
1. Enable the connection to the IoT Hub, and selectthe gear icon.
580
+
581
+
:::image type="content" source="media/how-to-connect-downstream-iot-edge-device/gear-icon.png" alt-text="Screenshot showing what to select to set a parent device.":::
582
+
583
+
1. Select the parent device from the displayed list.
584
+
585
+
1. Ensure that port 8883 (MQTT) between the leaf device and the IoT Edge device is open.
586
+
535
587
## Next steps
536
588
537
589
[How an IoT Edge device can be used as a gateway](iot-edge-as-gateway.md)
538
590
539
-
[Configure the API proxy module for your gateway hierarchy scenario](how-to-configure-api-proxy-module.md)
591
+
[Configure the API proxy module for your gateway hierarchy scenario](how-to-configure-api-proxy-module.md)
0 commit comments