Serial Port Communication on the Silicon Labs Platform (Matter Shell)#
The matter-shell exposes the configuration and the management APIs via the matter command line interface (matter CLI). This interface can be used to change the state of the device.
Hardware Requirements#
To run matter shell on the Silicon Labs Platform, refer to the Hardware Requirements.
Software Requirements#
To run matter shell on the Silicon Labs Platform, refer to the Software Requirements.
Execute Matter Shell on Silicon Labs Platform#
Download and install Simplicity Studio.
To install the software packages for Simplicity Studio, refer to Software Package Installation.
Log in to Simplicity Studio and connect the EFR32MG2x or SiWx917 SOC board to the computer.
Go to the All Products section.
Type and select the radio board from the displayed list and click Start.
The Launcher page will display the selected radio board's details.
Verify the following in the General Information section:
The Debug Mode is Onboard Device (MCU).
The Preferred SDK is the version you selected earlier.
Open the Example Projects and Demos tab and create a project for the Matter Lock Application.
In the New Project Wizard window, click Finish.
After creation of project, open the Software Components tab and, in the search bar, type Matter Shell and install it.
Build the project after enabling the Matter Shell component.
After a successful build, commission the device as described in Commission Matter Platform.
For SiWx917 SoC, connect the TTL cables with the Radio Board to execute Matter Shell.
Note: For EFR32MG2x devices, TTL Cable support is not required.
Open Tera Term and under New connection, select Serial, and in the dropdown, select the JLink port, and click OK.
In the menu bar, click Setup > Terminal.
Inside Terminal, set the values below and click OK.
Terminal Size : 80 * 24
New-Line
Receive : CR+LF
Transmit : CR+LF
In the menu bar, click Setup > Serial port.
Increase the speed to 115200 and click New setting.
In the menu bar, click File > TTY Record. Create any empty file with extension ".tty" and click Save.
After creating the tty file, press Enter to open the matterCli terminal.
Send any command through the matterCli terminal, from the below list of commands:
doorlock event door-state-change "DoorState"
Door State List
DoorOpen = 0
DoorClosed = 1
DoorJammed = 2
DoorForcedOpen = 3
DoorUnspecifiedError = 4
DoorAjar = 5
doorlock event lock-alarm "AlarmCode"
Alarm Code List
LockJammed = 0
LockFactoryReset = 1
LockRadioPowerCycle = 3
WrongCodeEntryLimit = 4
FrontEsceutcheonRemoved = 5
DoorForcedOpen = 6
DoorAjar = 7
ForcedUser = 8
onboardingcodes ble, command will show QR Code.
After changing DoorState and AlarmCode in matterCli, run the commands below using chip-tool on Raspberry PI to verify the event.
To Read Door State
./chip-tool doorlock read-event door-state-change "node_id" "endpoint"
To Read Alarm Code
./chip-tool doorlock read-event door-lock-alarm "node_id" "endpoint"
Note: Type help in matterCli terminal for more information about supported features.