#RaspberryPi – Install #AzureIoT, a couple of tips to make it work

Updated version to 2022 July 26 available here.

Hi !

I’m back to Azure IoT for some months, so while I’m refreshing a couple of devices I realized that I need to write some lessons learned here.

The base steps for this posts are described in the official page [Install or uninstall Azure IoT Edge for Linux] (see references). In the official documentation, you can also find the prerequisites and links on additional steps. I’ll start here when you already have an Azure IoT environment, a connection string for an Edge Device and a Raspberry Pi 4 with Raspberry Pi OS installed. Let’s go.

Let’s prepare your device to access the Microsoft installation packages.

curl https://packages.microsoft.com/config/debian/stretch/multiarch/prod.list > ./microsoft-prod.list

Copy the generated list to the sources.list.d directory.

sudo cp ./microsoft-prod.list /etc/apt/sources.list.d/

Install the Microsoft GPG public key.

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo cp ./microsoft.gpg /etc/apt/trusted.gpg.d/

Now that we added the Microsoft sources, it’s time to update our package lists

sudo apt-get update

[Bruno] I also did a full update

sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

[Bruno] and before install the docker engine (moby-engine), I installed this specific version of libssl

sudo apt-get install libssl1.0.2

Install the Moby engine.

sudo apt-get install moby-engine

Time to update again the packages

sudo apt-get update

And time to install the most recent version of IoT Edge

sudo apt-get install aziot-edge

Provision the device with its cloud identity

From here and on, you can check the official documentation on how to add your device connection string to register the device. Once the device is registered the following command will help us to check the service

sudo iotedge system status

An output similar to this one is a great OK message !

azure Iot working fine

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.

More info in https://beacons.ai/elbruno


References

My posts on Raspberry Pi ⚡🐲⚡

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Advertisement

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: