Provisioning with sdv-provision
Meta-leda and the Leda-quickstart image provide a utility sdv-provision
that simplifies the device provisioning procedure.
Connecting to the device
Since the procedure includes copying and pasting device IDs, it is recommended to connect to the device over a ssh connection. sdv-motd
provides an
easy way to find your device’s ip. More information on connecting via ssh can be found here.
Provisioning via a connection string
Device-side
-
After connecting via ssh run
sdv-provision
.Example output:
root@qemux86-64:~# sdv-provision Checking Eclipse Leda Device Provisioning configuration... - Certificates directory exists Checking Device ID - Based on network device: eth0 - File does not exist, creating: /etc/deviceid - Device ID: XX-XX-XX-XX-XX-XX Checking whether either IdScope or ConnectionString is configured - Neither Id Scope file nor ConnectionString found, needs manual configuration Do you want to use the global Azure IoT Device Provisioning Service (DPS) by using an Id Scope, or do you want to use a direct connection to a specific Azure IoT Hub using a Connection String? d) Azure IoT Device Provisioning Service (DPS) with Id Scope h) Azure IoT Hub with Connection String Choose:
-
Note the generated Device ID (XX-XX-XX-XX-XX-XX).
-
Type h /Azure IoT Hub with Connection String/ and press Enter.
-
Paste your Azure IoT Hub Connection String:
HostName=<IoT Hub in Azure>.azure-devices.net;DeviceId=<XX-XX-XX-XX-XX-XX>
and press enter. Where<IoT Hub in Azure>
is your Azure IoT Hub name.
Azure Portal
- Go to https://portal.azure.com/ and to your Azure IoT Hub named
<IoT Hub in Azure>
. - Choose
Devices -> Add Device
. - Enter the Device ID
XX-XX-XX-XX-XX-XX
generated on the previous step as Device ID. - Pick
X.509 Self-Signed
and paste the two thumbprints generated bysdv-provision
. - Save.
Device-Side
After all of the above steps have been completed, connect back to your device and restart the cloudconnector container by running:
kanto-cm stop -n cloudconnector --force
kanto-cm start -n cloudconnector
Or alternatively use:
$ kantui
And restart the container from the TUI.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.