Matter: 1.why Is It Necessary?
Matter: 1.why Is It Necessary?
Matter 1
1.Why is it necessary? 1
2.Vision 1
3.Overview 2
4.Topology 3
4.1 Matter controller 4
4.2 Matter accessory 5
5. Architecture 6
6. Reference 9
Matter demo 10
1. Build 10
2.Setting up the environment via Docker 10
3.Build cross-compile for Raspberry Pi 4 11
4.Installing prerequisites on Raspberry Pi 4 11
5.Run CHIP Linux Lighting Example 12
1.Why is it necessary?
Smart home market fragmentation has negative consequences
● For consumers: no interoperability between ecosystems
● For developers and manufacturers: costly development
● For retail: multiple variants of the same products
2.Vision
● Address key pain points for interoperability, choice and ease of use
● Enable easier, faster, less costly IoT product development and innovation
● Ease and improve the retail/customer purchase experience
● Enable greater and more accelerated adoption in smart home, building and commercial
uses
3.Overview
Matter is a new Working Group within the Connectivity Standards Alliance (formerly Zigbee
Alliance). This Working Group develops and promotes the adoption of a new connectivity
standard to increase compatibility among smart home products, with security as a fundamental
design tenet.
The main idea for the CHIP project is to simplify development for manufacturers and increase
compatibility for consumers.
Matter is an app-layer standard that works on top of IP-based protocols such as Thread, BLE,....
It's not a networking protocol itself
● Unifying: Matter will produce a new specification, building with and on top of
market-tested, existing technologies.
● Interoperable: The specification permits communication between any Matter-certified
device, subject to users’ permission.
● Secure: The specification leverages modern security practices and protocols.
● User Control: The end user is in control of authorization for interaction with devices.
● Federated: No single entity serves as a throttle or a single-point-of-failure for the root of
trust.
● Robust: The set of protocols specify a complete lifecycle of a device — starting with the
seamless out-of-box experience, through operational protocols, to device and system
management specifications required for proper function in the presence of change.
● Low Overhead: The protocols are practically implementable on low compute-resource
devices, such as MCUs.
● Pervasive: The protocols are broadly deployable and accessible, thanks to leveraging
IP and being implementable on low-capability devices.
● Ecosystem-Flexible: The protocol must be flexible enough to accommodate
deployment in ecosystems with differing policies.
● Easy to Use: The protocol should aim to provide smooth, cohesive, integrated
provisioning and out-of-box experience.
● Open: The Project’s design and technical processes should be open and transparent to
the general public, including to non-members wherever possible.
4.Topology
Matter device will use Thread or WiFi and BLE technology for transaction
● Thread is usually used for devices which require highest energy efficiency like sensors,
light bulbs…
● Wifi is used for device having larger energy budget and require higher bandwidth like
cameras…
● BLE is used by a Matter controller (smart speaker, mobile phone…) to commission/setup
new device into the network.
○ Commissioning is a process transfer network necessary information to new
device can securely join existing network
■ To start the commissioning procedure, the Controller must get the
onboarding information from the Matter accessory device
■ The last part of the commissioning procedure, the Controller sends
credential (ithe provisioning operation) to new device so it can join the the
network
○ After commissioning phase, the new device will use thread/wifi to communicate in
the network
Bluetooth LE is used to commission a new device into the network using a Matter controller.
To allow the use of non-Matter Iot devices to communicate and interact with Matter devices.
This enables the consumer to keep using existing non-Matter devices together with their Matter
devices.
To enable the IPv6 communication with the Matter accessory device over the Thread network,
the Matter controller requires the Thread Border Router. This is because the Matter controller
types described on this page do not have an 802.15.4 Thread interface. The Border Router
bridges the Thread network with the network interface of the controller, for example Wi-Fi.
5. Architecture
● Matter defines the application layer that will be deployed on devices and
controllers as well as the supported IPv6-based networks to help achieve our
interoperability architectural goal
● Application is broken down as:
1. Build
Prerequisites
● A Raspberry Pi 4 board
● A laptop / workstation etc
● Ubuntu 20.04 or newer image for ARM64/AMD64 platform
If you already have a checkout, run the following command to sync submodules:
Build Docker
$ cd integrations/docker/images/chip-build-crosscompile
$ ./build.sh
after that docker image chip-build-crosscompile would be created, start Docker with the
builded image by running the following command, customized to your needs as
described below:
$ source scripts/activate.sh
If this script says the environment is out of date, it can be updated by running:
$ source scripts/bootstrap.sh
$ export
PKG_CONFIG_PATH="/opt/ubuntu-21.04-aarch64-sysroot/lib/aarch64-linux-gnu/pkgcon
fig"
$ ninja -C /var/chip/out/linux-arm64-lighting-app
Boot the SD card, login with the default user account "ubuntu" and password "ubuntu",
then proceed with "How to install prerequisites on Linux".
ExecStart=/sbin/wpa_supplicant -u -s -i wlan0 -c
/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/run/wpa_supplicant
update_config=1
$ sudo out/debug/chip-lighting-app
In laptop:
To use the Client to send Matter commands, run the built executable and pass it the
target cluster name, the target command name as well as an endpoint id.
$ chip-tool onoff on 1
The client will send a single command packet and then exit.
IPv6
Introduction
Overview
IPv6 has 128 bit addresses and has a much larger address space than 32-bit IPv4
which offered us a bit more than 4 billion addresses.
With 128 bits this is the largest value you can create:
340,282,366,920,938,463,463,374,607,431,768,211,456
The main reason to start using IPv6 is that we need more addresses but it also offers
some new features:
We don’t use decimal numbers like for IPv4, we are using hexadecimal now. Here’s an
example of an actual IPv6 address:
2041:1234:140F:1122:AB91:564F:875B:131B
● Original: 2041:0000:140F:0000:0000:0000:875B:131B
● Short: 2041:0000:140F::875B:131B
If there is a string of zeros then you can remove them once. In the example above I
removed the entire 0000:0000:0000 part. You can only do this once, your IPv6 device
will fill up the remaining space with zeros until it has a 128 bit address.
● Short: 2041:0000:140F::875B:131B
● Shorter: 2041:0:140F::875B:131B
If you have a “hextet” with 4 zeros then you can remove those and leave a single zero.
Your IPv6 device will add the remaining 3 zeros.
Leading zeros can also be removed, here’s another address to demonstrate this:
● Original: 2001:0001:0002:0003:0004:0005:0006:0007
● Short: 2001:1:2:3:4:5:6:7
● An entire string of zeros can be removed, you can only do this once.
● 4 zeros can be removed, leaving only a single zero.
● Leading zeros can be removed.
IPv6 Prefix
IPv4 addresses have a subnet mask but instead of typing something like 255.255.255.0
we use a prefix length for IPv6. Here is an example of an IPv6 prefix:
2001:1111:2222:3333::/64