Skip to content

Commit

Permalink
Merge branch 'master' into bug/fix13396
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Feb 9, 2022
2 parents 539b1d1 + 90c8884 commit aa8077b
Show file tree
Hide file tree
Showing 198 changed files with 7,074 additions and 7,341 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/examples-linux-imx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (c) 2022 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build example - i.MX Linux

on:
push:
pull_request:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

jobs:
imx:
name: Linux i.MX Build
timeout-minutes: 70

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-imx:0.5.52

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Build App
timeout-minutes: 10
run: |
./scripts/examples/imxlinux_example.sh \
examples/lighting-app/linux/ examples/lighting-app/linux/out/aarch64
- name: Build chip-tool
timeout-minutes: 10
run: |
./scripts/examples/imxlinux_example.sh \
examples/chip-tool examples/chip-tool/out/aarch64
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,6 @@
[submodule "perfetto"]
path = third_party/perfetto/repo
url = https://github.com/google/perfetto
[submodule "p6/serial-flash"]
path = third_party/p6/p6_sdk/libs/serial-flash
url = https://github.com/Infineon/serial-flash
823 changes: 0 additions & 823 deletions Matter - Multi Fabric Commissioning.ipynb

This file was deleted.

1,139 changes: 0 additions & 1,139 deletions Matter - REPL Basics.ipynb

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
![Examples - Linux Standalone](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20Linux%20Standalone/badge.svg)
![Examples - ESP32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20ESP32/badge.svg)
![Examples - K32W with SE051](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20K32W%20with%20SE051/badge.svg)
![Examples - i.MX Linux](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20i.MX%20Linux/badge.svg)

