Skip to content

Commit

Permalink
restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Jan 5, 2024
1 parent a5b1971 commit badfef4
Show file tree
Hide file tree
Showing 3 changed files with 265 additions and 165 deletions.
84 changes: 59 additions & 25 deletions docs/guides/silabs_cli_guide.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Silabs CLI Guide

## Introduction
The guide discusses the different CLIs that can be enabled with the Silabs sample apps.
The CLIs expose configuration and management APIs via a command line interface (CLI).
For OpenThread devices, the OpenThread CLI can be used with or without the Matter CLI. For Wi-Fi devices, only the Matter CLI is available.

The guide discusses the different CLIs that can be enabled with the Silabs
sample apps. The CLIs expose configuration and management APIs via a command
line interface (CLI). For OpenThread devices, the OpenThread CLI can be used
with or without the Matter CLI. For Wi-Fi devices, only the Matter CLI is
available.

- [Introduction](#introduction)
- [Enable the CLI interfaces](#enable-the-cli-interfaces)
Expand All @@ -20,53 +23,62 @@ For OpenThread devices, the OpenThread CLI can be used with or without the Matte
### Matter CLI

To enable the Matter CLI, the `chip_build_libshell=true` argument can be added.
This build argument can be added to OpenThread and Wi-Fi build commands.
Here is an example of the build command with the Matter CLI enabled.
This build argument can be added to OpenThread and Wi-Fi build commands. Here is
an example of the build command with the Matter CLI enabled.

```sh
./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/ ./out/lighting-app BRD4187C chip_build_libshell=true
```

### OpenThread CLI

The OpenThread CLI is enabled by default on all OpenThread builds. To disable the OpenThread CLI, the `enable_openthread_cli=false` argument can be added.
The OpenThread CLI is enabled by default on all OpenThread builds. To disable
the OpenThread CLI, the `enable_openthread_cli=false` argument can be added.
Here is an example of the build command to disable the OpenThread CLI.

```sh
./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/ ./out/lighting-app BRD4187C enable_openthread_cli=false
```

## Connecting to the Device

The different CLIs are provided through the UART interface.
The following table exposes the UART configurations to connect to the different CLIs.
The different CLIs are provided through the UART interface. The following table
exposes the UART configurations to connect to the different CLIs.

| Configuration | Value |
| :----: | :---------- |
| Configuration | Value |
| :--------------: | :----- |
| Baudrate (speed) | 115200 |
| Data | 8 bit |
| Parity | None |
| Stop Bit | 1 bit |
| Flow Control | None |
| Data | 8 bit |
| Parity | None |
| Stop Bit | 1 bit |
| Flow Control | None |

Any serial terminal emulator will permit to connect to the device.
For MacOS and Linux, the screen utility can be used. For Windows, Tera Term can be used.
Any serial terminal emulator will permit to connect to the device. For MacOS and
Linux, the screen utility can be used. For Windows, Tera Term can be used.

### Screen Utility

To use the Screen utility, we first need to find the vcom port. For MacOS, it will be formatted as `/dev/cu.usbmodem...` and for Linux it will be formatted as `/dev/ttyACM...`.<br/>
Here is an example command connecting to the device with the screen utility.
To use the Screen utility, we first need to find the vcom port. For MacOS, it
will be formatted as `/dev/cu.usbmodem...` and for Linux it will be formatted as
`/dev/ttyACM...`.<br/> Here is an example command connecting to the device with
the screen utility.

```sh
screen /dev/cu.usbmodem0004403048491 115200 8-N-1
```

### Tera Term

See the [Tera Term guide](https://siliconlabs.github.io/matter/latest/wifi/MATTER_SHELL.html) on how to connect to the deivce on Windows.
See the
[Tera Term guide](https://siliconlabs.github.io/matter/latest/wifi/MATTER_SHELL.html)
on how to connect to the deivce on Windows.

## Command List

When the prompt `matterCli>` is printed, the device is ready for a command.

> **Note**: When the OpenThread CLI is used without the Matter CLI, the prompt is `>`.
> **Note**: When the OpenThread CLI is used without the Matter CLI, the prompt
> is `>`.
- [help](#help)
- [base64](#base64)
Expand All @@ -86,7 +98,9 @@ When the prompt `matterCli>` is printed, the device is ready for a command.
- [otcli](#otcli)

### help

Prints the list of commands and their description.

```bash
matterCli> help
base64 Base64 encode / decode utilities
Expand All @@ -107,6 +121,7 @@ matterCli> help
```

### base64

Base64 encode / decode utilities

```bash
Expand All @@ -117,14 +132,17 @@ matterCli>base64 help
```

### exit

Exit the application

> **Note**: Application will not respond until reset.
### version

Output the software version

### ble

BLE transport commands

```bash
Expand All @@ -134,7 +152,9 @@ matterCli> ble help
```

### config
Manage device configuration. Usage to dump value: config [param_name] and to set some values (discriminator): config [param_name] [param_value].

Manage device configuration. Usage to dump value: config [param_name] and to set
some values (discriminator): config [param_name][param_value].

```bash
matterCli> config help
Expand All @@ -147,6 +167,7 @@ matterCli> config help
```

### device

Device management commands

```bash
Expand All @@ -155,9 +176,12 @@ matterCli> device
```

### onboardingcodes
Dump device onboarding codes. Usage: onboardingcodes none|softap|ble|onnetwork [qrcode|qrcodeurl|manualpairingcode]

### dns
Dump device onboarding codes. Usage: onboardingcodes none|softap|ble|onnetwork
[qrcode|qrcodeurl|manualpairingcode]

### dns

Dns client commands

```bash
Expand All @@ -167,6 +191,7 @@ matterCli> dns
```

### ota

OTA commands

```bash
Expand All @@ -179,20 +204,29 @@ matterCli> ota
```

### stat

Statistics commands

### echo

Echo back provided inputs

### log

Logging utilities

### rand

Random number utilities

### otcli
See the official OpenThread CLI [documentation](https://github.com/openthread/openthread/blob/main/src/cli/README.md) for the list of commands.

See the official OpenThread CLI
[documentation](https://github.com/openthread/openthread/blob/main/src/cli/README.md)
for the list of commands.

## Application Specific Commands

Samples apps may adds example specific commands to enhance the testable feature set of the sample. See the sample app documentation for more information on application specific commands.
Samples apps may adds example specific commands to enhance the testable feature
set of the sample. See the sample app documentation for more information on
application specific commands.
119 changes: 66 additions & 53 deletions docs/guides/silabs_common_app_behavior.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Standard Application Behavior Guide

## Introduction
This section discusses the application behavior that is common to all Silabs sample apps.
The source files that implement the common functionality can be found in the [example platform](../../examples/platform/silabs/) directory.
## Introduction

This section discusses the application behavior that is common to all Silabs
sample apps. The source files that implement the common functionality can be
found in the [example platform](../../examples/platform/silabs/) directory.

- [Introduction](#introduction)
- [LCD Screens](#lcd-screens)
Expand All @@ -18,58 +20,66 @@ The source files that implement the common functionality can be found in the [ex

## LCD Screens

When using a development kit that supports the LCD, the application has three distinct windows.
You can cycle between the three windows by pressing `BTN0`.
When the application UI is updated while on another window, the LCD will automatically switch to it.
When using a development kit that supports the LCD, the application has three
distinct windows. You can cycle between the three windows by pressing `BTN0`.
When the application UI is updated while on another window, the LCD will
automatically switch to it.

### QR Code

[QR Code](https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A6FCJ142C00KA0648G00) is the default QR code that can be used to commission the device over BLE and when using the Basic Commissioning Mode.
See the Matter specification to understand what is encoded in the QR code.
[QR Code](https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A6FCJ142C00KA0648G00)
is the default QR code that can be used to commission the device over BLE and
when using the Basic Commissioning Mode. See the Matter specification to
understand what is encoded in the QR code.

>**Note**: The Basic Commissioning Mode is not recommended since it is less secure than the Enhanced Commissioning Mode.
>See the Matter specification for more details.
> **Note**: The Basic Commissioning Mode is not recommended since it is less
> secure than the Enhanced Commissioning Mode. See the Matter specification for
> more details.
### Application UI

Each sample has an application UI that helps visualize the sample's app state. See the sample app documentation for more information.
Each sample has an application UI that helps visualize the sample's app state.
See the sample app documentation for more information.

### Status Screen

The status screen is used to visualize the state of the device.
>**Note:** The support of the status screen for ICDs is yet to be done.
The following list describes the information that is common for OpenThread and Wi-Fi devices.
| LCD UI | Description |
| :----: | :---------- |
| # fabrics | Indicates the number of commissioned fabrics on the device |
| Connected | Indicates if the device is connected to the OpenThread or Wi-Fi network |
| Advertising | Indicates if the devices is currently advertising an open commissioning window |
| Is ICD | Indicates if the device is an Intermittently Connected device |

The following list describes the information that is unique to OpenThread devices.
| LCD UI | Description |
| :----: | :---------- |
| PANID | Indicates the panid of the configured openthread network |
| OT Type | Indicates the openthread device type (FTD / MTD) |
>**Note:** The PANID information is not yet printed on the LCD.
The following list describes the information that is unique to Wi-Fi devices.
| LCD UI | Description |
| :----: | :---------- |
| SSID | SSID of the connected Wi-Fi network |
>**Note:** The SSID information is not yet printed on the LCD.
The status screen is used to visualize the state of the device.

> **Note:** The support of the status screen for ICDs is yet to be done.
The following list describes the information that is common for OpenThread and
Wi-Fi devices. | LCD UI | Description | | :----: | :---------- | | # fabrics |
Indicates the number of commissioned fabrics on the device | | Connected |
Indicates if the device is connected to the OpenThread or Wi-Fi network | |
Advertising | Indicates if the devices is currently advertising an open
commissioning window | | Is ICD | Indicates if the device is an Intermittently
Connected device |

The following list describes the information that is unique to OpenThread
devices. | LCD UI | Description | | :----: | :---------- | | PANID | Indicates
the panid of the configured openthread network | | OT Type | Indicates the
openthread device type (FTD / MTD) |

> **Note:** The PANID information is not yet printed on the LCD.
The following list describes the information that is unique to Wi-Fi devices. |
LCD UI | Description | | :----: | :---------- | | SSID | SSID of the connected
Wi-Fi network |

> **Note:** The SSID information is not yet printed on the LCD.
## Buttons

All sample applications are designed to work with two buttons: the application button and the operation button.
Button 0, __BTN0__, is the operation button and Button 1, __BTN1__, is the application button.
>**Note:** Sparkfun dev kit (BRD2704A) does not have any buttons.
All sample applications are designed to work with two buttons: the application
button and the operation button. Button 0, **BTN0**, is the operation button and
Button 1, **BTN1**, is the application button.

### Operation Button
> **Note:** Sparkfun dev kit (BRD2704A) does not have any buttons.
The following list describes all the actions that can be executed with the operation button.
### Operation Button

The following list describes all the actions that can be executed with the
operation button.

<table>
<tr>
Expand All @@ -95,29 +105,32 @@ The following list describes all the actions that can be executed with the opera
</tr>
</table>

### Application Button
### Application Button

See the sample app documentation for more information on the application button.

## LEDs

All sample applications are designed to work with two LEDs: the application LED and the status LED.
__LED0__ is the status LED and the __LED1__ is the application LED.
>**Note:** Some dev kits can only support the buttons or the LEDs. The button support is the default configuration. <br/>
> For dev kits with only LED, the application LED is the default configuration.
All sample applications are designed to work with two LEDs: the application LED
and the status LED. **LED0** is the status LED and the **LED1** is the
application LED.

> **Note:** Some dev kits can only support the buttons or the LEDs. The button
> support is the default configuration. <br/> For dev kits with only LED, the
> application LED is the default configuration.
### Status LED

The following list describes all the states of the status LED.

| State | Description |
| :----: | :---------- |
| Short Flash On (50ms on / 950ms off) | The device is in the unprovisioned (unpaired) state and is waiting for a commissioning application to connect. |
| Rapid Even Flashing (100ms on / 100ms off) | The device is in the unprovisioned state and a commissioning application is connected through Bluetooth LE. |
| Short Flash Off (950ms on / 50ms off) | The device is fully provisioned, but does not yet have full Thread network or service connectivity. |
| Solid On | The device is fully provisioned and has full Thread network and service connectivity. |
| Long Even Flashing (500ms on / 500ms off) | Factory Reset procedure has been started. |
| State | Description |
| :----------------------------------------: | :------------------------------------------------------------------------------------------------------------- |
| Short Flash On (50ms on / 950ms off) | The device is in the unprovisioned (unpaired) state and is waiting for a commissioning application to connect. |
| Rapid Even Flashing (100ms on / 100ms off) | The device is in the unprovisioned state and a commissioning application is connected through Bluetooth LE. |
| Short Flash Off (950ms on / 50ms off) | The device is fully provisioned, but does not yet have full Thread network or service connectivity. |
| Solid On | The device is fully provisioned and has full Thread network and service connectivity. |
| Long Even Flashing (500ms on / 500ms off) | Factory Reset procedure has been started. |

### Application LED
### Application LED

See the sample app documentation for more information on the application LED.
See the sample app documentation for more information on the application LED.
Loading

0 comments on commit badfef4

Please sign in to comment.