-
Notifications
You must be signed in to change notification settings - Fork 151
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
Zigbee ota updates #192
Open
oleo65
wants to merge
10
commits into
rbaron:main
Choose a base branch
from
oleo65:zigbee-ota-updates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Zigbee ota updates #192
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a15bd37
Added zigbee ota configuration to main.
oleo65 61533da
Added separate ota config file based on the prj file.
oleo65 bb2f3cc
Removed obsolete leftover comment from ota sample.
oleo65 76a76de
Added basic information to zigbee readme file for ota updates.
oleo65 4bb9a97
Added ota config parameters to main prj.conf. Toggle default is set t…
oleo65 7dcd4bf
Moving toggled settings to Kconfig for ota updates.
oleo65 b72b970
Define and set sw_build_id in the basic attr cluster
rbaron b2376a4
Re-create separate prj_fota.conf
rbaron 18f4914
FOTA configs for safer firmware matching
rbaron 67b3dd8
Leave manufacturer ID unset for now
rbaron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
|
||
CONFIG_LOG=y | ||
CONFIG_PWM=y | ||
CONFIG_I2C=y | ||
CONFIG_ADC=y | ||
CONFIG_GPIO=y | ||
|
||
CONFIG_USE_SEGGER_RTT=y | ||
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096 | ||
|
||
CONFIG_NEWLIB_LIBC=y | ||
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y | ||
|
||
CONFIG_SERIAL=n | ||
|
||
CONFIG_HEAP_MEM_POOL_SIZE=2048 | ||
CONFIG_MAIN_THREAD_PRIORITY=7 | ||
|
||
CONFIG_ZIGBEE=y | ||
CONFIG_ZIGBEE_APP_UTILS=y | ||
CONFIG_ZIGBEE_ROLE_END_DEVICE=y | ||
|
||
# This example requires more workqueue stack | ||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 | ||
|
||
# Enable nRF ECB driver | ||
CONFIG_CRYPTO=y | ||
CONFIG_CRYPTO_NRF_ECB=y | ||
CONFIG_CRYPTO_INIT_PRIORITY=80 | ||
|
||
# Networking | ||
CONFIG_NET_IPV6=n | ||
CONFIG_NET_IPV6_MLD=n | ||
CONFIG_NET_IPV6_NBR_CACHE=n | ||
CONFIG_NET_IPV6_RA_RDNSS=n | ||
CONFIG_NET_IP_ADDR_CHECK=n | ||
CONFIG_NET_UDP=n | ||
|
||
## | ||
## ZigBee Channel Selection | ||
## | ||
# Get Zigbee to scan every channel. | ||
CONFIG_ZIGBEE_CHANNEL_SELECTION_MODE_MULTI=y | ||
# By default only scans channel 11 (ZigBee2MQTT default) and 15 (ZHA default). | ||
# Comment to scan all channels - this will make pairing consume more energy. | ||
# CONFIG_ZIGBEE_CHANNEL_MASK=0x8800 | ||
|
||
# Uncomment to set a specific channel - this will make pairing more energy efficient. | ||
# CONFIG_ZIGBEE_CHANNEL=11 | ||
|
||
# Enable API for powering down unused RAM parts. | ||
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/nrf/ug_zigbee_configuring.html#power-saving-during-sleep | ||
CONFIG_RAM_POWER_DOWN_LIBRARY=y | ||
|
||
# LittleFS. | ||
CONFIG_MAIN_STACK_SIZE=2048 | ||
CONFIG_FLASH=y | ||
CONFIG_FLASH_MAP=y | ||
CONFIG_FLASH_PAGE_LAYOUT=y | ||
CONFIG_FILE_SYSTEM=y | ||
CONFIG_FILE_SYSTEM_LITTLEFS=y | ||
|
||
CONFIG_WATCHDOG=y | ||
CONFIG_HWINFO=y | ||
CONFIG_ASSERT=y | ||
|
||
# Uncomment for debug log level. | ||
# CONFIG_LOG_DEFAULT_LEVEL=4 | ||
|
||
# Factory reset method selection. Only hardware revision 2.0.0+ has button SW1. Earlier | ||
# revisions must select a different method. See Kconfig for options. | ||
# CONFIG_PRST_ZB_FACTORY_RESET_VIA_SW1=y | ||
|
||
## | ||
## OTA section. | ||
## | ||
|
||
# Software build version in the basic_attrs cluster. | ||
CONFIG_PRST_ZB_SOFTWARE_VERSION="dev" | ||
|
||
# Enable Zigbee FOTA library | ||
CONFIG_ZIGBEE_FOTA=y | ||
|
||
CONFIG_ZIGBEE_FOTA_ENDPOINT=5 | ||
CONFIG_ZIGBEE_FOTA_LOG_LEVEL_DBG=y | ||
|
||
# FOTA manufacturer ID. Defaults to 0x127f (Nordic). | ||
# CONFIG_ZIGBEE_FOTA_MANUFACTURER_ID=0x0000 | ||
|
||
# This must be BOARD_REVISION_CODE. | ||
# TODO: move this to Kconfig. | ||
CONFIG_ZIGBEE_FOTA_HW_VERSION=4 | ||
|
||
# Set for which hardware versions this FOTA image is valid. | ||
CONFIG_ENABLE_ZIGBEE_FOTA_MIN_HW_VERSION=y | ||
CONFIG_ZIGBEE_FOTA_MIN_HW_VERSION=0x00 | ||
CONFIG_ENABLE_ZIGBEE_FOTA_MAX_HW_VERSION=y | ||
CONFIG_ZIGBEE_FOTA_MAX_HW_VERSION=0xff | ||
|
||
# 0.0.0 is a safe default for development. | ||
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="0.0.0" | ||
CONFIG_ZIGBEE_FOTA_COMMENT="b-parasite" | ||
|
||
# Ensure an MCUboot-compatible binary is generated. | ||
CONFIG_IMG_MANAGER=y | ||
CONFIG_STREAM_FLASH=y | ||
CONFIG_DFU_TARGET_MCUBOOT=y | ||
CONFIG_IMG_ERASE_PROGRESSIVELY=y | ||
CONFIG_ZIGBEE_FOTA_PROGRESS_EVT=y | ||
|
||
# Increase the number of RX buffers | ||
CONFIG_NRF_802154_RX_BUFFERS=32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Out of curiosity, what's the expected behavior here? We have two identify handlers in different endpoints. Where is the FOTA one used?
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.
The
CONFIG_ZIGBEE_FOTA_ENDPOINT
comes from the library which is activated by theCONFIG_ZIGBEE_FOTA
toggle. Basically an additional zigbee application (?) is registered on the device if OTA functionality is active. This is what I interpreted from the docs and the code.The lines from above I simply took from the nordic sample. If they are really needed I cannot tell, but I wanted to rule out all possible errors during development by missing something out.
I would suggest, we leave it like it is now, and once we can confirm that OTA is working we could try if it is really needed. 👼