• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

azure-sdk-for-c/11-Mar-2024-

azure_iot_security_module/11-Mar-2024-29,13619,674

docs/11-Mar-2024-3,8512,692

samples/11-Mar-2024-3,7582,640

README.mdD11-Mar-20247.6 KiB11376

nx_azure_iot.cD11-Mar-202429.2 KiB834596

nx_azure_iot.hD11-Mar-202415.6 KiB331167

nx_azure_iot_adu_agent.cD11-Mar-2024203.1 KiB4,4203,226

nx_azure_iot_adu_agent.hD11-Mar-202435.6 KiB805369

nx_azure_iot_adu_root_key.cD11-Mar-20249.2 KiB12077

nx_azure_iot_hub_client.cD11-Mar-2024135.1 KiB3,3802,586

nx_azure_iot_hub_client.hD11-Mar-202459.2 KiB967219

nx_azure_iot_hub_client_properties.cD11-Mar-202417.3 KiB380291

nx_azure_iot_hub_client_properties.hD11-Mar-202412.3 KiB26536

nx_azure_iot_json_reader.cD11-Mar-20248.2 KiB279205

nx_azure_iot_json_reader.hD11-Mar-20249.2 KiB21852

nx_azure_iot_json_writer.cD11-Mar-202415.2 KiB434333

nx_azure_iot_json_writer.hD11-Mar-202413.4 KiB30752

nx_azure_iot_provisioning_client.cD11-Mar-202461.7 KiB1,4351,091

nx_azure_iot_provisioning_client.hD11-Mar-202417.5 KiB29298

README.md

