Create an AWS IoT EduKit development environment with Ubuntu 20.04 + VirtualBox 6.1

AWS IoT EduKit requires ESP-IDF v4.2, but I'm particularly worried about building an environment on Windows, so I'll show you how to build it on Ubuntu inside a virtual machine.

By the way, the Workshop Document does not specify minor mistakes or required libraries, so that has already been added. (Bug Report completed)

Preparing VirtualBox

https://www.virtualbox.org/

--Installing version 6.1 and Extension --Main memory: 4096MB or more --Number of processors: 2 or more --Video memory: 64MB or more --Storage: 20GB or more

Ubuntu 20.04

Download ** ubuntu-ja-20.04.1-desktop-amd64.iso ** from https://www.ubuntulinux.jp/products/JA-Localized/download and install it in VirtualBox.

--Installation configuration --Minimal installation, third party software installation

After installation

--Update and reboot. --Although it is not required, it is easier to work in Terminal if you set The contents of your home directory in English on Ubuntu. Also, this article assumes English directory names. -It is recommended because it resolves the permissions of Install Arduino IDE and / dev/ttyUSB **. (Restart required)

Translate the contents of your home directory into English


$ LANG=C xdg-user-dirs-gtk-update

Visual Studio Code installation

There are no changes from Documentation. I will write it as a memo.

Download **. Deb 64bit ** from https://code.visualstudio.com/download.

$ sudo apt install -y ~/Downloads/code_1.52.1-1608136922_amd64.deb

Installing PlatformIO

Before working, do the following:

$ sudo apt install -y git python3-venv

After that, it is as Document.

Claiming and provisioning the device

I can't read the QR code because of the font (I think), so if you paste the URL displayed below it on your browser, the QR code will be displayed.

Installing ESP-IDF v4.2

Proceed as follows.

$ sudo apt install -y git wget flex bison gperf python-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util python3-virtualenv python-is-python3
$ mkdir ~/esp/
$ cd ~/esp/
$ git clone -b release/v4.2 --recursive https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ bash install.sh
$ source ~/esp/esp-idf/export.sh

change point

--Added python3-virtualenv`` python-is-python3 to apt. --Fixed how to execute install.sh. --Changed the loading method of export.sh to source.

Miniconda setup and installation

There is no change from Document, but I added it because the information is insufficient.

Download for Python 3.8 from https://docs.conda.io/en/latest/miniconda.html#linux-installers.

$ bash ~/Downloads/Miniconda3-latest-Linux-x86_64.sh

--Installation destination is $ HOME/miniconda3 --Do you wish the installer to initialize Miniconda3 by running conda init? Answers ** yes **.

$ source ~/.bashrc
$ conda create -n edukit python=3.7
$ conda activate edukit

change point

--Added information when installing Miniconda3. --Added source ~/.bashrc.

AWS CLI v2

I have changed a little from Document.

$ sudo apt install -y curl
$ curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o ~/Downloads/awscliv2.zip
$ unzip -x ~/Downloads/awscliv2.zip
$ sudo aws/install
$ rm -rf aws 

As per the documentation after AWS CLI Configuration.

change point

--Added apt install -y curl. --The ZIP download destination is set to Downloads. --Delete the extraction directory.

Retrieving the Device Certificate and Registering your AWS IoT thing

Before working, do the following:

$ source ~/esp/esp-idf/export.sh
$ conda activate edukit
$ sudo apt install -y libusb-1.0-0-dev libudev-dev g++ python3-dev

After that, it is as Document.

If the execution of registration_helper.py fails to import esptool, the environment variable IDF_PATH is not set correctly. In the new Terminal, run source ~/esp/esp-idf/export.sh => conda activate edukit, and then run it again.

If you continue to open a new Terminal and develop AWS IoT EduKit, always load these two environments in the future.

$ source ~/esp/esp-idf/export.sh
$ conda activate edukit

Time up to this point

About 2 hours in total including download time. It takes more if the network is slow.

EoT

Recommended Posts

Create an AWS IoT EduKit development environment with Ubuntu 20.04 + VirtualBox 6.1
Java + Spring development environment construction with VirtualBox + Ubuntu (Xfce4)
Let's create Ubuntu environment with vmware
Create Spring Boot-gradle-mysql development environment with Docker
Build an environment with Docker on AWS
Rails6.0 ~ How to create an eco-friendly development environment
[First team development ②] Build an environment with Docker
Create a Spring Boot development environment with docker
Create an HTTPS file server for development with ring-jetty-adapter
Create an E2E test environment with Docker x Cypress
Create Chisel development environment with Windows10 + WSL2 + VScode + Docker
Create an environment where CircleCI can be executed locally with Windows10 + WSL2 (Ubuntu) + Docker
I tried to create a java8 development environment with Chocolatey
I tried to create a padrino development environment with Docker
[SAP] Create a development environment with NW AS ABAP Developer Edition (1)
I tried to build an http2 development environment with Eclipse + Tomcat
Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
Create an immutable class with JAVA
Create a Vue3 environment with Docker!
Install AWS IoT Greengrass on Ubuntu
Create an app with Spring Boot 2
Create RUNTEQ's environment with Windows DockerDesktop
Prepare Java development environment with Atom
Create an Ubuntu bootable USB stick
Create SolrCloud verification environment with Docker
Create an excel file with poi
Create an app with Spring Boot
Create Laravel environment with Docker (docker-compose)
Build jooby development environment with Eclipse
Build an environment of "API development + API verification using Swagger UI" with Docker
Build a development environment on AWS EC2 with CentOS7 + Nginx + pm2 + Nuxt.js
Template: Build a Ruby / Rails development environment with a Docker container (Ubuntu version)
Create a java web application development environment with docker for mac part2
Prepare Java development environment with VS Code
Let's create an instance with .new yourself. .. ..
Create an infinite scroll with Infinite Scroll and kaminari
[Java] Create an executable module with Gradle
Laravel development environment construction with Docker (Mac)
Build a PureScript development environment with Docker
Create Rails 6 + MySQL environment with Docker compose
Environment construction with Docker (Ubuntu20.04) + Laravel + nginx
Create a MySQL environment with Docker from 0-> 1
Let's create a Java development environment (updating)
[Docker] Create Node.js + express + webpack environment with Docker
[Ruby] Building a Ruby development environment on Ubuntu
Build Java 8 development environment on AWS Cloud9
Build a Wordpress development environment with Docker
Create an or search function with Ransack.
Build an Ultra96v2 development environment on Docker 1
Lightweight PHP 7.4 development environment created with Docker
Create an ARM-cpu environment with qemu on mac and run java [Result → Failure]
Build a development environment to create Ruby on Jets + React apps with Docker
[AWS] Intentionally load an Ubuntu EC2 instance and check the metrics with CloudWatch