Skip to content

Commit

Permalink
Pull request project-chip#80: WIFI documentation update
Browse files Browse the repository at this point in the history
Merge in WMN_TOOLS/matter from wifi_docs_update_sep8 to silabs

Squashed commit of the following:

commit e4a89e2a30f3b431f8c8d79e98fc07a806e8c71d
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 19:21:54 2022 +0530

    WiFi document update

commit c653f9a7f9bfa15d1173d85d84745374c05e94ce
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 19:14:26 2022 +0530

    WiFi document update

commit 05d21a9a636405c856cc704eaf86a586938ac5e1
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 17:11:43 2022 +0530

    WiFi document update SW_SETUP

commit 926a6056b7c49a965d20323f6156d037955a0ddf
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 17:08:57 2022 +0530

    WiFi document update SW_SETUP

commit 4371fbc8031215f79c1dd9dcb2d1c7b2cfb6c5bf
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 17:06:49 2022 +0530

    WiFi document update SW_SETUP

commit d6de83e8d3d62b67406d9b742bb3a8a648021a6b
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 17:05:32 2022 +0530

    WiFi document update SW_SETUP

commit cb3c7f8fdef4086e7f19c964d0b67ebff6ce6773
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 17:03:12 2022 +0530

    WiFi document update SW_SETUP

commit 00eab5fd6fd72f4ef70b808ad5180e32f5327aa7
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 16:57:11 2022 +0530

    WiFi document update overview

commit b1b49433816debb3a47c2bfd0f949667fd144b5a
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 16:53:39 2022 +0530

    WiFi document update overview

commit 97df973853bdb58ba59daf345777a3c861879a5a
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 16:38:59 2022 +0530

    WiFi document update readme

commit 257a1b8e8231fae358e74d3d1b8f8142cbd1e780
Author: riwaghe <[email protected]>
Date:   Thu Sep 8 15:09:31 2022 +0530

    WiFi document update
  • Loading branch information
bivishwa authored and jmartinez-silabs committed Mar 27, 2024
1 parent ad60b07 commit 2e98e9d
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 272 deletions.
6 changes: 2 additions & 4 deletions docs/silabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
4. [Creating a Thread Matter End Device](thread/BUILD_FLASH_MAD.md)
5. [Using the Chip-Tool](thread/CHIP_TOOL.md)<BR> <BR>

4. [Matter over Wi-Fi](wifi/WIFI.md)
4. Matter over Wi-Fi

1. [Matter Wi-Fi Demo Overview](wifi/DEMO_OVERVIEW.md)
2. [Building A Matter Wi-Fi End Device](wifi/BUILD_CHIP_ENV.md)
2. [Building A Matter Wi-Fi End Device](wifi/SW_SETUP.md)
3. [Running Matter Demo over Wi-Fi](wifi/RUN_DEMO.md)
4. [optional]
[Running Matter Demo over Wi-Fi using Android](wifi/WIFI_ANDROID.md)
<br><br>

5. Development using VS Code
Expand Down
155 changes: 8 additions & 147 deletions docs/silabs/wifi/BUILD_CHIP_ENV.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Building Your Wi-Fi Matter End Device and the Chip-Tool

# Build Environment using Linux
# Build Environment for Linux

This section will go through the steps required to build the demo using Linux.
This section will go through the steps required to build the chip-tool for Linux.

> **Do not execute any commands on this page as ROOT (no _su_ required), unless
> specified**
Expand All @@ -17,7 +17,6 @@ Update the latest packages by typing following commands in terminal:
$ sudo apt update
$ sudo apt install
```

<br>

## Prerequisites for Matter (CHIP) project on Linux
Expand All @@ -27,156 +26,18 @@ $ sudo apt install
- Open the Linux terminal from Start menu
- Install required packages on Ubuntu Laptop/PC using the following commands:

```shell
$ sudo apt install git gcc g++ pkg-config libssl-dev libdbus-1-dev \
libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \
python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
```

<br>

### 2. Matter codebase

- Check out Matter codebase from GitHub:

- Download the
[Matter codebase](https://github.com/SiliconLabs/matter.git) from here
as follows:

`$ git clone https://github.com/SiliconLabs/matter.git`

- Sync submodules by running the following commands:

