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.
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.
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.
Click Raspberry Pi 4 to select it.
Click the Next button to continue.
Select Raspberry Pi OS Lite (11.2.0) from the drop-down menu and click the Select button.
Enter a device name and click the Create Device button. Any name is fine. We used chip-tool.
Wait for the virtual device to be created and start up. Click the Console tab to interact with the virtual board.
pi and password:
raspberry to log into the console
Once logged into the board, the Matter stack dev environment can be downloaded and setup.
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.
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.
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.