Skip to content

Commit

Permalink
Fix advertised device type for all-clusters-app to match data model. (p…
Browse files Browse the repository at this point in the history
…roject-chip#33715)

* Fix advertised device type for all-clusters-app to match data model.

We were claiming a device type of 0x0101 in the Descriptor DeviceTypeList on
endpoint 1, but claiming a device type of 0xFFFF (not even a valid value) via
DNS-SD advertising.  Align our advertising behavior with the data model values.

Fixes project-chip#33697

* Address review comment.
  • Loading branch information
bzbarsky-apple authored Jun 5, 2024
1 parent 24bbdf4 commit 0050994
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@
#define CHIP_CONFIG_MAX_PATHS_PER_INVOKE 5

#define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER 1

// Claim a device type while advertising that matches the device type on our
// endpoint 1. 0x0101 is the "Dimmable Light" device type.
#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 0x0101
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@
// All clusters app has 3 group endpoints. This needs to defined here so that
// CHIP_CONFIG_MAX_GROUPS_PER_FABRIC is properly configured.
#define CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC 3

// Claim a device type while advertising that matches the device type on our
// endpoint 1. 0x0101 is the "Dimmable Light" device type.
#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 0x0101
5 changes: 4 additions & 1 deletion src/app/tests/suites/TestDiscovery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ name: Test Discovery
config:
nodeId: 0x12344321
endpoint: 0
# These defaults correspond to the behavior of all-clusters-app, and
# different values should be passed on the command line when testing
# against any other server.
discriminator:
type: int16u
defaultValue: 3840
Expand All @@ -31,7 +34,7 @@ config:
defaultValue: 32769
deviceType:
type: int16u
defaultValue: 65535
defaultValue: 0x0101

tests:
- label: "Stop target device"
Expand Down

0 comments on commit 0050994

Please sign in to comment.