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
**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.
29
+
**Important**: Due to TLS, You **must** be connected to the internet (which means already having an IP address from your router) **and** a valid (minimum of today) date and time. Please check the examples that use networking (especially those that include TLS/NTP) to help you ensure it will work.
35
30
36
-
This AWS IoT 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.
31
+
This AWS IoT SDK is using MQTT. So you need to ensure you have an outbound firewall port open to the TCP port 8883. If you are in an enterprise network, this may be blocked.
37
32
38
33
If it is, in future, we plan to add WebSocket support.
39
34
40
-
The 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 cloud provider environments.
35
+
The the name of the classes and the methods try to get close to the [.NET nanoFramework C# Azure IoT SDK](https://github.com/nanoFramework/nanoFramework.Azure.Devices). This should allow an easier portability of the code between both cloud provider environments.
41
36
42
37
### Certificate
43
38
@@ -84,7 +79,7 @@ X509Certificate awsRootCACert = new X509Certificate(Resources.GetBytes(Resources
Note: when the certificate expires, you will have to reflash fully the device with the new certificate, or build a mechinisum into your code to include a primary and secondary certificate.
82
+
Note: when the certificate expires, you will have to fully reflash the device with the new certificates and keys, or build a mechanism into your code to include primary and secondary versions of them.
88
83
89
84
#### Storing the certificate into the device
90
85
@@ -115,7 +110,7 @@ Note: please see the previous section to understand how to better pass the certi
115
110
116
111
### Getting and updating Device Shadow
117
112
118
-
You can request your Azure IoT Twin simply by calling the `GetTwin` function.
113
+
You can request your Shadow simply by calling the `GetShadow` function.
Note that they are status change based, so once the connect or disconnect event arrives, they'll be replaced by other events as soon as something else happened like receiving a shadow.
265
229
266
-
<!-- ## Azure IoT Device Provisioning Service (DPS) support
267
-
268
-
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/).
269
-
270
-
### Provisioning using symmetric key
271
230
272
-
For symmetric key provisioning you only need the following elements:
231
+
## Future work items for discussion:
273
232
274
-
- A registration ID
275
-
- The ID Scope
276
-
- The device name
277
-
- The key or the derived key for group provisioning
Debug.WriteLine($"Registration is not assigned: {myDevice.Status}, error message: {myDevice.ErrorMessage}");
296
-
return;
297
-
}
298
-
299
-
// You can then create the device
300
-
var device = new DeviceClient(myDevice.AssignedHub, myDevice.DeviceId, SasKey, nanoFramework.M2Mqtt.Messages.MqttQoSLevel.AtMostOnce, azureCA);
301
-
// Open it and continue like for the previous sections
302
-
var res = device.Open();
303
-
if(!res)
304
-
{
305
-
Debug.WriteLine($"can't open the device");
306
-
return;
307
-
}
308
-
```
309
-
310
-
Note: like for the `DeviceClient` you need to make sure you are connected to a network properly and also have a proper data and time set on the device.
311
-
312
-
### Provisioning using certificates
313
-
314
-
For symmetric key provisioning you only need the following elements:
315
-
316
-
- A registration ID
317
-
- The ID Scope
318
-
- The device name
319
-
- The device certificate
320
-
- Make sure that your IoT Hub is as well aware of the root/intermediate certificate you are using otherwise you won't be able to connect to your IoT Hub once your device is provisioned
Debug.WriteLine($"Registration is not assigned: {myDevice.Status}, error message: {myDevice.ErrorMessage}");
355
-
return;
356
-
}
357
-
358
-
// You can then create the device
359
-
var device = new DeviceClient(myDevice.AssignedHub, myDevice.DeviceId, deviceCert, nanoFramework.M2Mqtt.Messages.MqttQoSLevel.AtMostOnce, azureCA);
360
-
// Open it and continue like for the previous sections
361
-
var res = device.Open();
362
-
if(!res)
363
-
{
364
-
Debug.WriteLine($"can't open the device");
365
-
return;
366
-
}
367
-
```
368
-
369
-
### Additional payload
233
+
* Better documentation about ensuring "persistent" connections (or not) with documentation (including cloud policy doc for support)
234
+
* Add some integration tests, including (scripts to auto provision cloud broker (and/or)) manual setup documents to ensure ease of use.
235
+
* Partial Greengrass support?!
236
+
* Websocket support?!
237
+
* fleet provisioning support?!
370
238
371
-
Additional payload is supported as well. You can set it up as as json string in the `ProvisioningRegistrationAdditionalData` class when calling the `Register` function. When the device has been provisioned, you may have as well additional payload provided. -->
0 commit comments