3 Easy Steps to Begin Using Matter with Arm’s Virtual Hardware for IoT – Arm Community Blog

The number of Arm-based devices shipped into the IoT is truly remarkable. In 2021, Arm’s customers shipped over 29 billion Arm-based chips, with 70% of them being specifically designed for IoT and embedded markets. This scale is a tipping point, highlighting the need for industry collaboration for IoT solutions to scale quickly. The Matter protocol is a great example of industry collaboration.

Introducing Matter: the protocol

Matter is a royalty-free home automation connectivity standard that aims to make smart home devices from different suppliers work together seamlessly. Due to Arm’s foundational technology and the scale of the Arm ecosystem, new protocols such as Matter can now be developed and tested on Arm faster than ever before. With the backing of over 400 companies including Arm, Amazon, Google, and Comcast, Matter-compatible products and software updates for existing products are expected to be released in the fall of 2022.

Matter focuses on the software and services deployed in smart homes, presenting challenges for developers related to real-time connectivity, machine learning (ML), security, and new specialized workloads. Many companies have adopted a “wait and see” approach, but with the release of the v1.0 SDK, the time to wait is over.

To address the challenge of getting started with Matter product development as quickly as possible, Arm is collaborating with the Connectivity Standards Alliance (CSA) to ensure the Arm ecosystem supports OEMs and other product developers in building these devices. One avenue of support is through the use of Arm Virtual Hardware.

What is Arm Virtual Hardware?

Arm Virtual Hardware (AVH) accelerates IoT software development by virtualizing popular IoT development kits, Arm-based processors, and systems for developers to build and test software before hardware availability. It operates as a cloud application for scalability and is suitable for bare-metal development or running rich operating systems like Linux. Arm Virtual Hardware provides cloud models of third-party hardware, including boards from NXP, STMicroelectronics, and Raspberry Pi.

Arm Virtual Hardware 3rd Party Hardware

Image 1: Third-party hardware boards available with Arm Virtual Hardware

Arm Virtual Hardware leverages CI at scale for embedded developers, a key methodology for accelerated software development that has traditionally been complex to implement. By using the cloud, Arm Virtual Hardware makes this methodology more accessible to traditional embedded developers.

By eliminating the need to worry about physical hardware, Arm Virtual Hardware makes Matter development more accessible to millions of developers. The result is accelerated software development with a reduced barrier to entry for developers.

Arm Virtual Hardware is available as a private beta. To access the private beta and use this example, please register here.

Step 1: Setting up virtual Raspberry Pi #1 with chip-tool

Log into: https://app.avh.arm.com/login (assuming registration has been completed).

In the Device tab, click the Create Device button.

Setting up virtual RPi step 2

Click Raspberry Pi 4 to select it.

Setting up virtual RPi step 3

Click the Next button to continue.

Setting up virtual RPi step 4

Select Raspberry Pi OS Lite (11.2.0) from the drop-down menu and click the Select button.

Setting up virtual RPi step 5

Enter a device name and click the Create Device button. Any name is fine. We used chip-tool.

Setting up virtual RPi step 6

Wait for the virtual device to be created and start up. Click the Console tab to interact with the virtual board.

Setting up virtual RPi step 7

Use username: pi and password: raspberry to log into the console

Setting up virtual RPi step 8

Once logged into the board, the Matter stack dev environment can be downloaded and setup.

Install dependencies

  • sudo apt-get update
  • sudo apt-get install git gcc g++ python pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev

Clone repo and setup sub modules

  • git clone https://github.com/project-chip/connectedhomeip.git –branch v1.0.0
  • cd connectedhomeip
  • ./scripts/checkout_submodules.py –shallow –platform linux

Setup dev environment (takes 5-10 minutes).

  • ./scripts/build/gn_bootstrap.sh
  • source scripts/activate.sh

Build chip-tool example.

  • cd examples/chip-tool
  • gn gen out/debug
  • ninja -C out/debug

The chip-tool application is now ready to use.

Note: The previous instructions are based on The Building Matter guide GitHub Actions examples-linux-arm.yaml workflow. Raspberry Pi OS is used instead of Ubuntu Server

Step 2: Setting up virtual Raspberry Pi #2 with the lighting app example

Open a new browser window: https://app.avh.arm.com

Repeat the sequence to create a new virtual Pi board but enter a different name.
Do not build the CHIP Tool application this time as we now need to build the lighting app instead

Build lighting-app example.

  • cd examples/lighting-app/linux
  • gn gen out/debug
  • ninja -C out/debug

Run lighting-app example.

  • ./out/debug/chip-lighting-app

The lighting application is now running.

Step 3: using chip-tool

Switch back to the browser window that was used to setup the first virtual Raspberry Pi with chip-tool.

Provisioning (note sometime this command needs to be run twice).

  • ./out/debug/chip-tool pairing onnetwork-long 0x11 20202021 3840

Command the Light on

  • ./out/debug/chip-tool onoff on 0x11 1

Command the Light off

  • ./out/debug/chip-tool onoff off 0x11 1

If needed, device config can be cleared using the following command:

  • rm -rf /tmp/chip_*

These few commands are all that it takes to commission and control a (virtual) Matter product. No hardware is required. It does not get any easier than this for any developer to get started. Hardware is required at some point but there is so much software development possible using Arm Virtual Hardware. Our goal is to enable all developers to start exploring the Matter SDK as quickly as possible with minimal friction.

This is just the tip of the iceberg. We have manually started and initialized Arm Virtual Hardware and built Matter applications on them. The real power of Arm Virtual Hardware is when it is used as part of a CI/CD workflow. These are topics that we will explore in the next blogs in this upcoming series.

Next steps

To explore what Arm Virtual Hardware can do for your team then:

  • Get started using this example by registering for the Arm Virtual Hardware private beta.

Register for Arm Virtual Hardware

Latest articles

Related articles