#RaspberryPi – Install #AzureIoT, a couple of tips to make it work
Tags: englishpost, azureiot, raspberrypi
Published: 2022-07-28 14:12:48

---
title: #RaspberryPi – Install #AzureIoT, a couple of tips to make it work
published: true
date: 2022-07-26 15:48:18 UTC
tags: EnglishPost,AzureIoT,EnglishPost,RaspberryPI
canonical_url: 
---

Hi !

It’s JulyOT time, and I need to update this post. A lot of amazing IoT content here:

#### [https://julyot.dev/](https://julyot.dev/)

And let’s go with the updated version.

The base steps for this posts are described in the official page [[Install or uninstall Azure IoT Edge for Linux](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge?view=iotedge-2020-11)] (see references). In the official documentation, you can also find the prerequisites and links on additional steps.

An important note here is to mention:

> By June 30, 2022 we will retire Raspberry Pi OS Stretch from the Tier 1 OS support list. To avoid potential security vulnerabilities update your host OS to Bullseye.

![IoT Edge on RPI os will be retired from the support list on June 30](https://brunocapuano.files.wordpress.com/2022/07/iot-edge-on-rpi-os-will-be-retired-from-the-support-list-on-june-30.png?w=924)

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 using the following command

```

curl https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb > ./packages-microsoft-prod.deb
sudo apt install ./packages-microsoft-prod.deb

```

[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 update; \
  sudo apt-get install moby-engine

```

[Bruno] Time to update again the packages

```

sudo apt-get update

```

And time to install the most recent version of IoT Edge

```

sudo apt-get update; \
  sudo apt-get install aziot-edge

```

Provision the device with its cloud identity

- [Authenticate with symmetrick keys](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge?view=iotedge-2020-11#option-1-authenticate-with-symmetric-keys)
- [Authenticate with X.509 certificates](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge?view=iotedge-2020-11#option-2-authenticate-with-x509-certificates)

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 !

![](https://brunocapuano.files.wordpress.com/2022/07/console-output-for-iotedge-system-status-everything-is-ok.png?w=1024)

However, there are scenarios where you may find that edgeHub is not running locally.

A quick fix is to set the edgeHub version to 1.2

![update edgeHub runtime settings to 1.2](https://brunocapuano.files.wordpress.com/2022/07/update-edgehub-runtime-settings-to-1.2.jpg?w=591)

And, when we list the current running modules, we will have both !

![iotedge agend and hub running](https://brunocapuano.files.wordpress.com/2022/07/iotedge-agend-and-hub-running.png?w=1024)

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

* * *