![Android](https://github.com/project-chip/connectedhomeip/workflows/Android/badge.svg)

Expand Down
10 changes: 10 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ menu "CHIP Core"
A Binding object is used to configure how the local device communicates with
a remote entity, be it a cloud service, a mobile application, or another device.

config MAX_FABRICS
int "Max Fabrics"
range 5 255
default 5
help
The maxinum number of fabrics the device can participate in.

Each fabric can provision the device with its unique operational credentials and
manage its own access control lists.

config MAX_PEER_NODES
int "Max Peer Nodes"
range 0 65535
Expand Down
1 change: 1 addition & 0 deletions config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ config CHIP_OTA_REQUESTOR_BUFFER_SIZE
# See config/zephyr/Kconfig for full definition
config CHIP_OTA_IMAGE_BUILD
bool
default y if CHIP_OTA_REQUESTOR
depends on SIGN_IMAGES
36 changes: 36 additions & 0 deletions docs/guides/troubleshooting_avahi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Troubleshooting Avahi

## Resetting the cache

Avahi keeps a cache of old results. To reset the cache, kill the daemon. It will
auto-restart.

`sudo avahi-daemon --kill`

## Stopping the daemon

If you really want to stop the daemon, killing it is not sufficient because it
will just restart. To stop it completely:

```
sudo systemctl mask avahi-daemon.socket
sudo systemctl disable avahi-daemon
sudo systemctl stop avahi-daemon
```

## Problem: Failed to create avahi group: Not permitted

Avahi is not set up to publish records by default. This has to be explicitly
allowed in the config file. In /etc/avahi/avahi-daemon.conf, add the following
lines:

```
[publish]
disable-user-service-publishing=no
```

Then restart the daemon

```
sudo systemctl restart avahi
```
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,24 @@ server cluster BinaryInputBasic = 15 {
}

server cluster Binding = 30 {
struct BindingEntry {
readonly global attribute int16u clusterRevision = 65533;

request struct BindRequest {
NODE_ID nodeId = 0;
GROUP_ID groupId = 1;
ENDPOINT_NO endpointId = 2;
CLUSTER_ID clusterId = 3;
}

attribute BindingEntry bindingList[] = 0;
readonly global attribute int16u clusterRevision = 65533;
request struct UnbindRequest {
NODE_ID nodeId = 0;
GROUP_ID groupId = 1;
ENDPOINT_NO endpointId = 2;
CLUSTER_ID clusterId = 3;
}

command Bind(BindRequest): DefaultSuccess = 0;
command Unbind(UnbindRequest): DefaultSuccess = 1;
}

server cluster BooleanState = 69 {
Expand Down Expand Up @@ -380,9 +389,9 @@ server cluster Channel = 1284 {
struct ChannelInfo {
INT16U majorNumber = 0;
INT16U minorNumber = 1;
CHAR_STRING<32> name = 2;
CHAR_STRING<32> callSign = 3;
CHAR_STRING<32> affiliateCallSign = 4;
optional CHAR_STRING<32> name = 2;
optional CHAR_STRING<32> callSign = 3;
optional CHAR_STRING<32> affiliateCallSign = 4;
}

readonly attribute ChannelInfo channelList[] = 0;
Expand Down Expand Up @@ -719,7 +728,7 @@ server cluster ContentLauncher = 1290 {
struct Parameter {
ParameterEnum type = 0;
CHAR_STRING value = 1;
AdditionalInfo externalIDList[] = 2;
optional AdditionalInfo externalIDList[] = 2;
}

struct AdditionalInfo {
Expand All @@ -729,17 +738,17 @@ server cluster ContentLauncher = 1290 {

struct BrandingInformation {
CHAR_STRING providerName = 0;
StyleInformation background = 1;
StyleInformation logo = 2;
StyleInformation progressBar = 3;
StyleInformation splash = 4;
StyleInformation waterMark = 5;
optional StyleInformation background = 1;
optional StyleInformation logo = 2;
optional StyleInformation progressBar = 3;
optional StyleInformation splash = 4;
optional StyleInformation waterMark = 5;
}

struct StyleInformation {
CHAR_STRING imageUrl = 0;
CHAR_STRING color = 1;
Dimension size = 2;
optional CHAR_STRING imageUrl = 0;
optional CHAR_STRING color = 1;
optional Dimension size = 2;
}

struct Dimension {
Expand Down Expand Up @@ -1985,11 +1994,11 @@ server cluster MediaPlayback = 1286 {
}

readonly attribute PlaybackStateEnum playbackState = 0;
readonly attribute epoch_us startTime = 1;
readonly attribute int64u duration = 2;
readonly attribute nullable epoch_us startTime = 1;
readonly attribute nullable int64u duration = 2;
readonly attribute single playbackSpeed = 4;
readonly attribute int64u seekRangeEnd = 5;
readonly attribute int64u seekRangeStart = 6;
readonly attribute nullable int64u seekRangeEnd = 5;
readonly attribute nullable int64u seekRangeStart = 6;
readonly global attribute int16u clusterRevision = 65533;
}

Expand Down
70 changes: 37 additions & 33 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,24 @@
"define": "BINDING_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"commands": [
{
"name": "Bind",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "Unbind",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
}
],
"attributes": [
{
"name": "ClusterRevision",
Expand Down Expand Up @@ -905,21 +922,6 @@
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "binding list",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
Expand Down Expand Up @@ -8704,7 +8706,24 @@
"define": "BINDING_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"commands": [
{
"name": "Bind",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "Unbind",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
}
],
"attributes": [
{
"name": "ClusterRevision",
Expand Down Expand Up @@ -8732,21 +8751,6 @@
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "binding list",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
Expand Down Expand Up @@ -21099,4 +21103,4 @@
"deviceIdentifier": 256
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class BridgedActionsAttrAccess : public AttributeAccessInterface
// Register for the Bridged Actions cluster on all endpoints.
BridgedActionsAttrAccess() : AttributeAccessInterface(Optional<EndpointId>::Missing(), BridgedActions::Id) {}

CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override;
CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override;

private:
static constexpr uint16_t ClusterRevision = 1;
Expand Down Expand Up @@ -75,8 +75,7 @@ CHIP_ERROR BridgedActionsAttrAccess::ReadClusterRevision(EndpointId endpoint, At

BridgedActionsAttrAccess gAttrAccess;

CHIP_ERROR BridgedActionsAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath,
AttributeValueEncoder & aEncoder)
CHIP_ERROR BridgedActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder)
{
VerifyOrDie(aPath.mClusterId == BridgedActions::Id);

Expand Down
6 changes: 6 additions & 0 deletions examples/all-clusters-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,12 @@ void SetupPretendDevices()
AddCluster("Humidity Sensor");
AddAttribute("MeasuredValue", "30");
app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(1, static_cast<int16_t>(30 * 100));

AddDevice("Light Sensor");
AddEndpoint("External");
AddCluster("Illuminance Measurement");
AddAttribute("MeasuredValue", "1000");
app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Set(1, static_cast<int16_t>(1000));
}

WiFiWidget pairingWindowLED;
Expand Down
Loading

0 comments on commit aa8077b

Please sign in to comment.