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
running command iotedge check --verbose
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
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.
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.
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.
Steps to install and start the IoT Edge runtime:
Run PowerShell as an administrator on your Windows device and enable Hyper-V using:
Download the IoT Edge for Linux on Windows installer using:
Replace the URL with "https://aka.ms/AzEFLOWMSI_1_4_LTS_ARM64" if you’re using ARM64 architecture.
Set the execution policy to
AllSigned
using:Deploy IoT Edge runtime using:
Deploy-Eflow
Use the command to list the IoT Edge modules running on your device
View the messages being sent from the temperature sensor module
You can see the status of running in the IoT module