Skip to content

Commit

Permalink
Merge branch 'master' into fix-resp-timeout-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Sep 30, 2022
2 parents 3306a8e + 35703fc commit c7c630a
Show file tree
Hide file tree
Showing 233 changed files with 443 additions and 3,118 deletions.
3 changes: 0 additions & 3 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ labelPRBasedOnFilePath:
ble:
- src/ble/*

android:
- src/android/*

app:
- src/app/*

Expand Down
4 changes: 0 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ ble:
- src/ble/*
- src/ble/**/*

android:
- src/android/*
- src/android/**/*

app:
- src/app/*
- src/app/**/*
Expand Down
2 changes: 1 addition & 1 deletion .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exclude:
- "third_party/bluez/repo/**/*"
- "third_party/cirque/repo/**/*"
- "third_party/nanopb/repo/**/*"
- "src/android/CHIPTool/gradlew" # gradle wrapper generated file
- "examples/android/CHIPTool/gradlew" # gradle wrapper generated file
- "third_party/android_deps/gradlew" # gradle wrapper generated file
- "src/controller/python/chip/clusters/Objects.py" # generated file, no point to restyle
- "src/controller/python/chip/clusters/CHIPClusters.py" # generated file, no point to restyle
Expand Down
9 changes: 7 additions & 2 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/ota-image.cmake)

set(CHIP_REQURIE_COMPONENTS freertos lwip bt mbedtls fatfs app_update console openthread nvs_flash)

if(NOT "${IDF_TARGET}" STREQUAL "esp32h2")
if((NOT "${IDF_TARGET}" STREQUAL "esp32h2") AND (NOT "${IDF_TARGET}" STREQUAL "esp32c2"))
list(APPEND CHIP_REQURIE_COMPONENTS mdns)
endif()

Expand Down Expand Up @@ -289,6 +289,11 @@ if(CONFIG_BT_ENABLED)
if(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2)
list(APPEND chip_libraries ${bt_dir}/controller/lib_esp32h2/esp32h2-bt-lib/beta2/libble_app.a)
endif()
elseif("${CONFIG_IDF_TARGET}" STREQUAL "esp32c2")
idf_component_get_property(bt_lib bt COMPONENT_LIB)
idf_component_get_property(bt_dir bt COMPONENT_DIR)
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}>)
list(APPEND chip_libraries ${bt_dir}/controller/lib_esp32c2/esp32c2-bt-lib/libble_app.a)
else()
idf_component_get_property(bt_lib bt COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}> -lbtdm_app)
Expand All @@ -305,7 +310,7 @@ if(CONFIG_OPENTHREAD_ENABLED)
list(APPEND chip_libraries $<TARGET_FILE:${openthread_lib}>)
endif()

if(NOT CONFIG_USE_MINIMAL_MDNS AND NOT CONFIG_IDF_TARGET_ESP32H2)
if((NOT CONFIG_USE_MINIMAL_MDNS) AND (NOT CONFIG_IDF_TARGET_ESP32H2) AND (NOT CONFIG_IDF_TARGET_ESP32C2))
idf_component_get_property(mdns_lib mdns COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${mdns_lib}>)
endif()
Expand Down
9 changes: 6 additions & 3 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,14 @@ menu "CHIP Device Layer"

When set, WoBLE advertisements will stop while a WoBLE connection is active.

config DEINIT_BLE_ON_COMMISSIONING_COMPLETE
bool "Disable and DeInit BLE on commissioning complete"
config USE_BLE_ONLY_FOR_COMMISSIONING
bool "Use BLE only for commissioning"
default y
help
Disable and deinit BLE and reclaim all its memory, once the commissioning is successful and Commissioning complete event is received in the application.
Disable this flag if BLE is used for any other purpose than commissioning.
When enabled, it deinitialized the BLE on successful commissioning, and on
bootup do not initialize the BLE if device is already provisioned with Wi-Fi/Thread credentials.

endmenu

menu "CHIP Thread Options"
Expand Down
4 changes: 2 additions & 2 deletions config/esp32/components/chip/ota-image.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function(chip_ota_image TARGET_NAME)
"--product-id"
${CONFIG_DEVICE_PRODUCT_ID}
"--version"
${CONFIG_DEVICE_SOFTWARE_VERSION_NUMBER}
${PROJECT_VER_NUMBER}
"--version-str"
${CONFIG_DEVICE_SOFTWARE_VERSION}
${PROJECT_VER}
"--digest-algorithm"
"sha256"
)
Expand Down
15 changes: 8 additions & 7 deletions docs/guides/android_building.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ There are following Apps on Android

## Source files

You can find source files of the Android applications in the `src/android/`
You can find source files of the Android applications in the `examples/android/`
directory.

