Skip to content

Commit 1415406

Browse files
sweetymhaiskepull[bot]
authored andcommitted
ESP32: Enable extended advertising feature. (#10523)
1 parent 6bab464 commit 1415406

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

config/esp32/components/chip/Kconfig

+18
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,18 @@ menu "CHIP Device Layer"
367367
help
368368
The size (in bytes) of the service directory cache. This limits the maximum size of the directory
369369
that can be returned in response to a service directory query.
370+
371+
config ENABLE_EXTENDED_DISCOVERY
372+
bool "Enable Extended discovery Support"
373+
default n
374+
help
375+
Enables support for Extended Discovery.
376+
377+
config ENABLE_COMMISSIONABLE_DEVICE_TYPE
378+
bool "Enable Device type in commissionable node discovery."
379+
default n
380+
help
381+
Enables or Disables the support for Commissionable Device Type.
370382

371383
endmenu
372384

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

424+
config DEVICE_TYPE
425+
int "Default Device type"
426+
default 0
427+
help
428+
The default device type.
429+
412430
endmenu
413431

414432
menu "WiFi Station Options"

src/include/platform/ConfigurationManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ inline void ConfigurationManager::LogDeviceConfig()
415415
*/
416416
inline bool ConfigurationManager::IsCommissionableDeviceTypeEnabled()
417417
{
418-
return static_cast<ImplClass *>(this)->_IsCommissionableDeviceNameEnabled();
418+
return static_cast<ImplClass *>(this)->_IsCommissionableDeviceTypeEnabled();
419419
}
420420

421421
/**

src/include/platform/internal/GenericConfigurationManagerImpl.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,11 @@ bool GenericConfigurationManagerImpl<ImplClass>::_IsFullyProvisioned()
403403
template <class ImplClass>
404404
bool GenericConfigurationManagerImpl<ImplClass>::_IsCommissionableDeviceTypeEnabled()
405405
{
406-
return CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE == 1;
406+
#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE
407+
return true;
408+
#else
409+
return false;
410+
#endif
407411
}
408412

409413
template <class ImplClass>

src/platform/ESP32/CHIPDevicePlatformConfig.h

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE CONFIG_MAX_EVENT_QUEUE_SIZE
4040
#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID CONFIG_DEVICE_VENDOR_ID
4141
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID CONFIG_DEVICE_PRODUCT_ID
42+
#define CHIP_DEVICE_CONFIG_DEVICE_TYPE CONFIG_DEVICE_TYPE
4243
#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION
4344
#define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING CONFIG_DEVICE_FIRMWARE_REVISION
4445

@@ -62,6 +63,8 @@
6263
#endif // CONFIG_IDF_TARGET_ESP32H2
6364

6465
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_ENABLE_CHIPOBLE
66+
#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY CONFIG_ENABLE_EXTENDED_DISCOVERY
67+
#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE
6568
#define CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX CONFIG_BLE_DEVICE_NAME_PREFIX
6669
#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN
6770
#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX

0 commit comments

Comments
 (0)