Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jczhang777 authored Sep 2, 2022
2 parents cdac1be + e56afce commit c45778e
Show file tree
Hide file tree
Showing 288 changed files with 8,844 additions and 8,323 deletions.
4 changes: 2 additions & 2 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ staleLabel: stale

pulls:
# Number of days of inactivity before a pull request becomes stale
daysUntilStale: 7
daysUntilStale: 60

# Number of days of inactivity before a stale pull request is closed
daysUntilClose: 7
daysUntilClose: 30

# Comment to post when marking a pull request as stale. Set to `false` to disable
markComment: >
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,19 @@ jobs:
path: /tmp/cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() && !env.ACT }}
with:
name: crash-objdir-linux-gcc-debug
path: out/
# objdirs are big; don't hold on to them too long.
retention-days: 5
# OBJDIR on linux is > 10K files and takes more than 50 minutes to upload, usually
# having the job timeout.
#
# If re-enabling, some subset of this should be picked
#
# - name: Uploading objdir for debugging
# uses: actions/upload-artifact@v2
# if: ${{ failure() && !env.ACT }}
# with:
# name: crash-objdir-linux-gcc-debug
# path: out/
# # objdirs are big; don't hold on to them too long.
# retention-days: 5
build_linux:
name: Build on Linux (fake, gcc_release, clang, simulated)
timeout-minutes: 150
Expand Down Expand Up @@ -240,7 +245,7 @@ jobs:
# Cores are big; don't hold on to them too long.
retention-days: 5
# OBJDIR on linux is > 10K files and takes more than 50 minutes to upload, usually
# having the job timeout.
# having the job timeout.
#
# If re-enabling, some subset of this should be picked
#
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ jobs:
container:
image: connectedhomeip/chip-build:0.5.91
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0"

steps:
- name: Checkout
Expand Down Expand Up @@ -273,19 +273,18 @@ jobs:
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-python-bindings \
build \
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 40
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
# the below tests are broken, enable them when they are fixed. Suspect hermetic issues for now
# scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_RR_1_1.py" --script-args "--commissioning-method on-network --discriminator 1234 --passcode 20202021"'
# scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_SC_3_6.py" --script-args "--commissioning-method on-network --discriminator 1234 --passcode 20202021"'
# scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_DA_1_7.py"'
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_RR_1_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_SC_3_6.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_DA_1_7.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"'
- name: Uploading core files
uses: actions/upload-artifact@v2
if: ${{ failure() && !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zap_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
npm rebuild canvas --update-binary
npm run build-spa
- name: Generate all
timeout-minutes: 30
timeout-minutes: 45
run: scripts/tools/zap_regen_all.py
- name: Check for uncommited changes
run: |
Expand Down
12 changes: 12 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ macro(chip_gn_arg_bool arg boolean)
endif()
endmacro()

# ESP-IDF lets user set software version string by two ways:
# 1. Project's CMakeLists.txt file and 2. Config option
# It depends on CONFIG_APP_PROJECT_VER_FROM_CONFIG option
# So, below makes the same provision for software version number
if (CONFIG_APP_PROJECT_VER_FROM_CONFIG)
chip_gn_arg_append("chip_config_software_version_number" ${CONFIG_DEVICE_SOFTWARE_VERSION_NUMBER})
elseif (DEFINED PROJECT_VER_NUMBER)
chip_gn_arg_append("chip_config_software_version_number" ${PROJECT_VER_NUMBER})
else()
chip_gn_arg_append("chip_config_software_version_number" 0)
endif()

chip_gn_arg_append("esp32_ar" "\"${CMAKE_AR}\"")
chip_gn_arg_append("esp32_cc" "\"${CMAKE_C_COMPILER}\"")
chip_gn_arg_append("esp32_cxx" "\"${CMAKE_CXX_COMPILER}\"")
Expand Down
8 changes: 1 addition & 7 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,9 @@ menu "CHIP Device Layer"
This is a default value which is used when a hardware version has not been stored in device
persistent storage (e.g. by a factory provisioning process).

config DEVICE_SOFTWARE_VERSION
string "Device Software Version String"
default "v1.0"
help
A string identifying the software version running on the device.

config DEVICE_SOFTWARE_VERSION_NUMBER
int "Device Software Version Number"
default 1
default 0
help
Software version number running on the device.

Expand Down
11 changes: 4 additions & 7 deletions docs/guides/simulated_device_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,12 @@ interact with it using chip-tool
1. Follow the instruction to build chip-tool in the
[chip-tool readme](../../examples/chip-tool).
2. Run this command to initiate the pairing.
2. Run this command to commission.
```
./out/debug/standalone/chip-tool pairing ethernet 0x654321 20202021 3842 [IP ADDRESS of App] 5542
./out/debug/standalone/chip-tool pairing code 0x654321 MT:-24J0AFN00KA0648G00
```
3. Run this command to complete the commissioning.
```
./out/debug/standalone/chip-tool generalcommissioning commissioning-complete 0x654321 0
```
4. Most tests will start at this point and now an send cluster commands with
or whatever is listed on the "SetupQRCode:" line in the log output.
3. Most tests will start at this point and now an send cluster commands with
chip-tool as follow.
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,7 @@ server cluster ColorControl = 768 {
readonly attribute int16u currentY = 4;
readonly attribute enum8 driftCompensation = 5;
readonly attribute char_string<254> compensationText = 6;
readonly attribute int16u colorTemperature = 7;
readonly attribute int16u colorTemperatureMireds = 7;
readonly attribute enum8 colorMode = 8;
attribute bitmap8 options = 15;
readonly attribute nullable int8u numberOfPrimaries = 16;
Expand Down Expand Up @@ -4489,7 +4489,7 @@ endpoint 1 {
ram attribute currentY default = 0x607D;
ram attribute driftCompensation;
ram attribute compensationText;
ram attribute colorTemperature default = 0x00FA;
ram attribute colorTemperatureMireds default = 0x00FA;
ram attribute colorMode default = 0x01;
ram attribute options;
ram attribute numberOfPrimaries;
Expand Down
23 changes: 11 additions & 12 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
}
],
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data with some extensions"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
}
],
"endpointTypes": [
Expand Down Expand Up @@ -5459,7 +5459,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int8u",
"type": "CommissioningWindowStatus",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down Expand Up @@ -6869,7 +6869,7 @@
"reportableChange": 0
},
{
"name": "ColorTemperature",
"name": "ColorTemperatureMireds",
"code": 7,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -15721,7 +15721,7 @@
"reportableChange": 0
},
{
"name": "ColorTemperature",
"name": "ColorTemperatureMireds",
"code": 7,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -23403,7 +23403,7 @@
"reportableChange": 0
},
{
"name": "ColorTemperature",
"name": "ColorTemperatureMireds",
"code": 7,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -24724,6 +24724,5 @@
"endpointVersion": 1,
"deviceIdentifier": 61442
}
],
"log": []
]
}
6 changes: 3 additions & 3 deletions examples/all-clusters-app/cc13x2x7_26x2x7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Short presses (less than 1000ms) of the user buttons are used currently unused
in the all-clusters application, but stubs are provided.

