Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32: Enable extended discovery feature. #10523

Merged
merged 1 commit into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,18 @@ menu "CHIP Device Layer"
help
The size (in bytes) of the service directory cache. This limits the maximum size of the directory
that can be returned in response to a service directory query.

config ENABLE_EXTENDED_DISCOVERY
bool "Enable Extended discovery Support"
default n
help
Enables support for Extended Discovery.

config ENABLE_COMMISSIONABLE_DEVICE_TYPE
bool "Enable Device type in commissionable node discovery."
default n
help
Enables or Disables the support for Commissionable Device Type.

endmenu

Expand Down Expand Up @@ -409,6 +421,12 @@ menu "CHIP Device Layer"
help
A string identifying the firmware revision running on the device.

config DEVICE_TYPE
int "Default Device type"
default 0
help
The default device type.

endmenu

menu "WiFi Station Options"
Expand Down
2 changes: 1 addition & 1 deletion src/include/platform/ConfigurationManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ inline void ConfigurationManager::LogDeviceConfig()
*/
inline bool ConfigurationManager::IsCommissionableDeviceTypeEnabled()
{
return static_cast<ImplClass *>(this)->_IsCommissionableDeviceNameEnabled();
return static_cast<ImplClass *>(this)->_IsCommissionableDeviceTypeEnabled();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,11 @@ bool GenericConfigurationManagerImpl<ImplClass>::_IsFullyProvisioned()
template <class ImplClass>
bool GenericConfigurationManagerImpl<ImplClass>::_IsCommissionableDeviceTypeEnabled()
{
return CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE == 1;
#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE
return true;
#else
return false;
#endif
}

template <class ImplClass>
Expand Down
3 changes: 3 additions & 0 deletions src/platform/ESP32/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE CONFIG_MAX_EVENT_QUEUE_SIZE
#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID CONFIG_DEVICE_VENDOR_ID
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID CONFIG_DEVICE_PRODUCT_ID
#define CHIP_DEVICE_CONFIG_DEVICE_TYPE CONFIG_DEVICE_TYPE
#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION
#define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING CONFIG_DEVICE_FIRMWARE_REVISION

Expand All @@ -62,6 +63,8 @@
#endif // CONFIG_IDF_TARGET_ESP32H2

#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_ENABLE_CHIPOBLE
#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY CONFIG_ENABLE_EXTENDED_DISCOVERY
#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE
#define CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX CONFIG_BLE_DEVICE_NAME_PREFIX
#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN
#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX
Expand Down