Skip to content

Commit aa6b34a

Browse files
Shayna Kaushaljmartinez-silabs
authored andcommitted
Pull request project-chip#12: Matter documentation
Merge in WMN_TOOLS/matter from matter-documentation to silabs Squashed commit of the following: commit e8146293fbd04a20fc6d6a7997731d714271cceb Author: Shayna Kaushal <shkausha@silabs.com> Date: Thu Jul 21 12:53:24 2022 -0400 [wifi] flow commit df0bfc5d938e139ed8fbcfdd4dbbcb5eb280b43a Author: Ezra Hale <ezra.hale@silabs.com> Date: Thu Jul 21 10:37:06 2022 -0400 updated release version links commit 1c2445e0d2f7a9fcd467635958d1361c99fb070b Author: Ezra Hale <ezra.hale@silabs.com> Date: Thu Jul 21 10:20:06 2022 -0400 fixed broken link in doc commit 0353026f6d24a5c03be7ab751232bb1a04b48814 Author: Ezra Hale <ezra.hale@silabs.com> Date: Thu Jul 21 09:39:59 2022 -0400 updated commit 7fff13c2087349701291f7d49132f88e6b1e3c4b Author: Ezra Hale <ezra.hale@silabs.com> Date: Thu Jul 21 09:36:23 2022 -0400 added links commit 20265a85d2e4ef9951f69e9c6b82c2e673a3c3ff Author: Ezra Hale <ezra.hale@silabs.com> Date: Thu Jul 21 08:58:48 2022 -0400 updated location of pi image commit 52cd19670d0d5e07ee62b961f142e296b2214703 Author: Ezra Hale <ezra.hale@silabs.com> Date: Wed Jul 20 14:44:47 2022 -0400 updated title commit 23132dd01ccc4e3bad0196a1de88e123d4ff89e7 Author: Ezra Hale <ezra.hale@silabs.com> Date: Wed Jul 20 14:43:33 2022 -0400 updated some language commit 3392b1eae54510f0470d656492c4cb1940ec3518 Author: Ezra Hale <ezra.hale@silabs.com> Date: Wed Jul 20 14:40:30 2022 -0400 added header to Matter README.md commit b1427675245daac4c223ee9bc3284ebddfb022ce Author: Ezra Hale <ezra.hale@silabs.com> Date: Wed Jul 20 13:55:31 2022 -0400 small edit commit 16483955fa46c4415275b6e14810f21231acde0f Author: Ezra Hale <ezra.hale@silabs.com> Date: Wed Jul 20 13:53:58 2022 -0400 update doc in build and flash commit e34b02701f18ece1a87e03df5164cf142bd9b685 Author: Ezra Hale <ezra.hale@silabs.com> Date: Wed Jul 20 13:47:03 2022 -0400 updated link on build and flash commit 5fd1f9330a89f8b6b8ac3ba87d0708c8fbe78b12 Author: Ezra Hale <ezra.hale@silabs.com> Date: Wed Jul 20 09:46:55 2022 -0400 updated links and supported platforms commit f83790ae5ad212714f2a3149ca22033125262c50 Author: jepenven-silabs <jean-francois.penven@silabs.com> Date: Tue Jul 19 14:31:52 2022 -0400 cleanup documentation commit 02221236ea0c17fa9051d115b174763353f49b76 Author: Ezra Hale <ezra.hale@silabs.com> Date: Tue Jun 28 13:39:23 2022 -0400 first commit of matter documentation
1 parent 448f6c7 commit aa6b34a

37 files changed

+1591
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Matter
1+
# Silicon Labs Matter
2+
3+
Welcome to the Silicon Labs Matter Github repo. This is your one stop shop for all things related to Silicon Labs and Matter development. To develop a Matter application with Silicon Labs please start here: [Silicon Labs Matter Table of Contents](./docs/silabs/README.md)
4+
5+
<BR>
6+
27