<hr>
Expand Down Expand Up @@ -169,7 +169,7 @@ which allows us to directly edit core Matter code in-IDE.
2. Modify the `matterSdkSourceBuild` variable to true, `matterBuildSrcDir` point
to the appropriate output directory (e.g. `../../../../out/android_arm64`),
and `matterSourceBuildAbiFilters` to the desired ABIs in
[src/android/CHIPTool/gradle.properties](https://github.com/project-chip/connectedhomeip/blob/master/src/android/CHIPTool/gradle.properties)
[examples/android/CHIPTool/gradle.properties](https://github.com/project-chip/connectedhomeip/blob/master/examples/android/CHIPTool/gradle.properties)

3) Open the project in Android Studio and run **File -> Sync Project with Gradle
Files**.
Expand All @@ -180,21 +180,22 @@ which allows us to directly edit core Matter code in-IDE.
- Run the following command in the command line:

```shell
cd src/android/CHIPTool
cd examples/android/CHIPTool
./gradlew build
```

The debug Android package `app-debug.apk` will be generated at
`src/android/CHIPTool/app/build/outputs/apk/debug/`, and can be installed with
`examples/android/CHIPTool/app/build/outputs/apk/debug/`, and can be installed
with

```shell
adb install src/android/CHIPTool/app/build/outputs/apk/debug/app-debug.apk
adb install examples/android/CHIPTool/app/build/outputs/apk/debug/app-debug.apk
```

or

```shell
(cd src/android/CHIPTool && ./gradlew installDebug)
(cd examples/android/CHIPTool && ./gradlew installDebug)
```

<a name="building-chiptest-scripts"></a>
Expand All @@ -209,5 +210,5 @@ Currently, the CHIPTest can only be built from scripts. The steps are similar to
```

You can modify the `matterUTestLib` variable to the test lib in
[src/android/CHIPTest/gradle.properties](https://github.com/project-chip/connectedhomeip/blob/master/src/android/CHIPTest/gradle.properties)
[examples/android/CHIPTest/gradle.properties](https://github.com/project-chip/connectedhomeip/blob/master/examples/android/CHIPTest/gradle.properties)
to change target to test.
2 changes: 1 addition & 1 deletion docs/guides/esp32/build_app_and_commission.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Below apps can be used for commissioning the application running on ESP32:
- [Python Based Device Controller](https://github.com/project-chip/connectedhomeip/tree/master/src/controller/python)
- [Standalone chip-tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool)
- [iOS chip-tool App](https://github.com/project-chip/connectedhomeip/tree/master/src/darwin/CHIPTool)
- [Android chip-tool App](https://github.com/project-chip/connectedhomeip/tree/master/src/android/CHIPTool)
- [Android chip-tool App](https://github.com/project-chip/connectedhomeip/tree/master/examples/android/CHIPTool)
### Building Standalone chip-tool
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/mbedos_commissioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ brightness between 0-255.
If **Lighting LED** is available then brightness change can be observed.

> For more details about Android CHIPTool please visit
> [CHIPTool](../../src/android/CHIPTool/README.md)
> [CHIPTool](../../examples/android/CHIPTool/README.md)
# POSIX CLI CHIPTool

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/nrfconnect_android_commissioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ After building, install the application by completing the following steps:
replaced with the path to the Matter source directory:

```
adb install -r chip-dir/src/android/CHIPTool/app/build/outputs/apk/debug/app-debug.apk
adb install -r chip-dir/examples/android/CHIPTool/app/build/outputs/apk/debug/app-debug.apk
```

6. Navigate to settings on your smartphone and grant **Camera** and
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/nxp_k32w_android_commissioning.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Commissioning NXP K32W using Android CHIPTool

This article describes how to use
[CHIPTool](../../src/android/CHIPTool/README.md) for Android smartphones to
[CHIPTool](../../examples/android/CHIPTool/README.md) for Android smartphones to
commission an NXP K32W061 DK6 running
[NXP K32W Lock/Light Example Application](../../examples/lock-light-app/k32w/README.md)
onto a CHIP-enabled Thread network.
Expand Down Expand Up @@ -372,7 +372,7 @@ to learn how to build and program the light example onto an K32W061 DK6.
## Building and installing Android CHIPTool
To build the CHIPTool application for your smartphone, read
[Android CHIPTool README](../../src/android/CHIPTool/README.md).
[Android CHIPTool README](../../examples/android/CHIPTool/README.md).
After building, install the application by completing the following steps:
Expand All @@ -393,7 +393,7 @@ After building, install the application by completing the following steps:
replaced with the path to the CHIP source directory:
```
adb install -r chip-dir/src/android/CHIPTool/app/build/outputs/apk/debug/app-debug.apk
adb install -r chip-dir/examples/android/CHIPTool/app/build/outputs/apk/debug/app-debug.apk
```
6. Navigate to settings on your smartphone and grant _Camera_ and _Location_
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/nrfconnect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,6 @@ learn how to use command-line interface of the application.

Read the
[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md)
to see how to use [CHIPTool](../../../src/android/CHIPTool/README.md) for
to see how to use [CHIPTool](../../../examples/android/CHIPTool/README.md) for
Android smartphones to commission and control the application within a
Matter-enabled Thread network.
Loading

0 comments on commit c7c630a

Please sign in to comment.