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: README.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,20 +23,20 @@ You can watch this video from the Microsoft [IoT Show](https://aka.ms/iotshow) f
23
23
24
24
**Important**: You **must** be connected to a network with a valid IP address **and** a valid date. Please check the examples with the Network Helpers on how to help you making sure you have both.
25
25
26
-
This Azure IoT Hub SDK is using MQTT. So you need to ensure you can connect to port 8883 using TLS protocol. If you are in an enterprise network, this may be blocked. In most cases, this is not an issue.
26
+
This Azure IoT Hub SDK is using MQTT. So you need to ensure you can connect to port 8883 using TLS protocol. If you are connected to an enterprise network, this may be blocked. In most cases, this is not an issue.
27
27
28
-
The namespaces, the name of the classes and the methods try to get close to the .NET C# Azure IoT SDK. This should allow an easier portability of the code between both environment.
28
+
The namespaces, the name of the classes and the methods try to get close to the .NET C# Azure IoT SDK. This should allow easier portability of the code between the full .Net framework and nanoFramwork environments.
29
29
30
30
### Certificate
31
31
32
32
You have 2 options to provide the right Azure IoT TLS certificate:
33
33
34
-
-Pass it in the constructor
34
+
-Parse it into the constructor
35
35
- Store it into the device
36
36
37
-
The [AzureCertificates](AzureCertificates) contains, for your convenience, the root certificated used to connect to Azure IoT. The current one, Baltimore Root CA is the one to use up to June 2022. Starting in June 2022, the Digicert Global Root 2 is the one to use. For more information, please read the following [blog](https://techcommunity.microsoft.com/t5/internet-of-things/azure-iot-tls-critical-changes-are-almost-here-and-why-you/ba-p/2393169).
37
+
The [AzureCertificates](AzureCertificates) contains, for your convenience, the root certificate used to connect to Azure IoT. The current one, a Baltimore Root CA is the one to use up to June 2022. Starting from June 2022, the Digicert Global Root 2 is the one to use. For more information, please read the following [blog](https://techcommunity.microsoft.com/t5/internet-of-things/azure-iot-tls-critical-changes-are-almost-here-and-why-you/ba-p/2393169).
38
38
39
-
#### Thru the constructor
39
+
#### Through the constructor
40
40
41
41
You will have to embed the certificate into your code:
Note: when the certificate will expire, you will have to reflash fully the device with the new certificate.
76
+
Note: when the certificate expires, you will have to fully reflash the device with the new certificate.
77
77
78
-
#### Storing the certificate into the device
78
+
#### Storing the certificate on the device
79
79
80
-
You can store the certificate into the device and not in the code, so if you have to change, the certificate, you'll just have to clean the current store and upload the new one. Edit the network properties:
80
+
You can store the certificate on the device flash and not in the code, so if you have to change the certificate, you'll just have to clean the current store and upload the new one. Edit the network properties:
81
81
82
82

83
83
@@ -89,7 +89,7 @@ Browse to choose your certificate, it can be in a binary (crt, der) or string fo
89
89
90
90
### Creating a DeviceClient
91
91
92
-
You can connect to Azure IoT Hub using either a symmetric Key, either a certificate. The following example shows how to use a symmetric key:
92
+
You can connect to Azure IoT Hub using either a symmetric Key or a certificate. The following example shows how to use a symmetric key:
Note: please see the previous section to understand how to better pass the certificate for your usage. The example shows the certificate uploaded into the device and not in the code.
101
+
Note: please see the previous section to understand how to better parse the certificate for your usage. The example shows the certificate uploaded into the device and not in the code.
Note: it's important to use a `CancellationToken` that be cancelled after a certain amount of time. Otherwise, this will be blocking the thread up to the point the twin will be received.
119
+
Note: it's important to use a `CancellationToken` that will be cancelled after a certain amount of time. Otherwise, this will be blocking the thread up to the point the twin is received.
120
120
121
121
Twins have properties, reported and desired. They are collection and you can get or try to get any element.
122
122
@@ -129,11 +129,11 @@ reported.Add("sdk", 0.2);
129
129
azureIoT.UpdateReportedProperties(reported);
130
130
```
131
131
132
-
You have as well the option to wait for the twin update confirmation, in this case use a `CancellationToken` that can be cancelled. Otherwise the check will be ignored.
132
+
You also have the option to wait for the twin update confirmation, in this case use a `CancellationToken` that can be cancelled. Otherwise the check will be ignored.
133
133
134
134
Note: the function will return false if the twin reception confirmation is not checked or if it did not arrive on time.
135
135
136
-
You can register as well for any twin update:
136
+
You can also register for any twin update:
137
137
138
138
```csharp
139
139
azureIoT.TwinUpated+=TwinUpdatedEvent;
@@ -153,7 +153,7 @@ var isReceived = azureIoT.SendMessage($"{{\"Temperature\":42,\"Pressure\":1024}}
153
153
Debug.WriteLine($"Message received by IoT Hub: {isReceived}");
154
154
```
155
155
156
-
Note: The message will be send with the default service quality you created the device. You won't get any answer for the quality 0. In this case, you can simplify it to:
156
+
Note: The message will be sent with the default service quality of service you created the device with. You won't get any answer for the quality `0`. In this case, you can simplify it to:
**Important**: method names are case sensitive. So make sure you name your functions in C# the same way.
226
+
**Important**: method names are case sensitive. So make sure you name your functions in C# use the same case.
227
227
228
228
### Status update event
229
229
@@ -247,7 +247,7 @@ Note that those are status change based, so once the connect or disconnect event
247
247
248
248
## Azure IoT Device Provisioning Service (DPS) support
249
249
250
-
This SDK supports as well Azure IoT Device Provisioning Service. Group and individual provisioning scenarios are supported either with a symmetric key either with certificates. To understand the mechanism behind DPS, it is recommended to read the [documentation](https://docs.microsoft.com/azure/iot-dps/).
250
+
This SDK also supports the Azure IoT Device Provisioning Service. Group and individual provisioning scenarios are supported either with a symmetric key either with certificates. To understand the mechanism behind DPS, it is recommended to read the [documentation](https://docs.microsoft.com/azure/iot-dps/).
0 commit comments