Skip to content
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

samples: nrf_cloud_multi_service: Wi-Fi scan config #12143

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

junqingzou
Copy link
Contributor

@junqingzou junqingzou commented Aug 28, 2023

CONFIG_NRF700X_SCAN_LIMIT has been removed in PR #12008.
Replace with CONFIG_WIFI_MGMT_SCAN_MAX_BSS_CNT.

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Aug 28, 2023
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Aug 28, 2023

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-fw-nrfconnect-nrf-iot_cloud X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@@ -124,3 +126,6 @@ CONFIG_NET_SOCKETS_POLL_MAX=8
# this could be set as low as 130000. Add 256 bytes for each additional scanning result, assuming
# sane SSID lengths. We set the heap much higher in case of long SSIDs.
CONFIG_HEAP_MEM_POOL_SIZE=130000

## Configure device provision certificate
CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not required by CMakeLists.txt -- you mention it is needed for a test, can you elaborate on that? I think this should be added to the config of that test, rather than in the nrf7002 overlay

Copy link
Contributor

Choose a reason for hiding this comment

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

the directions in the MSS readme require additional parameters for the build command:

west build --board your_board -p always -- -DCONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y -DCONFIG_NRF_CLOUD_CLIENT_ID_SRC_COMPILE_TIME=y -DCONFIG_NRF_CLOUD_CLIENT_ID="698d4c11-0ccc-4f04-89cd-6882724e3f6f"

so this need isn't really specific to zou's "test".

related: #11863 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay. As we discussed over there, requiring -DCONFIG_NRF_CLOUD_PROVISION_CERTIFICATES to be enabled manually was a deliberate decision, but this is not a hill I want to die on

Copy link
Contributor

Choose a reason for hiding this comment

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

i was just providing the history for Zou and also highlighting that this a general need, not test specific.

if we agree to keep this addition to the .conf, then the README should be updated, as that extra parameter is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I'm completely not aware of the doc.

west build --board your_board -p always -- -DCONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y -DCONFIG_NRF_CLOUD_CLIENT_ID_SRC_COMPILE_TIME=y -DCONFIG_NRF_CLOUD_CLIENT_ID="698d4c11-0ccc-4f04-89cd-6882724e3f6f"

In my test, I only added one -DOVERLAY_CONFIG=overlay_nrf7002ek_wifi_no_lte.conf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not required by CMakeLists.txt -- you mention it is needed for a test, can you elaborate on that? I think this should be added to the config of that test, rather than in the nrf7002 overlay

I mean this line:
# Include certs files if enabled. zephyr_include_directories_ifdef(CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES certs)

As far as I know this is the only way to supply the credentials to lib_nrf_cloud for Wi-Fi devices as the TF-M PS storage is not ready yet.

Comment on lines 64 to 66
CONFIG_NRF_CLOUD_CLIENT_ID_SRC_HW_ID=y
CONFIG_HW_ID_LIBRARY=y
CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly, you could enable this in your test, rather than in the overlay. I would rather not prescribe a specific means of getting ID in this overlay, it's meant to be compatible with whatever the user configures themselves

Copy link
Contributor

Choose a reason for hiding this comment

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

Also we probably shouldn't encourage using the Wi-Fi MAC address as the nrf cloud client id?
But I do see why it is useful in this case, since all the modem stuff is disabled by the overlay, there is no way to get the nrf91 device UUID.

Copy link
Contributor

Choose a reason for hiding this comment

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

i didn't mean to approve. i think this should be removed?

LOG_ERR("nRF Cloud client_id is not initialized, error: %d", err);
return err;
} else {
LOG_INF("nRF Cloud client_id is %s", client_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOG_INF("nRF Cloud client_id is %s", client_id);
LOG_INF("nRF Cloud client ID: %s", client_id);

@@ -124,3 +126,6 @@ CONFIG_NET_SOCKETS_POLL_MAX=8
# this could be set as low as 130000. Add 256 bytes for each additional scanning result, assuming
# sane SSID lengths. We set the heap much higher in case of long SSIDs.
CONFIG_HEAP_MEM_POOL_SIZE=130000

## Configure device provision certificate
CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y
Copy link
Contributor

Choose a reason for hiding this comment

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

the directions in the MSS readme require additional parameters for the build command:

west build --board your_board -p always -- -DCONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y -DCONFIG_NRF_CLOUD_CLIENT_ID_SRC_COMPILE_TIME=y -DCONFIG_NRF_CLOUD_CLIENT_ID="698d4c11-0ccc-4f04-89cd-6882724e3f6f"

so this need isn't really specific to zou's "test".

related: #11863 (comment)

Comment on lines 64 to 66
CONFIG_NRF_CLOUD_CLIENT_ID_SRC_HW_ID=y
CONFIG_HW_ID_LIBRARY=y
CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y
Copy link
Contributor

Choose a reason for hiding this comment

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

Also we probably shouldn't encourage using the Wi-Fi MAC address as the nrf cloud client id?
But I do see why it is useful in this case, since all the modem stuff is disabled by the overlay, there is no way to get the nrf91 device UUID.

@glarsennordic glarsennordic self-requested a review August 30, 2023 19:23
Comment on lines 64 to 66
CONFIG_NRF_CLOUD_CLIENT_ID_SRC_HW_ID=y
CONFIG_HW_ID_LIBRARY=y
CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y
Copy link
Contributor

Choose a reason for hiding this comment

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

i didn't mean to approve. i think this should be removed?

@junqingzou
Copy link
Contributor Author

Thanks for all the comments, I think that I'll remove the second commit as of now.

For the long term, if device credentials could be saved somewhere for lib_nrf_cloud to fetch, I think it makes sense to use Wi-Fi MAC address as nRF Cloud client_id, which makes one build of the sample to run on any devices.

Furthermore, this sample works greatly on nRF7002DK (nRF5340 + nRF7002) so maybe the document could be updated to reflect that.

CONFIG_NRF700X_SCAN_LIMIT has been removed in PR#12008.
Replace with CONFIG_WIFI_MGMT_SCAN_MAX_BSS_CNT.

Signed-off-by: Jun Qing Zou <jun.qing.zou@nordicsemi.no>
@@ -124,3 +126,6 @@ CONFIG_NET_SOCKETS_POLL_MAX=8
# this could be set as low as 130000. Add 256 bytes for each additional scanning result, assuming
# sane SSID lengths. We set the heap much higher in case of long SSIDs.
CONFIG_HEAP_MEM_POOL_SIZE=130000

## Configure device provision certificate
CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y
Copy link
Contributor

Choose a reason for hiding this comment

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

i was just providing the history for Zou and also highlighting that this a general need, not test specific.

if we agree to keep this addition to the .conf, then the README should be updated, as that extra parameter is not needed.

@nordicjm nordicjm merged commit 26e0fc9 into nrfconnect:main Aug 31, 2023
12 checks passed
@junqingzou junqingzou deleted the pr_wifi_scan_limit branch August 31, 2023 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants