Skip to main content

Add an IoT Edge Device on Windows with Multipass

Prerequisites

  • Before you begin, ensure you have the following:
    • An IoT Edge device added to the Datalogic Connect and noted down the Device ID of the edge device.

    • The device credentials from the edge device credentials page:

    • Scope ID: This is your DPS (Device Provisioning Service) scope identifier

    • Device Primary Key: The device's primary authentication key

    • Your Organization ID: This identifies your tenant in the IoT Platform

    • SAS Devices Key: Used for device authentication (this is the "SAS-IoT-Devices primaryKey")

    • SAS Smart Enrollment Key: Required for communication between the device and the platform (this is the "API token")

    • SAS Blob Storage URL: The URL for the blob storage associated with your edge device.

You'll need to note these values as they'll be required during the installation and configuration process.

Credential Field Mapping

When you see these fields in the Edge Device Credentials page:

  • Scope ID → Use directly as id_scope in configuration
  • Device Primary Key → Use as symmetric_key value in IoT Edge config
  • Organization ID → Use as tenantId in Redis configuration
  • SAS Devices Key → Use as modulePrimaryKey in Redis configuration
  • SAS Smart Enrollment Key → Use as deviceHubApiKey in Redis configuration

Network Requirements

To ensure proper communication between your IoT Edge device and Datalogic Connect services, make sure the following network endpoints are accessible:

EndpointPortProtocolNotes
*.azure-devices.net8883, 443MQTT, HTTPSSend diagnostic data, receive cloud commands
global.azure-devices-provisioning.net443HTTPSDevice provisioning
*.blob.core.windows.net443HTTPSFile upload, Docker image pull
crsolinfraprodeuw.azurecr.io443HTTPSContainer registry
Firewall Configuration

If your device is behind a corporate firewall, ensure these endpoints are whitelisted to allow proper IoT Edge functionality.

Windows requirements

Add an IoT Edge Device on Windows with Multipass

  1. Install Multipass:

    • Download and install Multipass from the official website.
    • Follow the installation instructions for Windows.
  2. Create a Bridged Network:

    • Open PowerShell or Command Prompt and run the following command to create a bridged network:
      multipass networks
      multipass set local.bridged-network="Default Switch"
  3. Update the Cloud-Init File with Edge Device Parameters:

    • Download the cloud-init-edge.yaml script for configuring the Edge device.
    • Open the file in a text editor and replace the placeholder values with the actual values you noted earlier:
      • REPLACE_WITH_YOUR_SCOPE_ID with your Scope ID
      • REPLACE_WITH_YOUR_EDGE_DEVICE_ID with your Device ID
      • REPLACE_WITH_YOUR_EDGE_DEVICE_PRIMARY_KEY with your Device Primary Key
      • REPLACE_WITH_YOUR_ORGANIZATION_ID with your Organization ID
      • REPLACE_WITH_YOUR_SAS_DEVICES_KEY with your SAS Devices Key
      • REPLACE_WITH_YOUR_SAS_SMART_ENROLLMENT_KEY with your SAS Smart Enrollment Key
      • REPLACE_WITH_YOUR_EDGE_BLOB_STORAGE_URL with your SAS Blob Storage URL
    • Save the changes to the file.
  4. Create an Ubuntu VM:

    • Open PowerShell or Command Prompt and run the following command to create a new Ubuntu 22.04 VM:
       multipass launch 22.04 --name edge-vm --cpus 1 --disk 5G --memory 2G --cloud-init cloud-init-edge.yaml --bridged
    • This command creates a VM named edge-vm with 1 CPU, 5GB disk space, and 2GB memory, using the specified cloud-init file and bridged network. After running the command, wait a few minutes for the VM to be fully set up.
    • You can check the status of the VM with:
    multipass list

    or you can run Multipass app to see the status.

  5. Check the Edge Device Status:

    • After the VM is created, you can check the status of your IoT Edge device in the Datalogic Connect portal under the Devices section. It may take a few minutes for the device to appear as "Connected".

Troubleshooting

  1. Multipass Waiting for Daemon:
    • If you encounter an error stating "Waiting for daemon...", ensure that the Multipass service is running. Additionally, you can open a power shell as administrator and run (the Y is for Yes and if you have a different language on your Windows you might need to change it accordingly):
      takeown /a /r /d Y /f "C:\ProgramData\Multipass"
      You can find more information on the issue page