Long presses (greater than 1000ms) of the user buttons are used for controlling
BLE advertisements. The left button (`BTN-1`) is used to disable advertisements
if they are enabled. The Right button (`BTN-2`) is used to enable
advertisements.
BLE advertisements and resets. The left button (`BTN-1`) is used to perform a
factory reset of the device. The Right button (`BTN-2`) is used to disable BLE
advertisements (if enabled) or enable advertisements (if disabled).

## Building

Expand Down
15 changes: 8 additions & 7 deletions examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent)
}
else if (AppEvent::kAppEventButtonType_LongClicked == aEvent->ButtonEvent.Type)
{
// Disable BLE advertisements
if (ConnectivityMgr().IsBLEAdvertisingEnabled())
{
ConnectivityMgr().SetBLEAdvertisingEnabled(false);
PLAT_LOG("Disabled BLE Advertisements");
}
chip::Server::GetInstance().ScheduleFactoryReset();
}
break;

Expand All @@ -367,13 +362,19 @@ void AppTask::DispatchEvent(AppEvent * aEvent)
{
if (Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() == CHIP_NO_ERROR)
{
PLAT_LOG("Enabled BLE Advertisement");
PLAT_LOG("Enabled BLE Advertisements");
}
else
{
PLAT_LOG("OpenBasicCommissioningWindow() failed");
}
}
else
{
// Disable BLE advertisements
ConnectivityMgr().SetBLEAdvertisingEnabled(false);
PLAT_LOG("Disabled BLE Advertisements");
}
}
break;

Expand Down
4 changes: 4 additions & 0 deletions examples/all-clusters-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)

set(PROJECT_VER "v1.0")
set(PROJECT_VER_NUMBER 1)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cmake/idf_flashing.cmake)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 77,
"featureLevel": 80,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -4673,7 +4673,7 @@
"reportableChange": 0
},
{
"name": "delay",
"name": "Delay",
"code": 58,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -4705,7 +4705,7 @@
"reportableChange": 0
},
{
"name": "ChannelMask",
"name": "ChannelPage0Mask",
"code": 60,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -5459,7 +5459,7 @@
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int8u",
"type": "CommissioningWindowStatus",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down Expand Up @@ -6869,7 +6869,7 @@
"reportableChange": 0
},
{
"name": "ColorTemperature",
"name": "ColorTemperatureMireds",
"code": 7,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -15427,7 +15427,7 @@
"reportableChange": 0
},
{
"name": "ColorTemperature",
"name": "ColorTemperatureMireds",
"code": 7,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -23195,7 +23195,7 @@
"reportableChange": 0
},
{
"name": "ColorTemperature",
"name": "ColorTemperatureMireds",
"code": 7,
"mfgCode": null,
"side": "server",
Expand Down
6 changes: 3 additions & 3 deletions examples/all-clusters-minimal-app/cc13x2x7_26x2x7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Short presses (less than 1000ms) of the user buttons are used currently unused
in the all-clusters application, but stubs are provided.

Long presses (greater than 1000ms) of the user buttons are used for controlling
BLE advertisements. The left button (`BTN-1`) is used to disable advertisements
if they are enabled. The Right button (`BTN-2`) is used to enable
advertisements.
BLE advertisements and resets. The left button (`BTN-1`) is used to perform a
factory reset of the device. The Right button (`BTN-2`) is used to disable BLE
advertisements (if enabled) or enable advertisements (if disabled).

## Building

Expand Down
Loading

0 comments on commit c45778e

Please sign in to comment.