```shell
$ cd matter
$ ./scripts/checkout_submodules.py --shallow --platform efr32
$ sudo apt install git gcc g++ pkg-config libssl-dev libdbus-1-dev \
libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \
python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
```
<br>
### 2. Building Enviorment

- Environment Builds

- Activate environment builds:

`$ . scripts/bootstrap.sh`

- Create a directory where binaries will be updated:

`$ mkdir out`

- **[Optional:** Increasing stack size **]** <br> &emsp; Navigate to
`git/matter` and open the file in the path
`examples/lighting-app/efr32/include/FreeRTOSConfig.h`. Find the macro:
\``configMINIMAL_STACK_SIZE`\`, and change the macro value from `140` to
**`320`**.

<br>

<br>

## 3 .Compiling the Lighting-app

The following commands are for building the example. Depending on which device
you are using, select the appropriate build command to run.

> Please change the board referenced in the build command to your specific board
> before running the command.

Build command for RS911x + EFR32MG12:

`$ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/rs911x_lighting BRD41xxx --wifi rs911x |& tee out/rs911x_lighting.log`

Build command for WF200 + EFR32MG12:

`$ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/wf200_lighting BRD41xxx is_debug=false --wifi wf200 |& tee out/wf200_lighting.log`

Build command for RS911x + EFR32MG24:

`$ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/rs911x_lighting BRD41xxx disable_lcd=true show_qr_code=false use_external_flash=false --wifi rs911x`

Build command for WF200 + EFR32MG24:

`$ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/wf200_lighting BRD41xxx disable_lcd=true show_qr_code=false use_external_flash=false chip_build_libshell=false --wifi wf200`

MG12 Boards:

```
BRD4161A, BRD4163A, BRD4164A
```

MG24 Boards:

```
BRD4186C, BRD4187C
```

By using the following flags we can enable or disable the features of lighting
application.

1. `rs91x_wpa3_only` : To use rs91x wifi in wpa3 enable this flag while
building.

```shell
$ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/rs911x_lighting BRD41xxx rs91x_wpa3_only=true --wifi rs911x |& tee out/rs911x_lighting.log
```

2. `chip_enable_wifi_ipv4` : To enable ipv4 of device add this flag while
building the application.

```shell
$ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/rs911x_lighting BRD41xxx chip_enable_wifi_ipv4=true --wifi rs911x |& tee out/rs911x_lighting.log
```

3. `To enable different options for WPA/WPA2` :

1)Get the router address by entering `route -n` or ifconfig of ipconfig.

2)Enter router address in the browser and enter the appropriate username and
password.

3)Select appropriate band.

4)In security, select type.

> Note: It is enabled by default for the rs911x, wf200.

4. `Flag to get the complete logs without truncation` :

```shell
$ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/rs911x_lighting BRD41xxx segger_rtt_buffer_size_up=2068 --wifi rs911x |& tee out/rs911x_lighting.log
```

Run the following:

```shell
$ cd matter
$ <appropriate_build_command_from_above>
```

<br>

> Look for build problems in `out/*.log`, which is the log file that was
> generated by the above command

The generated software can be found in `out/rs911x_xxx/BRD4161A/*.log`.

This is what you will flash into the EFR32.
- To build enviorment follow the `Software setup` and `Compiling chip-tool` steps given in [SW_SETUP](./SW_SETUP.md),

<br>

## Compiling Chip-Tool

- Build the ChipTool on a laptop which has Wi-Fi and Bluetooth LE
- Run the following commands:

```shell
$ cd $MATTER_WORKDIR/matter
$ ./scripts/examples/gn_build_example.sh examples/chip-tool out/standalone
```

This will build chiptool in `out/standalone`

For more information on how to flash a Silicon Labs device please consult the
[Flashing Silicon Labs Device](../general/FLASH_SILABS_DEVICE.md) page.

---

[Table of Contents](../README.md) | [Thread Demo](../thread/DEMO_OVERVIEW.md) |
Expand Down
75 changes: 40 additions & 35 deletions docs/silabs/wifi/BUILD_PI_ENV.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ options

# Building Environment using Raspberry Pi 4

To flash the Ubuntu OS onto the SD card:
## To flash the Ubuntu OS onto the SD card:

1. Insert the flashed SD card (directly or using a card reader) into the
laptop/PC that will run the Raspberry Pi Imager tool
2. Launch Raspberry Pi 4 Imager
3. Click 'Choose OS' --> 'Other General-purpose OS' --> 'Ubuntu' --> 'Ubuntu
22.04 64-bit server OS'
xx.xx 64-bit server OS'
> Note: Flash the latest version of Ubnutu Server (64-bit server OS for arm64 architecture)
4. Click 'Storage' and select the 'SD card detect'
5. This Raspberry Pi 4's console can be accessed in multiple ways, refer to:
https://www.raspberrypi.com/documentation/computers/remote-access.html In
this guide, Raspberry Pi 4 is being accessed using Putty.
5. This Raspberry Pi 4's console can be accessed in multiple ways.
In [this guide](https://www.raspberrypi.com/documentation/computers/remote-access.html)
Raspberry Pi 4 is being accessed using Putty.
6. Enter the details like User name, Password, SSID and its password to connect
to network. Click 'Save'
7. Click 'Write' and then 'Yes' when you are asked for permission to erase data
Expand All @@ -27,69 +29,72 @@ To flash the Ubuntu OS onto the SD card:
<!-- ![Inserting SD into Pi](images/sd_into_pi.png) -->
<img src="images/sd_into_pi.png" alt="Inserting SD into Pi" width="550"/>

On powering up the board, the red and green lights should start blinking. To
start using the Raspberry Pi:
On powering up the board, the red and green lights should start blinking.

1. Use this reference to find the IP address of your Raspberry Pi:
[Finding Your Raspberry Pi](../general/FIND_RASPI.md)
2. Once you find the IP address, launch Putty, select 'Session', enter the IP
address of the Raspberry Pi, and click 'Open'
3. Enter the username and password given at the time of flashing and click
'Enter' If you don't give username and password default is user account
"ubuntu" and password "ubuntu",
## To start using the Raspberry Pi:

1. Use this [reference](../general/FIND_RASPI.md) to find the IP address of your Raspberry Pi.

2. Once you find the IP address, launch Putty, select `Session`, enter the IP
address of the Raspberry Pi, and click `Open`
3. Enter the username and password given at the time of flashing and click
`Enter`

> Note: If username and password not provided while flashing then by default
Username: ubuntu
Password: ubuntu

4. Update the latest packages by running following commands in the terminal:

> `$ sudo apt update`
> `$ sudo apt install`
```shell
$ sudo apt update
$ sudo apt install
```
5. Install required packages using the following commands:
```shell
$ sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \
libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \
python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
```

> `$ sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \
> libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \
> python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev`
<br>
> If you see any popups between installs, you can select 'Ok' or 'Continue'
## Installing prerequisites on Raspberry Pi 4

Finally, install some Raspberry Pi-specific dependencies:
> If you see any popups between installs, you can select 'Ok' or 'Continue'
## Build Environment
1. Installing prerequisites on Raspberry Pi 4
Follow the instructions in
[the Project CHIP GitHub Site](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/BUILDING.md),
in the section "Installing prerequisites on Raspberry Pi
4".

2. To build enviorment follow the `Software setup` and `Compiling chip-tool` steps given in [Software setup](./SW_SETUP.md),

## Bluetooth Setup

Make sure Bluetooth LE (BLE) is up and running on Raspberry Pi. Raspberry Pi internally has
some issues with BLE that may cause it to crash. Because BLE is used for
commissioning on Matter, make sure BLE is running.

> `$ sudo systemctl status bluetooth.service`
`$ sudo systemctl status bluetooth.service`

To stop BLE if it is already running:

> `$ sudo systemctl stop bluetooth.service`
`$ sudo systemctl stop bluetooth.service`

To restart the Bluetooth service, first enable it:

> `$ sudo systemctl enable bluetooth.service`
`$ sudo systemctl enable bluetooth.service`

When you check the status of the Bluetooth service, it will be inactive because
it has been enabled but not restarted:

> `$ sudo systemctl status bluetooth.service`
`$ sudo systemctl status bluetooth.service`

Restart the service:

> `$ sudo systemctl restart bluetooth.service`
`$ sudo systemctl restart bluetooth.service`

Now the status of the service should be active and running:

> `$ sudo systemctl status bluetooth.service`
`$ sudo systemctl status bluetooth.service`

---

Expand Down
Loading

0 comments on commit 2e98e9d

Please sign in to comment.