Skip to content

Commit

Permalink
ESP32: Enable extended advertising feature. (#10523)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweetymhaiske authored and pull[bot] committed Jan 6, 2022
1 parent 6bab464 commit 1415406
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
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

0 comments on commit 1415406

Please sign in to comment.