Menu

Expand
Rate this page:

Get Started with Microvisor

Microvisor Public Beta

Microvisor is in a pre-release phase and the information contained in this document is subject to change. Some features referenced below may not be fully available until Microvisor’s General Availability (GA) release.

This Quick Start assumes you have a Twilio account and a Microvisor Nucleo Development board that is powered up and connected to the Internet using the supplied Super SIM.

The Microvisor Nucleo Development Board

The primary Microvisor development platform is Ubuntu 20.0.4.

Windows

The recommended solution for working with Microvisor on Windows is via Windows Subsystem for Linux (WSL). You will need Administrator privileges to install WSL with:

wsl --install -d ubuntu

Now open the Ubuntu instance shell from your Start menu and follow the command line instructions. Alternatively, if you’re happy not to be supported, you can use native tools on Windows.

macOS

The recommended solution for working with Microvisor on Mac is Docker, as outlined below. However, if you’re happy not to be supported, you can use native tools on macOS.

This Quick Start assumes you have version 0.5.1 of Microvisor installed on your board, and the Twilio CLI Microvisor Plugin 0.3.10 or above installed on your computer. Please see the Plugin page for installation details and to learn how to check which Microvisor version you are running.

Command line

1. Install the prerequisites

sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi \
  build-essential libsecret-1-dev cmake curl git jq

2. Install the Twilio CLI

curl -sL https://twilio-cli-prod.s3.amazonaws.com/twilio_pub.asc | sudo apt-key add -
sudo touch /etc/apt/sources.list.d/twilio.list
echo 'deb https://twilio-cli-prod.s3.amazonaws.com/apt/ /' | sudo tee /etc/apt/sources.list.d/twilio.list
sudo apt update
sudo apt install -y twilio

3. Install the Twilio CLI Microvisor Plugin

Close your terminal window or tab, and open a new one. Now run:

twilio plugins:install @twilio/plugin-microvisor

4. Set up the Twilio CLI

twilio login

Enter your account SID and your account Auth Token, and provide an name for your profile when asked to do so.

twilio profiles:use <YOUR_PROFILE_NAME>

5. Set environment variables

Enter the following command to get your target device’s SID:

twilio api:microvisor:v1:devices:list

Set your device’s SID as an environment variable. It should be added to your shell profile:

export MV_DEVICE_SID=UVxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The QR code on the back of your board and on the anti-static bag in which it shipped also contains your NDB’s SID. Scan the code with your mobile phone and a suitable app, and the board’s SID is the third /-separated field.

6. Clone the Microvisor FreeRTOS demo

git clone --recurse-submodules https://github.com/twilio/twilio-microvisor-freertos
cd twilio-microvisor-freertos

7. Build and deploy the demo

twilio microvisor:deploy . --devicesid ${MV_DEVICE_SID} --genkeys --log

Docker

This assumes you have Docker Desktop installed on your system and that you have started its daemon.

1. Set environment variables

Set your Twilio credentials as environment variables. You can get the first two from your Twilio Console account dashboard. The QR code on the back of your board and on the anti-static bag in which it shipped also contains your NDB’s SID. Scan the code with your mobile phone and a suitable app, and the board’s SID is the third /-separated field.

Mac

export TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export TWILIO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export MV_DEVICE_SID=UVxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

They should be added to your shell profile.

2. Build the image

docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) \
  -t microvisor-freertos-image .

3. Run the build

docker run -it --rm -v $(pwd)/:/home/mvisor/project/ \
  --env-file env.list \
  --name microvisor-freertos microvisor-freertos-image

Under Docker, the demo is compiled, uploaded and deployed to your development board. It also initiates logging — hit ctrl-c to break out to the command prompt.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

thanks-feedback-gif