Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
  • Groups
    • Research Collaboration and Enablement
    • DesignStart
    • Education Hub
    • Innovation
    • Open Source Software and Platforms
  • Forums
    • AI and ML forum
    • Architectures and Processors forum
    • Arm Development Platforms forum
    • Arm Development Studio forum
    • Arm Virtual Hardware forum
    • Automotive forum
    • Compilers and Libraries forum
    • Graphics, Gaming, and VR forum
    • High Performance Computing (HPC) forum
    • Infrastructure Solutions forum
    • Internet of Things (IoT) forum
    • Keil forum
    • Morello Forum
    • Operating Systems forum
    • SoC Design and Simulation forum
    • 中文社区论区
  • Blogs
    • AI and ML blog
    • Announcements
    • Architectures and Processors blog
    • Automotive blog
    • Graphics, Gaming, and VR blog
    • High Performance Computing (HPC) blog
    • Infrastructure Solutions blog
    • Innovation blog
    • Internet of Things (IoT) blog
    • Operating Systems blog
    • Research Articles
    • SoC Design and Simulation blog
    • Tools, Software and IDEs blog
    • 中文社区博客
  • Support
    • Arm Support Services
    • Documentation
    • Downloads
    • Training
    • Arm Approved program
    • Arm Design Reviews
  • Community Help
  • More
  • Cancel
Arm Community blogs
Arm Community blogs
Internet of Things (IoT) blog Getting started with Matter in 3 easy steps using Arm Virtual Hardware
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI and ML blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded blog

  • Graphics, Gaming, and VR blog

  • High Performance Computing (HPC) blog

  • Infrastructure Solutions blog

  • Internet of Things (IoT) blog

  • Operating Systems blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tags
  • Raspberry Pi
  • Smart Homes
  • Cortex-A
  • Continuous Integration (CI)
  • Cortex-M
  • Continuous Development (CD)
  • Internet of Things (IoT)
  • Arm Virtual Hardware
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

Getting started with Matter in 3 easy steps using Arm Virtual Hardware

Sandeep Mistry
Sandeep Mistry
November 3, 2022
6 minute read time.

The incredible scale of Arm-based devices shipped into the IoT is astounding. Arm’s customers shipped over 29 billion Arm-based chips in 2021, and around 70% of these were specifically designed for IoT and embedded markets. We are at a tipping point in terms of scale, but industry collaboration is critical to how IoT solutions can scale quickly. A great example of industry collaboration is provided by the Matter protocol.

Introducing Matter: the protocol

Matter is a royalty-free home automation connectivity standard designed to make smart home devices from various suppliers work together simply and seamlessly. Because of 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. Started in 2019 and backed by 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 is all about the software and services that are deployed in smart homes. The complexity of connected devices is already a challenge for developers due to real-time connectivity, machine learning (ML), security, and new specialized workloads. And adding the Matter protocol into the mix just makes things much harder. Many companies have been taking the “wait and see” approach with regard to Matter but with the release of the v1.0 SDK, the wait is now over.

The challenge for all those waiting is how to get started with Matter product development as fast as possible. Arm is working closely with the Connectivity Standards Alliance (CSA) to ensure the Arm ecosystem is ready to support OEMs and other product developers in building these devices. One of these ways is through using Arm Virtual Hardware.

What is Arm Virtual Hardware?

Arm Virtual Hardware (AVH) scales 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 runs as a cloud application for scalability when needed and is suitable for bare-metal development all the way through to running a rich OS such as 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 takes learnings from one software development community to another. It enables embedded developers to handle continuous integration (CI) at scale. CI has long been a part of cloud-native development, but for most embedded developers building and managing a hardware farm is just too complex. By using the cloud, Arm Virtual Hardware makes this key methodology for accelerated software development available to traditional embedded developers.

The fastest way to get started with a software project is when the hardware platform is not a blocking item. By removing the need to worry about physical hardware, Arm Virtual Hardware makes Matter development far more accessible to the millions of developers.

The proof is in the pudding, so let us jump directly into a step-by-step guide on building the tool for commissioning, testing, and a sampling a Matter light application. The tool for commissioning is called the CHIP (Connected-Home-IP) tool. To accomplish this task we use two virtual Raspberry Pi boards. One virtual board runs the chip-tool example, and the other will run the lighting app example on Linux. Both virtual Raspberry Pi boards are on the same (virtual) network as they will be created on the same AVH account.

CHIP Tool and Lighting Application

Image 2: Matter product development in the cloud

Arm Virtual Hardware is available as a private beta. To get access to the private beta and to 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 (The guide assumes you have registered).

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:

  • Explore resources and information here
  • Explore the API that is available to access AVH functionality with scripts

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

Register for Arm Virtual Hardware

Anonymous

Top Comments

  • Armando Ruiz
    Offline Armando Ruiz 3 months ago +1
    Hi, how is ARM Virtual Hardware better than for example QEMU which is open source, why would I choose AVH?
  • Armando Ruiz
    Offline Armando Ruiz 3 months ago

    Hi, how is ARM Virtual Hardware better than for example QEMU which is open source, why would I choose AVH?

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
Internet of Things (IoT) blog
  • Integrating IoT Edge devices with cloud-native analytics for smarter insights

    Ajeet Singh Raina
    Ajeet Singh Raina
    A step-by-step guide on how to integrate IoT edge devices with cloud-native analytics for smarter insights, using a smart agriculture use case.
    • March 29, 2023
  • A bare-metal programming guide

    Sergey Lyubka
    Sergey Lyubka
    Get started with the Arm bare metal programming with only GCC compiler, text editor, and a datasheet. From blinky to an embedded Web device dashboard.
    • March 15, 2023
  • Arm takes Embedded Software Development to the next level with introduction of Keil MDK Version 6

    Reinhard Keil
    Reinhard Keil
    Keil MDK Version 6 delivers new features that are optimized for the entire Cortex-M and Ethos-U processor portfolio.
    • March 9, 2023