38
[![Builds](https://github.com/project-chip/connectedhomeip/workflows/Builds/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/build.yaml)
49

docs/silabs/OVERVIEW.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[<< Back to TOC](./README.md)
2+
3+
# Silicon Labs Matter Repo Overview
4+
5+
Welcome to the Silicon Labs Matter Repo. For more information on Matter in general please checkout the main Matter Overview page located here [Matter Overview](../../README.md)
6+
7+
Silicon Labs supports Matter on both 802.15.4 (Thread) and 802.11 (Wifi) transport protocols.
8+
9+
This Repo is the starting point for all Silicon Labs related Matter development. In this repo you will find documentation, demos, examples and all the code needed for Matter Accessory Device development on both Thread and Wifi.
10+
11+
The Thread and Wifi development use cases differ because the Thread protocol requires the use of an Open Thread Border Router (OTBR).
12+
13+
The Thread development use case is described in the Thread section of this documentation located here: [Matter Thread](./thread/THREAD.md)
14+
15+
The Wifi development use case is described in the Wifi section of this documentation located here: [Matter Wifi](./wifi/WIFI.md)

docs/silabs/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Silicon Labs Matter Table of Contents
2+
3+
1. [Silicon Labs Matter Overview](OVERVIEW.md) <br>
4+
5+
2. [Matter over Thread \(15.4\)](thread/THREAD.md)
6+
7+
1. [Matter Thread Demo Overview](thread/DEMO_OVERVIEW.md)
8+
2. [Matter Thread Demo Prerequisites](thread/THREAD_PREREQS.md)
9+
3. [Loading the Raspberry Pi image onto the Matter Hub](thread/RASPI_IMG.md)
10+
4. [Setting up the RCP](thread/RCP.md)
11+
5. [Creating your first Matter Device](thread/BUILD_FLASH_MAD.md)
12+
6. [Using the Chip-Tool](thread/CHIP_TOOL.md)<BR> <BR>
13+
14+
3. [Matter over Wifi](wifi/WIFI.md)
15+
16+
1. [Matter Wifi Demo Overview](wifi/DEMO_OVERVIEW.md)
17+
2. [Matter Wifi Demo Prerequisites](wifi/WIFI_PREREQS.md)
18+
3. [Building Linux Environment](wifi/BUILD_CHIP_ENV.md)
19+
4. [Building Raspberry Pi Environment](wifi/BUILD_PI_ENV.md)
20+
5. [Software Setup](wifi/SW_SETUP.md)
21+
6. [Running Matter Demo over Wifi using Linux](wifi/RUN_DEMO.md)
22+
7. [optional]
23+
[Running Matter Demo over Wifi using Android](wifi/WIFI_ANDROID.md)
24+
<br><br>
25+
26+
4. Reference Guides
27+
28+
1. [How to Flash a Silicon Labs Device](general/FLASH_SILABS_DEVICE.md)
29+
2. [How to Find Your Raspberry Pi](general/FIND_RASPI.md)
30+
3. [Silicon Labs Matter Commit Hashes](general/COMMIT_HASHES.md) <br><br>
31+
32+
5. Frequently Asked Questions (FAQ)
33+
- [Thread FAQ](thread/FAQ.md)
34+
- [Wifi FAQ](wifi/FAQ.md)
35+
36+
<!--
37+
(WIP)
38+
Matter Setup for Development
39+
Download Silicon Labs Matter Repo
40+
Setup VSCode
41+
Create a new sample application
42+
Build ( 1 task)
43+
Debug (1 task)
44+
Edit
45+
ZAP (Standalone) (1 task)
46+
Pin Tool (Studio) (1 task)
47+
BLE Configurator (Studio) (1 task)
48+
Build Arguments (Sleepy End Device) (1 task)
49+
Monitor Network (Wireshark, Studio) (1 task)
50+
Bootloader (Studio) (1 task)
51+
Energy Profiler (Studio) (1 task)
52+
Studio Integration
53+
Metadata for Matter SDK
54+
Misc
55+
Non Raspi based controllers
56+
-->

docs/silabs/dev/DEV.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[<< Back to TOC](../README.md)

docs/silabs/dev/setup/VSCODE_SETUP.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[<< Back to TOC](../../README.md)
2+
3+
todo: [link](https://github.com/project-chip/connectedhomeip/blob/master/docs/VSCODE_DEVELOPMENT.md)

docs/silabs/general/ARTIFACTS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[<< Back to TOC](../README.md)
2+
3+
# Matter Software Artifacts
4+
This page provides links to pre-built software image "artifacts" that can be used to set up the Matter Demo for the Thread and Wifi use cases.
5+
6+
<br>
7+
8+
## Matter Hub Raspberry Pi Image
9+
The Matter Hub image is intended to be flashed onto an SD card for a Raspberry Pi. The Matter Hub Image provides both an Open Thread Border Router and the Matter "ChipTool". Please download the Matter Hub Raspberry Pi image here. Note the image is ~10GB in size so depending on your internet connection this download may take some time.
10+
11+
https://www.silabs.com/documents/public/software/SilabsMatterPi.zip
12+
13+
<br>
14+
15+
## Radio Co-Processor (RCP) Images
16+
The Radio Co-Processor firmware is used to turn an EFR into an RCP that can be used with a Raspberry Pi to allow the Raspberry Pi's Open Thread Border Router to access the Thread network. Radio Co-Processor (RCP) images are available in the Assets section of this page, here:
17+
18+
https://github.com/SiliconLabs/matter/releases/tag/v0.1.0
19+
20+
<br>
21+
22+
## Matter Accessory Device Images
23+
The Matter Accessory Device Images are used to turn an EFR into a Matter device. These are pre-built binary images for the Matter Demo. Matter Accessory Device Images are located in the Assets section of this page:
24+
25+
https://github.com/SiliconLabs/matter/releases/tag/v0.1.0
26+
27+
<br>
28+
29+
<!--
30+
## Matter Chip Tool Android APK
31+
Matter Chip Tool .apk file is located here: http://silabs.com
32+
33+
<br>
34+
-->
35+
36+
## RS9116 Firmware
37+
The RS9116 firmware is used to update the RS9116.
38+
RS9116 Firmware is located in GitHub here:
39+
40+
https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk/tree/2.5.0/firmware

docs/silabs/general/COMMIT_HASHES.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[<< Back to TOC](../README.md)
2+
3+
# Matter Repositories and Commit Hashes
4+
5+
The following repositories, branches and commit hashes are to be used together
6+
in this release of the Silicon Labs Matter Out of Box Experience
7+
8+
## Open Thread Border Router (OTBR)
9+
10+
| Repo | Branch | Commit Hash |
11+
| ------------------------------------------ | ------ | ---------------------------------------- |
12+
| https://github.com/SiliconLabs/ot-br-posix | main | 1813352247aa60fb8993773918f1e5b4af6f3b79 |
13+
14+
## Radio Co-Processor (RCP)
15+
16+
| Repo | Branch | Commit Hash |
17+
| --------------------------------------- | ------ | ---------------------------------------- |
18+
| https://github.com/SiliconLabs/ot-efr32 | main | 7a567da02a078546eb34136c1c44170c8832dd55 |
19+
20+
## Matter ChipTool
21+
22+
| Repo | Branch | Commit Hash |
23+
| ----------------------------------------------- | ------ | ---------------------------------------- |
24+
| https://github.com/SiliconLabs/matter | \<this branch\> | \<this commit\> |
25+
26+
## Matter Accessory Device (MAD)
27+
28+
| Repo | Branch | Commit Hash |
29+
| ----------------------------------------------- | ------ | ---------------------------------------- |
30+
| https://github.com/SiliconLabs/matter | \<this branch\> | \<this commit\> |

docs/silabs/general/FIND_RASPI.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[<< Back to TOC](../README.md)
2+
3+
# How to find your Raspberry Pi on the Network
4+
5+
## Finding the IP address of your Raspberry Pi
6+
7+
Sometimes it can be difficult to find your Raspberry Pi on the network. One way of interacting with the Raspberry Pi is connecting a keyboard, mouse and monitor to it. The preferred method, however, is over SSH. For this, you will need to know the IP address of your Raspberry Pi.
8+
9+
[This](https://raspberryexpert.com/find-raspberry-pi-ip-address/) is a good tutorial on how to find the IP address.
10+
11+
12+
| Platform | Strategy |
13+
| -------- | -------- |
14+
| Mac / Linux | ***Nmap*** <br> &emsp; The use of nmap on the Mac may require a software download. <br> &emsp; Use nmap with the following command: <br> &emsp;&emsp; `sudo nmap -sn <subnet>.0/24` <br><br> &emsp; Example: `sudo nmap -sn 1-.4.148.0/24` <br><br> &emsp; Among other returned values, you will see: <br> &emsp;&emsp;&emsp; `Nmap scan report for ubuntu.silabs.com (10.4.148.44)` <br> &emsp;&emsp;&emsp; `Host is up (0.00025s latency).` <br> &emsp;&emsp;&emsp; `MAC Address: E4:5F:01:7B:CD:12 (Raspberry Pi Trading)` <br><br> &emsp; And this is the Raspberry Pi at 10.4.148.44 <br><br> ***Arp*** <br> &emsp; Alternatively, use Arp with the following command: <br> &emsp;&emsp; `arp -a \| grep -i "b8:27:eb\|dc:a6:32"` |
15+
| Windows | In the command prompt, use `nslookup` to fnd your Raspberry Pi. <br> &emsp; Example: `nslookup ubuntu` |
16+
17+
<br>
18+
19+
## Connecting to your Raspberry Pi over SSH
20+
21+
| Platform | Strategy |
22+
| -------- | -------- |
23+
| Mac / Linux / Windows | Once you have found your Raspberry Pi's IP address, you can use Secure Shell (SSH) to connect to it over the command line with the following command: <br> &emsp; `ssh <raspberry pi's username>@<raspberry pi's IP address>` <br><br> Example: <br> &emsp; `ssh ubuntu@10.4.148.44` <br> &emsp;`password: raspberrypi` <br><br> When prompted provide the raspberry pi's password, in the case of the Silicon Labs Matter Hub image the username is ***ubuntu*** and the password is ***raspberrypi*** |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[<< Back to TOC](../README.md)
2+
3+
# How to Flash a Silicon Labs Device
4+
5+
Once you have an image built, you can flash it onto your EFR device (either a EFR32 development board or the Thunderboard Sense 2) over USB connected to your development machine. This can be done using either Simplicity Studio or the standalone Simplicity Commander.
6+
7+
<br>
8+
9+
## Simplicity Commander
10+
A link to download Simplicity Commander's standalone version is located along with documentation in the
11+
- [Simplicity Commander Reference Guide](https://www.silabs.com/documents/public/user-guides/ug162-simplicity-commander-reference-guide.pdf)
12+
13+
## Simplicity Studio:
14+
Simplicity Studio is a complete development environment and tool suite. It has the ability to discover USB connected development boards and flash them.
15+
- [Download Simplicity Studio](https://www.silabs.com/developers/simplicity-studio)
16+
- [Simplicity Studio Reference Guide](https://docs.silabs.com/simplicity-studio-5-users-guide/latest/ss-5-users-guide-building-and-flashing/flashing)

docs/silabs/general/ZAP.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
[<< Back to TOC](../README.md)
2+
3+
# ZCL Advanced Platform (ZAP) Tool for Matter
4+
5+
## Overview
6+
7+
EFR32 example applications provide a baseline demonstration of a lock device,
8+
built using the Matter SDK and the Silicon Labs GeckoSDK. It can be controlled
9+
by a CHIP controller over Openthread network.
10+
11+
The EFR32 device can be commissioned over Bluetooth Low Energy (BLE) where the
12+
device and the CHIP controller will exchange security information with the
13+
Rendez-vous procedure. Thread Network credentials are provided to the EFR32
14+
device which will then join the network.
15+
16+
The LCD on the Silicon Labs WSTK shows a QR Code containing the needed
17+
commissioning information for the BLE connection and starting the Rendez-vous
18+
procedure.
19+
20+
The lock example is intended to serve both as a means to explore the workings of
21+
CHIP, and a template for creating real products on the Silicon Labs platform.
22+
23+
Each Matter application consists of the following layers:
24+
25+
- Matter SDK: Source code necessary to communicate through the Matter network
26+
over Thread or Wifi
27+
- Data model layer in the form of clusters. There are two types of clusters:
28+
- Utility Clusters:
29+
- They represent common management and diagnostic features of a Matter
30+
endpoint
31+
- Identify cluster is an example of a Utility Cluster. Given a Node
32+
ID, it can be used to Blink LED0 to the corresponding Silicon Labs
33+
WSTK
34+
- Application Clusters:
35+
- These clusters represent functionalities specific to a given
36+
application
37+
- Door Lock Cluster is an example of an Application specific cluster.
38+
This cluster contains commands to lock and unlock a door(door-lock
39+
is represented by an LED), with options to set passwords and lock
40+
schedules
41+
42+
<br>
43+
44+
## Clusters
45+
46+
Every Matter Application uses multiple clusters leveraged from the Zigbee
47+
Cluster Library(ZCL). A cluster can be seen as a building block for the Data
48+
Model of a Matter application. Clusters contains attributes, commands, and
49+
events. Attributes are customizable variables specified by the Zigbee Advanced
50+
Platform(ZAP) tool. Commands are sent to the application, which may respond with
51+
data, LED flickering, lock actuation, etc. Events are notifications sent out by
52+
the server.
53+
54+
An application can have multiple Matter endpoints. Application endpoints
55+
generally refer to one device, and inherits its information from the "cluster"
56+
it belongs to. Utility clusters are required to be on the endpoint with ID 0.
57+
Application clusters are assigned to endpoints with IDs 1 and higher.
58+
59+
Some applications have callbacks that are left to be implemented by the device
60+
manufacturer. For example, the storage and mangement of users and credentials in
61+
the lock-app is left up to the application developer.
62+
63+
<br>
64+
65+
## ZAP Tool
66+
67+
The ZAP tool is built and maintained by Silicon Labs and developers in the ZAP opensource community. It inherits its name and
68+
features from the Zigbee Cluster Library, which was the starting point for the Matter data model. ZAP is used
69+
for generating code for Matter applications based on the Zigbee Cluster
70+
Library and associated Matter code templates.
71+
72+
The ZAP tool can be cloned using the following git command. This will create a
73+
root level matter folder in your current directory. All following commands
74+
should be run from the matter folder.
75+
76+
> `$ git clone https://github.com/SiliconLabs/matter.git`
77+
78+
The `run_zaptool.sh` script can be invoked
79+
without arguments, or, you can provide the path to a ZAP file to be opened upon
80+
launch.
81+
82+
In the following examples, the ZAP file for the lock-app has been chosen.
83+
84+
> `$ ./scripts/tools/zap/run_zaptool.sh ($PATH_TO_ZAP_FILE)`
85+
86+
This shows the output of the run_zaptool script with no arguments. To load a new
87+
zap file, click the application menu for Electron (Upper left corner of the
88+
screen for macs), then click "Open File". Then navigate to the desired .zap
89+
file.
90+
91+
![ZAP Introduction Page](./images/zap_intro.png)
92+
93+
This shows the output of the run_zaptool script with a zap file given as an
94+
argument, or after a .zap file has been opened in the ZAP UI. An Electron
95+
application will open, pre-loaded with the information from the .zap file
96+
provided as a command line argument.
97+
98+
![ZAP Endpoint](./images/zap_endpoint.png)
99+
100+
The Out of the box(OOB) example lock application has 2 endpoints. Endpoint 0 is
101+
called the root node. It contains all Service and Device management clusters. In
102+
general, any cluster or feature that is not specific to a device type belongs in
103+
Endpoint 0. Examples of clusters one might find in Endpoint 0: Device Descriptor
104+
cluster, Network Diagnostics cluster.
105+
106+
Endpoint 1 contains information specific to the device type. Conveniently, the
107+
ZAP tool offers a Door lock cluster, which contains Commands(lock, unlock, set
108+
credential, etc..) and Attributes(Lock state, Require PIN) that a standard door
109+
lock application might use.
110+
111+
More endpoints can be added. Each endpoint acts like a port on a network interface.
112+
113+
Endpoints contain clusters which are bundles of device functionality. Clusters have both a Client and a Server interface. In general the Client interface sends commands and the Server interface receives them. For instance a Light would implement the Server side of the on/off clusters. A Switch would implement the Client side of the same cluster.
114+
115+
Click on Endpoint 1 on the left hand side of the application. The door lock
116+
cluster should already be enabled as "Server".
117+
118+
![ZAP Endpoint 1](./images/zap_endpoint_1.png)
119+
120+
<br>
121+
122+
## Attributes
123+
124+
Attributes are analogous to member variables of a class. Each attribute is
125+
provided with generated setter/getter code from the ZAP tool. They can be
126+
enabled or disabled for each cluster on a Matter endpoint. Some attributes are
127+
required to be enabled, else the application will not function properly. There
128+
is an option to add attributes to either the server code or client code. The ZAP
129+
tool also allows you choose a storage space for attributes. Attributes can be
130+
stored in standard RAM, Non-volatile memory or external memory. Each attribute
131+
has a type, some are standard C types and some have specially defined enums.
132+
Each attribute can be provided with a default starting value value.
133+
134+
Click the settings wheel to enable/disable, choose a storage option, and choose
135+
a default value for attributes, commands and events for Endpoint 1.
136+
137+
![ZAP Attributes](./images/zap_attributes.png)
138+
139+
<br>
140+
141+
## Commands
142+
143+
Commands can be enabled/disabled like attributes. Some commands are required for
144+
an application to function properly. Many of the functions run when a command is
145+
received are implemented on the server side. But some of these are left up to
146+
the application to define. In the EFR32 lock example, the set/get user and
147+
credential functions are customizable as each implementation of a lock might
148+
store these differently.
149+
150+
![ZAP Commands](./images/zap_commands.png)
151+
152+
<br>
153+
154+
## Generation of Code
155+
156+
Once desirable cluster options are chosen for an application, one must save the
157+
current zap configuration using the application menu in the upper left corner.
158+
Then click generate in the top menu bar. The user will be prompted to choose a
159+
save location for the generated ZAP code. In the Silicon Labs Matter repository,
160+
the lock-app generated files belong in
161+
matter/zzz_generated/lock-app/zap-generated .

0 commit comments

Comments
 (0)