-
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
Renaming prior to the delivery of the work about "NFC Commissioning". #36801
base: master
Are you sure you want to change the base?
Renaming prior to the delivery of the work about "NFC Commissioning". #36801
Conversation
In current code, "NFC Commissioning" was used for Onboarding Payload data put into an NFC Tag. This naming will create confusion with the new "NFC Commissioning" feature where NFC is used as the commissioning channel. We propose to use the folllowing names: - "NFC onboarding payload" when an NFC Tag is used to store the onboarding payload data (as an alternate solution to QRCode) - "NFC commissioning" when an NFC Tag is used to perform the first commissioning phase (as an alternate solution to BLE) Defines, variables and files have been renamed to reflect this. The following renaming have been done: - CHIP_DEVICE_CONFIG_ENABLE_NFC -> CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD - CONFIG_CHIP_NFC_COMMISSIONING -> CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD - chip_enable_nfc -> chip_enable_nfc_onboarding_payload - NFCManager -> NFCOnboardingPayloadManager - NFCManagerImpl -> NFCOnboardingPayloadManagerImpl - NFCMgr -> NFCOnboardingMgr - NFCMgrImpl -> NFCOnboardingPayloadMgrImpl The following files have been renamed for the platforms Zephyr, nrfconnect, nxp/k32w0 and telink: NFCManagerImpl.cpp -> NFCOnboardingPayloadManagerImpl.cpp NFCManagerImpl.h -> NFCOnboardingPayloadManagerImpl.h NFCManager.h -> NFCOnboardingPayloadManager.h
PR #36801: Size comparison from 425e5bd to 196bf00 Full report (80 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
What about |
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.
Two consistency nits but lgtm
@Damian-Nordic Thank you! I have pushed a commit with the changes that you suggested. |
@bauerschwan I have missed this file. I don't have much a preference. Do you prefer that we keep it like that or rename it? As indicated on Slack, the code managing "Onboarding Payload" data is for Commissionee side whereas the code adding NFC Commissioning (and using NFC as a new Transport Type) is on Commissioner side. So the classes are completely distinct. In a next PR, you will see the new classes used for NFC Commissioning. |
PR #36801: Size comparison from 425e5bd to 93d2adf Full report (80 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@Damian-Nordic I see that the Zephyr files are used by Nordic:
Who should give a green light for the modification of those files? |
I think only Nordic uses these files (we should actually move them to nrfconnect dir) so it's enough for you to get +1 from me. |
@bauerschwan I see that in the following PR (adding NFC as a new Transport file), I do have some new NFC.cpp and NFC.h files coming in src/transport/raw. IMO this is not an issue. For BLE this is exactly the same. You've got:
|
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
…ectConfig.h Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
…ctConfig.h Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
…ig.h Co-authored-by: Boris Zbarsky <[email protected]>
…fig.h Co-authored-by: Boris Zbarsky <[email protected]>
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.
@OlivierGre patch with missed changes for Telink & Nordic:
diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults
index a2e0a2ba5e..c185a98649 100644
--- a/config/nrfconnect/chip-module/Kconfig.defaults
+++ b/config/nrfconnect/chip-module/Kconfig.defaults
@@ -181,7 +181,7 @@ config MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL
# NFC configuration
# ==============================================================================
-config CHIP_NFC_COMMISSIONING
+config CHIP_NFC_ONBOARDING_PAYLOAD
default y
# Disable not needed NFC callback to save flash
diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig
index 2937b2b0c6..923a2de8c9 100644
--- a/config/telink/chip-module/Kconfig
+++ b/config/telink/chip-module/Kconfig
@@ -22,7 +22,7 @@ if CHIP
config CHIP_DEVICE_VENDOR_NAME
default "Telink Semiconductor"
-config CHIP_NFC_COMMISSIONING
+config CHIP_NFC_ONBOARDING_PAYLOAD
bool "Share onboarding payload in NFC tag"
default n
imply I2C
diff --git a/examples/lighting-app/telink/prj.conf b/examples/lighting-app/telink/prj.conf
index 9c7bab3e5f..5bf4f5fcd7 100644
--- a/examples/lighting-app/telink/prj.conf
+++ b/examples/lighting-app/telink/prj.conf
@@ -37,7 +37,7 @@ CONFIG_TELINK_OTA_BUTTON_TEST=n
CONFIG_CHIP_LIB_SHELL=n
# Disable CHIP NFC for commissioning
-CONFIG_CHIP_NFC_COMMISSIONING=n
+CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD=y
# Disable factory data support
CONFIG_CHIP_FACTORY_DATA=n
diff --git a/examples/shell/nrfconnect/prj.conf b/examples/shell/nrfconnect/prj.conf
index 4c8a3c2c95..bf62a04a71 100644
--- a/examples/shell/nrfconnect/prj.conf
+++ b/examples/shell/nrfconnect/prj.conf
@@ -46,7 +46,7 @@ CONFIG_CHIP_QSPI_NOR=n
CONFIG_CHIP_PROJECT_CONFIG="CHIPProjectConfig.h"
# 32786 == 0x8012 (example shell-app)
CONFIG_CHIP_DEVICE_PRODUCT_ID=32786
-CONFIG_CHIP_NFC_COMMISSIONING=n
+CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD=n
# Disable factory data support.
CONFIG_CHIP_FACTORY_DATA=n
Thank you very much Alex! I have pushed your changes. |
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.
@OlivierGre please add a Testing
section to your PR to describe how this PR was tested or is to be tested. If manual
please describe in detail how it was tested and also why automated testing is impossible.
Also make sure you clean it up. There is a Make sure you delete these instructions (to prove you have read them).
in there still ....
Also requires restyle fixes.
@andy31415 Hi, For the tests, I'm not able to test it because this code is for the Commissionee side for platforms that I don't have (Zephyr, nrfconnect, nxp/k32w0 and telink). I have requested a review and an approval from those companies:
I wanted to do the change about the restyler but, when I look at the details provided, I can see that it ended with an error; Thanks |
@andy31415 Also, I don't understand why many CI checks indicate "cancelled after 1m" (ex: " |
So how do we know that this code is good? There has to be some way to test it? |
@OlivierGre please add a Then reviewers can make an informed decision about the code. Maybe details about how testing will follow eventualy, because code that will never be tested/executed sounds wrong. |
We have a fast-cancel in case some fast required checks fail, so we free up CI resources. In this case |
@OlivierGre for the restyle, the restyler task contains the command needed to restyle, generally ready for copy & paste (I hope it is generally visible) |
In current code, "NFC Commissioning" was used for Onboarding Payload data put into an NFC Tag. This naming will create confusion with the new "NFC Commissioning" feature where NFC is used as the commissioning channel.
We propose to use the folllowing names:
Defines, variables and files have been renamed to reflect this. The following renaming have been done:
The following files have been renamed for the platforms Zephyr, nrfconnect, nxp/k32w0 and telink: NFCManagerImpl.cpp -> NFCOnboardingPayloadManagerImpl.cpp NFCManagerImpl.h -> NFCOnboardingPayloadManagerImpl.h NFCManager.h -> NFCOnboardingPayloadManager.h