-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added generation of unique identifiers #59
base: master
Are you sure you want to change the base?
Conversation
Currently there are several problems related to the unique ids: * There is no support for getting and storing unique id attribute from Basic cluster * There is no support for getting unique id for rotating device id calculation purpose. That unique id is different one from the Basic cluster unique id and is utilized as an input key for rotating device id generation algorithm * Rotating device id is generated using serial number what is not compliant with the spec (it should be unique id) * Added methods to get and store unique id utilized in Basic cluster * For all platforms added generic method generating random unique id utilized in Basic cluster * Added GetRotatingDeviceIdUniqueId method for getting unique id utilized by rotating device id * Replaced using serial number with unique id for generating rotating device id. * Disabled CONFIG_FPU for nrfconnect platform, as it turned out to lead to MPU_FAULT and system crash on BLE C3 characteristic read
ReturnErrorOnFailure(chip::DeviceLayer::ConfigurationMgr().GetLifetimeCounter(lifetimeCounter)); | ||
return AdditionalDataPayloadGenerator().generateRotatingDeviceIdAsHexString( | ||
lifetimeCounter, serialNumber, strlen(serialNumber), rotatingDeviceIdHexBuffer, rotatingDeviceIdHexBufferSize, | ||
rotatingDeviceIdValueOutputSize); | ||
lifetimeCounter, reinterpret_cast<char *>(rotatingDeviceIdUniqueId), rotatingDeviceIdUniqueIdSize, |
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.
Is there a need for generateRotatingDeviceIdAsHexString
to take const char* rather than
const uint8_t*` now? Maybe those casts could be removed?
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.
Do you mean changing generateRotatingDeviceIdAsHexString
API?
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.
Yes
size_t bufSize) | ||
{ | ||
#ifdef CHIP_DEVICE_CONFIG_TEST_ROTATING_DEVICE_ID_UNIQUE_ID | ||
uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_TEST_ROTATING_DEVICE_ID_UNIQUE_ID; |
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.
uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_TEST_ROTATING_DEVICE_ID_UNIQUE_ID; | |
uint8_t uniqueId[kRotatingDeviceIDUniqueIDLength] = CHIP_DEVICE_CONFIG_TEST_ROTATING_DEVICE_ID_UNIQUE_ID; |
And you can remove one of the checks below.
[nrfconnect] matter-wifi: add Wi-Fi network scan functionality Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
…vice (project-chip#24378) * [Telink] Moved LightingManager into PWMDevice * Restyled by clang-format * [Telink] Adding lighting color feature (#59) * [Telink] Added lighting color feature * [Telink] Added tlsr9518adk80d.overlay to lighting-app * [Telink] Updated RGB functionality * [Telink] Updated RGB PWM pins Co-authored-by: Alex Tsitsiura <s07641069@gmail.com> * Restyled by whitespace * Restyled by clang-format * [Telink] Minor changes * [Telink] Add 'telink reboot' shell CLI command (#63) * [Telink] Restyled Co-authored-by: Serhii Salamakha <serhii.salamakha@gmail.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Dmytro Huz <75682372+interfer@users.noreply.github.com>
* [Telink] Moved LightingManager into PWMDevice * Restyled by clang-format * [Telink] Adding lighting color feature (#59) * [Telink] Added lighting color feature * [Telink] Added tlsr9518adk80d.overlay to lighting-app * [Telink] Updated RGB functionality * [Telink] Updated RGB PWM pins Co-authored-by: Alex Tsitsiura <s07641069@gmail.com> * Restyled by whitespace * Restyled by clang-format * [Telink] Minor changes * [Telink] Add 'telink reboot' shell CLI command (#63) * [Telink] Restyled * [Telink] Update Telink Docker image (Zephyr update) Co-authored-by: Serhii Salamakha <serhii.salamakha@gmail.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Dmytro Huz <75682372+interfer@users.noreply.github.com>
* [Telink] Introduce power management (#72) * [Telink] Moved LightingManager into PWMDevice * [Telink] Enabled PM for Light Switch example * [Telink] Added OpenThread power management support * [Telink] Configured project for the lowest power consumption * [Telink] Restyle * [Telink] Adapt system status LED and buttons with Power Mode usage * [Telink] Fixed factory reset in pool mode of button manager * [Telink] Updated Factory Reset trigger * Restyled by clang-format * [Telink] Adding lighting color feature (#59) * [Telink] Added lighting color feature * [Telink] Added tlsr9518adk80d.overlay to lighting-app * [Telink] Updated RGB functionality * [Telink] Updated RGB PWM pins Co-authored-by: Alex Tsitsiura <s07641069@gmail.com> * Restyled by whitespace * Restyled by clang-format * [Telink] Minor changes * [Telink] Add 'telink reboot' shell CLI command (#63) * [Telink] Restyled * [Telink] Enable CHIP SED support * [Telink] Update new configs name/location * [Telink] restyle * [Telink] Add PM to all apps * [Telink] set default configs * [Telink] Revert EOL * [Telink] Revert EOL --------- Co-authored-by: Serhii Salamakha <serhii.salamakha@gmail.com> Co-authored-by: Misha.Tkachenko <mishadesh@gmail.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Dmytro Huz <75682372+interfer@users.noreply.github.com> * [Telink] Copyright update * [Telink] Fix builds after merge of master * [Telink] Review fixes * [Telink] Custom RF power values example * [Telink] Remove Level Control cluster from binding * [Telink] Add CONFIG_MATTER_LOG_LEVEL --------- Co-authored-by: Serhii Salamakha <serhii.salamakha@gmail.com> Co-authored-by: Misha.Tkachenko <mishadesh@gmail.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Dmytro Huz <75682372+interfer@users.noreply.github.com>
Problem
Currently there are several problems related to the unique ids:
the Basic cluster unique id and is utilized as an input key for rotating device id generation algorithm
Change overview
GetRotatingDeviceIdUniqueId
method for getting unique id utilized by rotating device idTesting