Skip to content

Commit

Permalink
Merge branch 'master' into esp32/test-event-trigger-enable-key
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 authored Sep 30, 2022
2 parents 5e52b12 + a334714 commit fbb53bc
Show file tree
Hide file tree
Showing 233 changed files with 3,220 additions and 214 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
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.
5 changes: 4 additions & 1 deletion examples/all-clusters-app/nxp/mw320/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ mw320_sdk("sdk") {
"include/FreeRTOSConfig.h",
]

defines = []
defines = [ "CHIP_CONFIG_MAX_FABRICS=5" ]

if (is_debug) {
defines += [ "BUILD_RELEASE=0" ]
} else {
defines += [ "BUILD_RELEASE=1" ]
}
if (wifi_conn_abort_support == true) {
defines += [ "WIFI_CONN_ABORT_SUPPORT" ]
}
}

mw320_executable("shell_mw320") {
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/nxp/mw320/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Building the example application is quite straightforward. It can be done via
following commands:

```
$ cd examples/all-clusters-app/nxp/mw320/
$ git submodule update --init
$ source third_party/connectedhomeip/scripts/activate.sh
$ gn gen out/debug
Expand All @@ -56,7 +57,7 @@ Note: This solution is temporary.
In order to use the tinycrypt ecc operations, use the following build arguments:

```
$ gn gen out/debug --args='treat_warnings_as_errors=false mbedtls_repo="//third_party/connectedhomeip/third_party/nxp/libs/mbedtls" mbedtls_use_tinycrypt=true'
$ gn gen out/debug --args='treat_warnings_as_errors=false mbedtls_repo="//third_party/connectedhomeip/third_party/nxp/libs/mbedtls" chip_crypto="tinycrypt"'
```

<a name="flashdebug"></a>
Expand Down
47 changes: 47 additions & 0 deletions examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,49 @@

#endif // BUILD_RELEASE

#if (defined(CONFIG_CHIP_MW320_REAL_FACTORY_DATA) && (CONFIG_CHIP_MW320_REAL_FACTORY_DATA == 1))

// VID/PID for product => will be used by Basic Information Cluster
#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA220

// set it to 0 for the moment
#define CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER 0

#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION
//-> format_version = 1
//-> vendor_id = 0x1037
//-> product_id_array = [ 0xA220 ]
//-> device_type_id = 0x0015
//-> certificate_id = "ZIG20142ZB330003-24"
//-> security_level = 0
//-> security_information = 0
//-> version_number = 0x2694
//-> certification_type = 1
//-> dac_origin_vendor_id is not present
//-> dac_origin_product_id is not present
#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \
{ \
0x30, 0x81, 0xe7, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xd9, 0x30, 0x81, 0xd6, \
0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \
0x43, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x36, 0x04, 0x34, 0x15, 0x24, 0x00, \
0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x20, 0xa2, 0x18, 0x24, 0x03, 0x15, 0x2c, 0x04, 0x13, 0x5a, 0x49, \
0x47, 0x32, 0x30, 0x31, 0x34, 0x31, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x32, 0x34, 0x24, 0x05, \
0x00, 0x24, 0x06, 0x00, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, 0x01, 0x03, 0x80, \
0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, 0xf3, \
0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, 0x08, \
0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x20, 0x11, 0x8c, 0x13, 0x63, 0x9a, \
0xe7, 0x77, 0xaa, 0xc1, 0x52, 0x8c, 0x46, 0x40, 0x82, 0xcc, 0xdb, 0x6c, 0x43, 0x4d, 0xfc, 0xff, 0xe2, 0x5e, 0x1f, \
0xda, 0xef, 0xdf, 0x0d, 0xf1, 0x7c, 0x2c, 0xcd, 0x02, 0x21, 0x00, 0xbf, 0xad, 0x91, 0xc3, 0x3b, 0xf5, 0xb9, 0x89, \
0x2e, 0x5e, 0x15, 0x3c, 0x52, 0x61, 0xad, 0xb8, 0x53, 0x42, 0x46, 0xc6, 0x7d, 0xec, 0xc0, 0x93, 0x10, 0x1f, 0xc4, \
0xd2, 0xc3, 0x8a, 0xd5, 0x16, \
}

// All remaining data will be pulled from the provisioning region of flash.
#endif

#else // CONFIG_CHIP_MW320_REAL_FACTORY_DATA

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand All @@ -85,6 +128,8 @@
*/
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8001

#endif // CONFIG_CHIP_MW320_REAL_FACTORY_DATA

/**
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION
*
Expand Down Expand Up @@ -163,3 +208,5 @@
#else
#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug
#endif // BUILD_RELEASE

#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1
Loading

0 comments on commit fbb53bc

Please sign in to comment.