From 01c037e4cdb2bffc92747f3a0f78a0cbf124cdf7 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Wed, 14 Feb 2024 10:09:29 -0700 Subject: [PATCH] Used zigbee shell sample prj.conf to get working zigbee app --- boards/nrf52840dongle_nrf52840.overlay | 16 ++++++++ prj.conf | 56 +++++++++++++++++++++++--- src/main.c | 5 +++ 3 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 boards/nrf52840dongle_nrf52840.overlay diff --git a/boards/nrf52840dongle_nrf52840.overlay b/boards/nrf52840dongle_nrf52840.overlay new file mode 100644 index 0000000..e5ab610 --- /dev/null +++ b/boards/nrf52840dongle_nrf52840.overlay @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + + / { + chosen { + zephyr,entropy = &rng; + ncs,zigbee-timer = &timer2; + }; +}; + +&timer2 { + status = "okay"; +}; diff --git a/prj.conf b/prj.conf index 4bfe201..a639cbf 100644 --- a/prj.conf +++ b/prj.conf @@ -1,10 +1,54 @@ -CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y -CONFIG_SHELL=y -CONFIG_CRYPTO=y +# Copyright (c) 2022 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Configure serial +CONFIG_UART_INTERRUPT_DRIVEN=y +CONFIG_SERIAL=y + +# Make sure printk is not printing to the UART console CONFIG_CONSOLE=y -CONFIG_LOG=y -CONFIG_LOG_BACKEND_UART=y +CONFIG_UART_CONSOLE=y + +CONFIG_HEAP_MEM_POOL_SIZE=2048 +CONFIG_MAIN_THREAD_PRIORITY=7 CONFIG_ZIGBEE=y -CONFIG_ZIGBEE_ROLE_ROUTER=y \ No newline at end of file +CONFIG_ZIGBEE_APP_UTILS=y +CONFIG_ZIGBEE_ROLE_ROUTER=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_IP_ADDR_CHECK=n + +# Zigbee shell +CONFIG_ZIGBEE_SHELL=y +CONFIG_ZIGBEE_SHELL_DEBUG_CMD=y +CONFIG_ZIGBEE_SHELL_ENDPOINT=64 + +# Increase RX serial ring buffer +CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=128 + +# USB subsystem configuration +CONFIG_USB_DEVICE_STACK=y +CONFIG_USB_DEVICE_PRODUCT="Zigbee Shell" +CONFIG_USB_CDC_ACM=y +CONFIG_UART_LINE_CTRL=y + +# Initialize USB device as soon as possible as the USB CDC ACM is used +# as backend for both Shell and Logging subsystems. +CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y + +# Enable this to duplicate Zephyr logs to default Logger serial backend, +# usually connected to on-board JLink device. +# CONFIG_LOG_BACKEND_UART=y \ No newline at end of file diff --git a/src/main.c b/src/main.c index 9e3d89c..ea657f3 100644 --- a/src/main.c +++ b/src/main.c @@ -5,6 +5,11 @@ LOG_MODULE_REGISTER(app, LOG_LEVEL_INF); +#include +void zboss_signal_handler(zb_uint8_t param) { + +} + int main(void) { LOG_INF("Starting main");