Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/silabs doc #206

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
- [nRF Connect - Software Update](./nrfconnect_examples_software_update.md)
- [NXP - Android Commissioning](./nxp_k32w_android_commissioning.md)
- [NXP - Linux Examples](./nxp_imx8m_linux_examples.md)
- [Silicon Labs - Documentation](https://github.com/SiliconLabs/matter#readme)
- [Silicon Labs - Building](./silabs_efr32_building.md)
- [Silicon Labs - Documentation](https://siliconlabs.github.io/matter/latest/index.html)
- [Silicon Labs - Getting Started](./silabs_getting_started.md)
- [Silicon Labs - Software Update](./silabs_efr32_software_update.md)
- [Silicon Labs - CLI Guide](./silabs_cli_guide.md)
- [STMicroelectronics (STM32)](./stm32_getting_started_guide.md)
- [TI - Platform Overview](./ti/ti_platform_overview.md)
- [Open IoT SDK - Platform Overview](./openiotsdk_platform_overview.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Example:
- [Infineon CYW30739 Lighting](/examples/lighting-app/infineon/cyw30739/README.md)
- [Infineon PSoC6](/examples/all-clusters-app/infineon/psoc6/README.md)
- [Qorvo](/examples/lighting-app/qpg/README.md)
- [SiliconLabs](./silabs_efr32_building.md)
- [Silicon Labs](./silabs_getting_started.md)
- [Simulated Linux](./simulated_device_linux.md)
- [Telink](/examples/lighting-app/telink/README.md)
- [TI Platform](./ti/ti_platform_overview.md)
Expand Down
Binary file added docs/guides/images/silabs_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ ti/ti_platform_overview
- [NXP - Android Commissioning](./nxp_k32w_android_commissioning.md)
- [NXP - Linux Examples](./nxp_imx8m_linux_examples.md)
- [NXP - Manufacturing Data](./nxp_manufacturing_flow.md)
- [Silicon Labs - Documentation](https://github.com/SiliconLabs/matter#readme)
- [Silicon Labs - Building](./silabs_efr32_building.md)
- [Silicon Labs - Documentation](https://siliconlabs.github.io/matter/latest/index.html)
- [Silicon Labs - Getting Started](./silabs_getting_started.md)
- [Silicon Labs - Software Update](./silabs_efr32_software_update.md)
- [Silicon Labs - CLI Guide](./silabs_cli_guide.md)
- [TI - Platform Overview](./ti/ti_platform_overview.md)

## Tool Guides
Expand Down
198 changes: 198 additions & 0 deletions docs/guides/silabs_cli_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# Silabs CLI Guide

## Introduction
mkardous-silabs marked this conversation as resolved.
Show resolved Hide resolved
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)
- [Matter CLI](#matter-cli)
- [OpenThread CLI](#openthread-cli)
- [Connecting to the device](#connecting-to-the-device)
- [Screen Utility](#screen-utility)
- [Tera Term](#tera-term)
- [Commands List](#commands-list)
- [Application Specific Commands](#application-specific-commands)

## Enable the CLI Interfaces

### 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.
```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.
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.

| Configuration | Value |
| :----: | :---------- |
| Baudrate (speed) | 115200 |
| 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.

### 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.

## 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 `>`.

- [help](#help)
- [base64](#base64)
- [exit](#exit)
- [version](#version)
- [ble](#ble)
- [config](#config)
- [device](#device)
- [onboardingcodes](#onboardingcodes)
- [dns](#dns)
- [dns](#dns)
- [ota](#ota)
- [stat](#stat)
- [echo](#echo)
- [log](#log)
- [rand](#rand)
- [otcli](#otcli)

### help
Prints the list of commands and their description.
```bash
matterCli> help
base64 Base64 encode / decode utilities
exit Exit the shell application
help List out all top level commands
version Output the software version
ble BLE transport commands
config Manage device configuration. Usage to dump value: config [param_name] and to set some values (discriminator): config [param_name] [param_value].
device Device management commands
onboardingcodes Dump device onboarding codes. Usage: onboardingcodes none|softap|ble|onnetwork [qrcode|qrcodeurl|manualpairingcode]
dns Dns client commands
ota OTA commands
stat Statistics commands
echo Echo back provided inputs
log Logging utilities
rand Random number utilities
otcli Dispatch OpenThread CLI command
```

### base64
Base64 encode / decode utilities

```bash
matterCli>base64 help
help Usage: base64 <subcommand>
encode Encode a hex sting as base64. Usage: base64 encode <hex_string>
decode Decode a base64 sting as hex. Usage: base64 decode <base64_string>
```

### exit
Exit the application

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

### version
Output the software version

### ble
BLE transport commands

```bash
matterCli> ble help
help Usage: ble <subcommand>
adv Enable or disable advertisement. Usage: ble adv <start|stop|state>
```

### config
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
help Usage: config <subcommand>
vendorid Get VendorId. Usage: config vendorid
productid Get ProductId. Usage: config productid
hardwarever Get HardwareVersion. Usage: config hardwarever
pincode Get commissioning pincode. Usage: config pincode
discriminator Get/Set commissioning discriminator. Usage: config discriminator [value]
```

### device
Device management commands

```bash
matterCli> device
factoryreset Performs device factory reset
```

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

### dns
Dns client commands

```bash
matterCli> dns
resolve Resolve the DNS service. Usage: dns resolve <fabric-id> <node-id> (e.g. dns resolve 5544332211 1)
browse Browse DNS services published by Matter nodes. Usage: dns browse <commissionable|commissioner>
```

### ota
OTA commands

```bash
matterCli> ota
query Query for a new image. Usage: ota query
apply Apply the current update. Usage: ota apply
notify Notify the new image has been applied. Usage: ota notify <version>
state Gets state of a current image update process. Usage: ota state
progress Gets progress of a current image update process. Usage: ota progress
```

### 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.

## 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.
123 changes: 123 additions & 0 deletions docs/guides/silabs_common_app_behavior.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# 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](#introduction)
- [LCD Screens](#lcd-screens)
- [QR Code](#qr-code)
- [Application UI](#application-ui)
- [Status Screen](#status-screen)
- [Buttons](#buttons)
- [Operation Button](#operation-button)
- [Application Button](#application-button)
- [LEDs](#leds)
- [Status LED](#status-led)
- [Application LED](#application-led)

## 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.

### 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.

### Application UI

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.

## 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.

### Operation Button

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


<table>
<tr>
<th>Execution</th>
<th>Description</th>
</tr>
<tr>
<td>Press and Release</td>
<td>
<ul>
<li>If the device is not already commissioned, it will start advertising in fast mode for 30 seconds. <br/>After 30 seconds, the device will then switch to a slower interval advertisement After 15 minutes, the advertisement stops.</li>
<li>Prints initial and BCM commissioning QR code in the Logs</li>
</ul>
</td>
</tr>
<tr>
<td>Press and hold for 6 seconds</td>
<td>
<ul>
<li>Factory Reset device</li>
</ul>
</td>
</tr>
</table>

### 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.

### 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. |

### Application LED

See the sample app documentation for more information on the application LED.
30 changes: 0 additions & 30 deletions docs/guides/silabs_efr32_building.md

This file was deleted.

Loading
Loading