fix(config): switch zigbee region lookup to cpe.zigbee.region_code#214
fix(config): switch zigbee region lookup to cpe.zigbee.region_code#214NaeemKK wants to merge 3 commits into
Conversation
5b785b6 to
e993e8b
Compare
Refs: XHCPE-2544 Signed-off-by: Naeem Khan <naeem_khan@comcast.com>
e993e8b to
5769faf
Compare
|
looks good. update the branch and take out of draft and ill be good with it. |
There was a problem hiding this comment.
Pull request overview
This PR updates Zigbee network initialization to read the device’s regulatory region from the new cpe.zigbee.region_code property instead of the legacy country_code key (Refs: XHCPE-2544).
Changes:
- Replaced the legacy region property key constant with
CPE_ZIGBEE_REGION_CODE("cpe.zigbee.region_code"). - Updated Zigbee subsystem network initialization to read the region from
CPE_ZIGBEE_REGION_CODE.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| core/src/subsystems/zigbee/zigbeeSubsystem.c | Switches Zigbee region lookup to cpe.zigbee.region_code during network init. |
| core/src/devicePrivateProperties.h | Renames the region property constant to CPE_ZIGBEE_REGION_CODE with the new key string. |
| scoped_generic char *region = | ||
| b_core_property_provider_get_property_as_string(propertyProvider, CPE_ZIGBEE_REGION_CODE, NULL); |
Signed-off-by: Naeem Khan <naeem_khan@comcast.com>
| scoped_generic char *region = | ||
| b_core_property_provider_get_property_as_string(propertyProvider, CPE_ZIGBEE_REGION_CODE, NULL); |
There was a problem hiding this comment.
Yes, the intention is to avoid sending any value when the region is not defined, and let the client handle it appropriately. If the region is available, we’ll include it otherwise, we’ll leave it as NULL.
| scoped_generic char *region = | ||
| b_core_property_provider_get_property_as_string(propertyProvider, CPE_ZIGBEE_REGION_CODE, NULL); |
There was a problem hiding this comment.
I think it’s pretty straightforward. if it can retrieve a value using the property service library, it will set it; otherwise, it will just leave it as NULL.
Replace legacy country_code key with cpe.zigbee.region_code and update zigbee subsystem lookup to the new property.
Refs: XHCPE-2544