skip to Main Content

I followed this tuturial to the tee: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-provision-single-device-linux-on-windows-symmetric?view=iotedge-1.4&tabs=azure-portal but I’m getting errors I don’t know how to resolve

here are some:

running command iotedge system logs -- -f
enter image description here

running command iotedge check --verbose
enter image description here

In Azure
enter image description here

Clicking on "Error" I get:
enter image description here

I have tried many things from modifying the connection config file (/etc/aziot/config.toml), to playing around with self-signed certificates, opening up ports 8883,443 and 5671 on the host machine and the linux vm, re-installing the runtime.
Also stuff from here: https://learn.microsoft.com/en-us/azure/iot-edge/troubleshoot?view=iotedge-1.4
Nothing works.

2

Answers


  1. Chosen as BEST ANSWER

    In the tuturial, it says to use symmetric key authentication. This did not work so a combination of this link: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-provision-single-device-linux-x509?view=iotedge-1.4&tabs=azure-portal%2Cubuntu which shows you how to setup a device using self-signed certificates and this link: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-create-test-certificates?view=iotedge-1.4&tabs=windows which shows you how to create self-signed certificates, I got it working.


  2. The error device is offline displayed since the device is offline and not running. I followed this document to deploy the IoT Edge module and make it run.

    enter image description here

    enter image description here

    • Creating an edge device

    enter image description here
    Deploy a module:

    • Select Devices under Device Management and choose the target device ID.

    • I followed document to develop and debug Azure IoT Edge modules using Visual Studio.

    • Used this code for the simulated temperature sensor module designed for use in an Azure IoT Edge from git.

    • Select Set Modules and add a module from Azure Marketplace(Simulated Temperature Sensor).

    • Configure routes and review the deployment, then create it.

    enter image description here

    • Copy the connection string or retrieve the connection string for your device using
    az iot hub device-identity connection-string show --device-id myEdgeDevice --hub-name {hub_name}
    

    Steps to install and start the IoT Edge runtime:

    Run PowerShell as an administrator on your Windows device and enable Hyper-V using:

       Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
    

    Download the IoT Edge for Linux on Windows installer using:

      $msiPath = $([io.Path]::Combine($env:TEMP, 'AzureIoTEdge.msi'))
      Invoke-WebRequest "https://aka.ms/AzEFLOWMSI_1_4_LTS_X64" -OutFile $msiPath
    

    Replace the URL with "https://aka.ms/AzEFLOWMSI_1_4_LTS_ARM64" if you’re using ARM64 architecture.

    • Install IoT Edge for Linux on Windows using:
      Start-Process -Wait msiexec -ArgumentList "/i","$([io.Path]::Combine($env:TEMP, 'AzureIoTEdge.msi'))","/qn"
      
    1. Set the execution policy to AllSigned using:

      Set-ExecutionPolicy -ExecutionPolicy AllSigned -Force
      

    enter image description here

    1. Deploy IoT Edge runtime using:

      Deploy-Eflow

    enter image description here

    • Provision your device using the device connection string retrieved earlier:
      Provision-EflowVm -provisioningType ManualConnectionString -devConnString "<CONNECTION_ST>"
      

    enter image description here

    • Connecting to a virtual machine
    Connect-EflowVm
    

    enter image description here
    Use the command to list the IoT Edge modules running on your device

    sudo iotedge list
    

    View the messages being sent from the temperature sensor module

    sudo iotedge logs SimulatedTemperatureSensor -f
    

    You can see the status of running in the IoT module

    enter image description here

    • For more refer to this develop and debug modules for Azure IoT Edge
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search