-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[v1.2-branch][ESP32][cherry-pick]Cherry pick some necessary fixes for v1.2-branch #33161
Merged
andy31415
merged 13 commits into
project-chip:v1.2-branch
from
Jerry-ESP:esp32/add-some-cherry-pick
Apr 26, 2024
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cd8138f
[1.1] Cherry pick Thread DNS client and memory leak fixes (#31457)
Damian-Nordic 2838352
ESP32: Add EndpointQueueFilter for ESP32 platform (#31440)
wqx6 73f04c5
[ESP32] Limit number of returned WiFi scan results to configured limi…
shubhamdp 3596eef
[ESP32] Fix the threading issue in nimble (#29180)
shubhamdp 917c693
IM: Create ReadHandler after Session Establishment for Subscription R…
wqx6 5a0a40a
[ESP32] Fix adding NDEBUG flag to CPPFLAGS (#30763)
shubhamdp c438217
Add records of session establishment for subscription resumption (#31…
wqx6 162a779
ESP32: check ap info in IsStationConnected (#31438)
wqx6 28ea1c4
Add checks for mOTInst in GenericThreadStackManagerImpl_OpenThread (#…
wqx6 cb9f02f
[ESP32] Fix few attributes with fixed quality in DeviceInfoProvider (…
shubhamdp b80b867
Implement BLE Manager Shutdown for nimble host (#33109)
shubhamdp dc2bc7a
[ESP32] Made a provision to generate esp_secure_cert partition in fa…
shripad621git 9b559cb
Added the support for onboarding paylaod in factory script (#31274)
shripad621git File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
## Providers Implemented for ESP32 Platform | ||
|
||
The ESP32 platform has implemented several providers that can be used with data | ||
stored in the factory or by setting fixed data. | ||
|
||
Below are the providers that have been implemented: | ||
|
||
- [Commissionable Data Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32FactoryDataProvider.h#L47) | ||
This provider reads the discriminator and setup pincode related parameters | ||
from the factory partition. | ||
- [Device Attestation Credentials Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32FactoryDataProvider.h#L56) | ||
This provider manages the attestation data. | ||
- [Device Instance Info Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32FactoryDataProvider.h#L86) | ||
This provider reads basic device information from the factory partition. | ||
- [Device Info Provider](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32DeviceInfoProvider.h#L31) | ||
This provider provides fixed labels, supported calendar types, and supported | ||
locales from the factory partition. | ||
- [Supported Modes](https://github.com/project-chip/connectedhomeip/blob/master/examples/platform/esp32/mode-support/static-supported-modes-manager.h#L28) | ||
This provider offers the supported modes for the mode-select cluster. | ||
|
||
More information can be found in the [factory data guide](factory_data.md). | ||
|
||
### Device Info Provider | ||
|
||
Currently, there are two implementations for this provider: | ||
|
||
1. [Reads data stored in the factory partition](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ESP32FactoryDataProvider.h#L56) | ||
_(This will be deprecated in the future)_ | ||
2. [Provides APIs to set fixed data that gets read later](https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/StaticESP32DeviceInfoProvider.h) | ||
|
||
- New products should use the `StaticESP32DeviceInfoProvider`. Utilize the | ||
`Set...()` APIs to set the fixed data. | ||
- Existing products using the first implementation can continue to use it if | ||
they do not wish to change the data. | ||
- For products using the first implementation and wanting to change the fixed | ||
data via OTA, they should switch to the second implementation in the OTA | ||
image and use the `Set...()` APIs to set the fixed data. | ||
|
||
#### Example: | ||
|
||
```cpp | ||
#include <platform/ESP32/StaticESP32FactoryDataProvider.h> | ||
|
||
DeviceLayer::StaticESP32DeviceInfoProvider deviceInfoProvider; | ||
|
||
// Define array for Supported Calendar Types | ||
using namespace chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum; | ||
CalendarTypeEnum supportedCalendarTypes[] = { | ||
CalendarTypeEnum::kGregorian, CalendarTypeEnum::kCoptic, | ||
CalendarTypeEnum::kEthiopian, CalendarTypeEnum::kChinese, | ||
}; | ||
|
||
// Define array for Supported Locales | ||
const char* supportedLocales[] = { | ||
"en-US", | ||
"en-EU", | ||
}; | ||
|
||
// Define array for Fixed labels { EndpointId, Label, Value } | ||
struct StaticESP32DeviceInfoProvider::FixedLabelEntry fixedLabels[] = { | ||
{ 0, "Room", "Bedroom 2" }, | ||
{ 0, "Orientation", "North" }, | ||
{ 0, "Direction", "Up" }, | ||
}; | ||
|
||
Span<CalendarTypeEnum> sSupportedCalendarTypes(supportedCalendarTypes); | ||
Span<const char*> sSupportedLocales(supportedLocales); | ||
Span<StaticESP32DeviceInfoProvider::FixedLabelEntry> sFixedLabels(fixedLabels); | ||
|
||
{ | ||
deviceInfoProvider.SetSupportedLocales(sSupportedLocales); | ||
deviceInfoProvider.SetSupportedCalendarTypes(sSupportedCalendarTypes); | ||
deviceInfoProvider.SetFixedLabels(sFixedLabels); | ||
DeviceLayer::SetDeviceInfoProvider(&deviceInfoProvider); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thse seem to fail .... are these supposed to be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I will create another PR to fix this issue