1# Azure IoT Middleware for Azure RTOS
2
3Azure IoT Middleware for Azure RTOS is a platform specific library that acts as a binding layer between the Azure RTOS and the [Azure SDK for Embedded C](https://github.com/Azure/azure-sdk-for-c). Goals of this layer are following:
4
5* Expose smart client interfaces (IoTHub_Client, DeviceProvisioning_Client) for the customers, to be consumed in their application.
6* Orchestrate the interaction between Embedded C SDK and platform.
7* Provide Azure RTOS platform initialization.
8* [IoT Plug and Play](https://learn.microsoft.com/azure/iot-develop/overview-iot-plug-and-play) support.
9* Security capabilities.
10* Resource limitation aware.
11* Protocol support.
12
13## Getting Started
14
15See the following samples on how to get started on development boards with Azure IoT Middleware for Azure RTOS:
16
17Manufacturer | Device | Samples |
18| --- | --- | --- |
19| STMicroelectronics | [STM32F746GDISCOVERY](https://www.st.com/en/evaluation-tools/32f746gdiscovery.html) | [IAR](https://aka.ms/azrtos-sample/f746g-iar) • [STM32Cube](https://aka.ms/azrtos-sample/f746g-cubeide)
20| STMicroelectronics | [B-L4S5I-IOT01](https://www.st.com/en/evaluation-tools/b-l4s5i-iot01a.html) / [B-L475E-IOT01](https://www.st.com/en/evaluation-tools/b-l475e-iot01a.html) | [GCC/CMake](https://github.com/azure-rtos/getting-started/tree/master/STMicroelectronics/STM32L4_L4%2B) • [IAR](https://aka.ms/azrtos-sample/l4s5-iar) • [STM32Cube](https://aka.ms/azrtos-sample/l4s5-cubeide)
21| NXP | [MIMXRT1060-EVK](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/mimxrt1060-evk-i-mx-rt1060-evaluation-kit:MIMXRT1060-EVK) | [GCC/CMake](https://github.com/azure-rtos/getting-started/tree/master/NXP/MIMXRT1060-EVK) • [IAR](https://aka.ms/azrtos-sample/rt1060-iar) • [MCUXpresso](https://aka.ms/azrtos-sample/rt1060-mcuxpresso)
22| Renesas | [RX65N-RSK-2MB](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rx-32-bit-performance-efficiency-mcus/rx65n-2mb-starter-kit-plus-renesas-starter-kit-rx65n-2mb) | [GCC/CMake](https://github.com/azure-rtos/getting-started/tree/master/Renesas/RSK_RX65N_2MB) • [IAR](https://aka.ms/azrtos-samples/rx65n-rsk-2mb-iar) • [E2Studio CCRX](https://aka.ms/azrtos-samples/rx65n-rsk-2mb-ccrx) • [E2Studio GNURX](https://aka.ms/azrtos-samples/rx65n-rsk-2mb-gnurx)
23| Renesas | [RX65N-Cloud-Kit](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rx-32-bit-performance-efficiency-mcus/rx65n-cloud-kit-renesas-rx65n-cloud-kit) | [E2Studio CCRX](https://aka.ms/azrtos-samples/rx65n-ck-ccrx) • [E2Studio GNURX](https://aka.ms/azrtos-samples/rx65n-ck-gnurx)
24| Microchip | [ATSAME54-XPRO](https://www.microchip.com/developmenttools/productdetails/atsame54-xpro) | [GCC/CMake](https://github.com/azure-rtos/getting-started/tree/master/Microchip/ATSAME54-XPRO) • [IAR](https://aka.ms/azrtos-sample/e54-iar) • [MPLAB](https://aka.ms/azrtos-sample/e54-mplab)
25| MXCHIP | [AZ3166](https://aka.ms/iot-devkit) | [GCC/CMake](https://github.com/azure-rtos/getting-started/tree/master/MXChip/AZ3166)
26
27## Building
28
29The Azure IoT Middleware for Azure RTOS is built as part of the NetX Duo. Make sure you have defined the following macros in the `CMakeLists.txt` or `nx_user.h` when building it:
30
31Module | Macros |
32| --- | --- |
33| Azure IoT Middleware for Azure RTOS | `NX_ENABLE_EXTENDED_NOTIFY_SUPPORT`<br> `NX_SECURE_ENABLE`<br> `NXD_MQTT_CLOUD_ENABLE`
34| Azure Defender for IoT security module | `NX_ENABLE_IP_PACKET_FILTER`
35
36Follow [`nx_user_sample.h`](https://github.com/azure-rtos/netxduo/blob/master/common/inc/nx_user_sample.h) to see how to define these macros in the NetX user header file.
37
38## Features
39
40Azure IoT Middleware for Azure RTOS stays as an addon module for the Azure RTOS NetX Duo. It facilitates the MQTT and TLS stacks that are also as part of NetX Duo addons.
41
42![diagram](./docs/img/diagram.png)
43
44### Basic features
45
46* Connect to Azure IoT Hub via MQTT.
47* Support of IoT Hub primitive data format: [device to cloud (D2C) message](https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-d2c-guidance), [Device Twins](https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-device-twins) and [Direct methods](https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-direct-methods).
48* Support of IoT Plug and Play data format: Telemetry, Properties and Commands.
49* Authentication: SAS Token and X.509 client certificate.
50* JSON parsers.
51
52### Device Update for IoT Hub
53
54[Device Update for IoT Hub](https://learn.microsoft.com/azure/iot-hub-device-update/understand-device-update) is an Azure service that enables you to deploy over-the-air updates (OTA) for your IoT devices. The [Device Update for IoT Hub agent](https://learn.microsoft.com/azure/iot-hub-device-update/device-update-azure-real-time-operating-system) in the IoT Middleware provides simple APIs for device builders to integrate the OTA capability easily.
55
56See the [samples](https://github.com/azure-rtos/samples) of semiconductor's hero development boards with detailed guides to learn configure, build and deploy the over-the-air (OTA) updates to the devices.
57
58### Microsoft Defender for IoT
59
60[Microsoft Defender for IoT](https://learn.microsoft.com/azure/defender-for-iot/device-builders/overview) provides a comprehensive security solution for Azure RTOS devices. The built-in [IoT Security Module](https://learn.microsoft.com/azure/defender-for-iot/device-builders/iot-security-azure-rtos) in IoT Middleware is enabled by default to detect common threats and potential malicious activities.
61
62#### Opt-out
63
64To disable (opt-out) the module for your application, you can choose one of these two options:
65* Define `NX_AZURE_DISABLE_IOT_SECURITY_MODULE` in NetX Duo header file such as `nx_user.h` when building the project.
66* Call [`UINT nx_azure_iot_security_module_disable(NX_AZURE_IOT *nx_azure_iot_ptr)`](https://docs.microsoft.com/azure/defender-for-iot/azure-rtos-security-module-api#disable-azure-iot-security-module) in your application code.
67
68#### Data collection
69
70By enabling the module, it analyzes inbound and outbound network activity on IPv4 and IPv6 with supported protocols of **TCP**, **UDP** and **ICMP**. And with below data collected:
71
72* Local and remote address / port
73* Bytes in / out
74
75#### Footprint
76
77IoT Security Module leverages existing Azure RTOS resources, and sends security messages in the background, without interfering with the user application, using the same connection to the IoT Hub.
78
79The extra resource it will take on device and connection:
80
81**Memory Footprint** (using default config - 4 unique monitored connection in IPv4 in an hour):
82Toolchain | RAM | ROM |
83| --- | --- | --- |
84| IAR Embedded Workbench (iccarm) | 4Kb | 10Kb
85| GNU ARM Embedded Toolchain (arm-gcc) | 4Kb | 13Kb
86
87**Additional Connection**:
88Connection Type | RAM | Network |
89| --- | --- | --- |
90| IPv4 | 52bytes | 36bytes
91| IPv6 | 200bytes | 60bytes
92
93So the total additional connection traffic will be:
94*Total (in bytes) = Metadata (e.g. 300 bytes) + IPv4 Connections * 36 + IPv6 Connections * 60*
95
96## APIs
97
98* [nx_azure_iot](./docs/azure_rtos_iot.md)
99* [nx_azure_iot_hub_client](./docs/azure_rtos_iot_hub_client.md)
100* [nx_azure_iot_hub_client_properties](./docs/azure_rtos_iot_hub_client_properties.md)
101* [nx_azure_iot_provisioning_client](./docs/azure_rtos_iot_provisioning_client.md)
102* [nx_azure_iot_json](./docs/azure_rtos_iot_json.md)
103* [nx_azure_iot_adu_agent](./docs/azure_rtos_iot_adu_agent.md)
104* [nx_azure_iot_security_module](../azure_iot_security_module/docs/nx_azure_iot_security_module.md)
105
106## Need Help?
107
108Find support channels in the [Resources](https://github.com/azure-rtos/netxduo#resources) list.
109
110## Licensing
111
112View [Licensing](https://github.com/azure-rtos/netxduo#licensing) of Azure RTOS NetX Duo.
113