Skip to content

fix(config): switch zigbee region lookup to cpe.zigbee.region_code#214

Open
NaeemKK wants to merge 3 commits into
rdkcentral:mainfrom
NaeemKK:switch-region-property
Open

fix(config): switch zigbee region lookup to cpe.zigbee.region_code#214
NaeemKK wants to merge 3 commits into
rdkcentral:mainfrom
NaeemKK:switch-region-property

Conversation

@NaeemKK
Copy link
Copy Markdown
Contributor

@NaeemKK NaeemKK commented May 1, 2026

Replace legacy country_code key with cpe.zigbee.region_code and update zigbee subsystem lookup to the new property.

Refs: XHCPE-2544

Comment thread core/src/devicePrivateProperties.h Outdated
@NaeemKK NaeemKK force-pushed the switch-region-property branch from 5b785b6 to e993e8b Compare May 1, 2026 13:25
Comment thread core/src/subsystems/zigbee/zigbeeSubsystem.c Outdated
Refs: XHCPE-2544
Signed-off-by: Naeem Khan <naeem_khan@comcast.com>
@NaeemKK NaeemKK force-pushed the switch-region-property branch from e993e8b to 5769faf Compare May 4, 2026 15:22
@tleacmcsa
Copy link
Copy Markdown
Contributor

looks good. update the branch and take out of draft and ill be good with it.

@NaeemKK NaeemKK marked this pull request as ready for review May 8, 2026 18:08
Copilot AI review requested due to automatic review settings May 8, 2026 18:08
@NaeemKK NaeemKK requested a review from rchowdcmcsa as a code owner May 8, 2026 18:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +796 to +797
scoped_generic char *region =
b_core_property_provider_get_property_as_string(propertyProvider, CPE_ZIGBEE_REGION_CODE, NULL);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

@NaeemKK NaeemKK marked this pull request as draft May 14, 2026 18:00
Signed-off-by: Naeem Khan <naeem_khan@comcast.com>
@NaeemKK NaeemKK marked this pull request as ready for review May 29, 2026 16:23
Copilot AI review requested due to automatic review settings May 29, 2026 16:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment on lines +796 to +797
scoped_generic char *region =
b_core_property_provider_get_property_as_string(propertyProvider, CPE_ZIGBEE_REGION_CODE, NULL);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +796 to +797
scoped_generic char *region =
b_core_property_provider_get_property_as_string(propertyProvider, CPE_ZIGBEE_REGION_CODE, NULL);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants