-
Notifications
You must be signed in to change notification settings - Fork 1.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
net: lib: nrf_cloud: make MQTT client ID prefix configurable #2961
net: lib: nrf_cloud: make MQTT client ID prefix configurable #2961
Conversation
Recreated from fork by request from @carlescufi |
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.
Without changes suggested in the PR you'll get compile warnings/errors for different configurations
main.c:391:24: warning: '%s' directive output may be truncated writing up to 18 bytes into a region of size 16 [-Wformat-truncation=]
etc.
Perfect timing for this merge request. ❤️❤️❤️ |
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.
Looks good
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.
../src/main.c: In function 'main':
../src/main.c:392:24: warning: '__builtin_snprintf' output may be truncated before the last format character [-Wformat-truncation=]
392 | snprintf(id_buf, len, "%s%s", CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX,
| ^~~~~~
../src/main.c:392:29: note: format string is defined here
392 | snprintf(id_buf, len, "%s%s", CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX,
| ^
In file included from /opt/tools/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/sys-include/stdio.h:800,
from ../src/main.c:8:
../src/main.c:392:2: note: '__builtin_snprintf' output between 5 and 20 bytes into a destination of size 19
392 | snprintf(id_buf, len, "%s%s", CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX,
| ^~~~~~~~
Still compiler warnings on aws_fota, looks like an off by 1 error.
@sigvartmh what are you compiling? Why do I not see those from CI? |
I'm using |
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.
LGTM now
CI/Jenkins/FULL_CI fails with |
All tests green now. |
@tejlmand Any other feedback? The PR is pending your ACK. |
The $srctree environment variable is already set to point to the Zephyr root, so no need to do source "$(ZEPHYR_BASE)/Kconfig.zephyr" in samples. Just source "Kconfig.zephyr" works. Signed-off-by: Markus Tacker <Markus.Tacker@NordicSemi.no>
The `nrf-` prefix is reserved for Nordic devices: https://api.nrfcloud.com/v1#operation/CreateDeviceCertificate: If you want to create a certificate for a non-Nordic device, any deviceId is sufficient that does not start with `nrf-` (we recommend using a GUID). This change allows customers to use the `asset_tracker` application with nRF Connect for Cloud with their own SIPs without modifying the source. This is especially relevant for customers that are building development kit like products, and allows them to work out of the box with the stock `asset_tracker` and nRF Connect for Cloud. Signed-off-by: Markus Tacker <Markus.Tacker@NordicSemi.no> Co-authored-by: Sigvart Hovland <Sigvart Hovland@NordicSemi.no>
Changes introduced in nrfconnect#2349 got reverted by nrfconnect#2961 This commit re-introduces those changes. NCSDK-6750 Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no> Signed-off-by: Haakon Oeye Amundsen <haakon.amundsen@nordicsemi.no>
The
nrf-
prefix is reserved for Nordic devices: https://api.nrfcloud.com/v1#operation/CreateDeviceCertificate:This change allows customers to use the
asset_tracker
application with nRF Connect for Cloud with their own SIPs without modifying the source. This is especially relevant for customers that are building development kit like products, and allows them to work out of the box with the stockasset_tracker
and nRF Connect for Cloud.