https://github.com/n-elia/arduino-nano-33-iot-azure-dps-with-sas-tokens
Sketch to connect an Arduino Nano 33 IoT to the Azure IoT Device Provisioning Service over WiFi with an SSL-secured connection, and authentication based on SAS token. The communication method is direct MQTT (no sdk).
https://github.com/n-elia/arduino-nano-33-iot-azure-dps-with-sas-tokens
arduino arduino-nano-33-iot azure-device-provisioning-service azure-iot device-provisioning
Last synced: about 1 month ago
JSON representation
Sketch to connect an Arduino Nano 33 IoT to the Azure IoT Device Provisioning Service over WiFi with an SSL-secured connection, and authentication based on SAS token. The communication method is direct MQTT (no sdk).
- Host: GitHub
- URL: https://github.com/n-elia/arduino-nano-33-iot-azure-dps-with-sas-tokens
- Owner: n-elia
- License: gpl-3.0
- Created: 2020-11-16T13:52:35.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-16T14:00:56.000Z (over 4 years ago)
- Last Synced: 2025-02-14T06:47:47.803Z (3 months ago)
- Topics: arduino, arduino-nano-33-iot, azure-device-provisioning-service, azure-iot, device-provisioning
- Language: C++
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arduino Nano 33 IoT Azure DPS with SAS tokens
Sketch to connect an Arduino Nano 33 IoT to the Azure IoT Device Provisioning Service over WiFi with an SSL-secured connection, and authentication based on SAS token. This sketch uses direct MQTT connection to azure services.## Just a few hints
- You need to distinguish between Enrollment Groups and Individual Enrollment: the former implies to use the primary or secondary key of the enrollment group to hash each device's derived device key (which will be encoded as a SAS token), while the latter implies that the enrollment key coincides with the device key, so it's sufficient to encode the key into a SAS token.
- The payload of the mqtt messages is described [here](https://docs.microsoft.com/en-us/azure/iot-dps/how-to-send-additional-data#device-sends-data-payload-to-dps)
- Remember to add the Baltimore CA-root certificate to your WiFiNINA module, otherwise your Arduino won't be able to properly identify the Azure servers. [Here](https://support.arduino.cc/hc/en-us/articles/360016119219-How-to-add-certificates-to-Wifi-Nina-Wifi-101-Modules-) is the official tutorial for that.
- You can find the sketch to authorize the same device with X509 in my repos.
- To generate SAS tokens, you can use my python script in the /SAS_token_generator folder.