Using Azure IOT Hub on Ubuntu 20.10.

mosquitto client installation

sudo apt install mosquitto-clients

Install azure-cli

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Confirm that it has been installed

$ az --version
azure-cli                         2.17.1

core                              2.17.1
telemetry                          1.0.6

Python location '/opt/az/bin/python3'
Extensions directory '/home/uchida/.azure/cliextensions'

Python (Linux) 3.6.10 (default, Dec 31 2020, 08:28:31) 
[GCC 10.2.0]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy

Log in to Azure

$ az login
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code H4GVAAAAA to authenticate.

In your browser, go to https://microsoft.com/devicelogin and enter the code.

Extension installation

az extension add --name azure-iot

Obtaining a SAS token

az iot hub generate-sas-token -n iot-first

pip3 installation

sudo apt install python3-pip

installation of paho

sudo pip3 install paho-mqtt

Recommended Posts

Using Azure IOT Hub on Ubuntu 20.10.
Using Flutter on Ubuntu (Part 2)
Install AWS IoT Greengrass on Ubuntu
Install ngrok on ubuntu16.04 using Vagrant
Installing and using Ansible on Ubuntu 16.04
tmux on Ubuntu
Using JUnit from the command line on Ubuntu
Android application development using Unity + ARCore on Ubuntu
Tips for using the Spotify app on Ubuntu
Web Bluetooth on Ubuntu20.04
Reinstall Kubernetes on Ubuntu 19.10
I built an Ubuntu environment on Windows 10 using WSL2.
Use Flutter on Ubuntu
Install pyqt5 on ubuntu
Using JDBC on Linux
Install Ruby on Ubuntu 20.04
I tried using YOLO v4 on Ubuntu and ROS
Setting JAVA_HOME on Ubuntu
Install Autoware on Ubuntu 18.04.5
Put JetBrains on Ubuntu
Use mkdir on ubuntu
Apache2 on Ubuntu20.04 LTS
Use cpplapack on ubuntu
ubuntu on wsl part 10
Install Homebrew on Ubuntu 20.04
Run tiscamera on Ubuntu 18.04
Build Zabbix on Ubuntu 20.04
Configuration script for using docker in proxy environment on ubuntu 20.04.1
Create SSL certificate on Ubuntu 18.04
Building WebGIS on Ubuntu20.04 LTS
Install OpenJDK7 (JAVA) on ubuntu 14.04
Put Ubuntu 20.04.1 on Raspberry Pi 4
Install Cybozu Office 10 on Ubuntu 20.4
Spring Boot on Microsoft Azure
Extend swap area on Ubuntu 18.04
Install Docker on Ubuntu Server 20.04
Ubuntu on Windows Community Preview
Japanese input on Ubuntu20.04 Desktop
Oracle Java 8 on Docker Ubuntu
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
I tried using azure cloud-init
Install Arudino IDE on Ubuntu 20
Record video on ubuntu18.04 LTS
Introduced knowledge (wiki) on Ubuntu
Installing OpenMX on Ubuntu 18.04.5 LTS
Install Java on WSL Ubuntu 18.04
Ruby installation on WSL2 + Ubuntu 20.04
Install Ubuntu Desktop 20.10 on RaspberryPi4
Run chromium-mir-kiosk on Ubuntu Core
Install Arduino IDE on Ubuntu 20.04
Ubuntu on Windows build speed
Run java applet on ubuntu
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
Run Eclipse CDT on Ubuntu
Set up ansible-playbook on Ubuntu 20.04
Install PlantUML on Intellij on Ubuntu
Install Ubuntu Server 20.04 on Btrfs
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
Install Docker on Ubuntu and set up remote connection using tls