Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

add_subdirectory(drivers)
add_subdirectory(lib)
add_subdirectory(subsys)
13 changes: 0 additions & 13 deletions CODEOWNERS

This file was deleted.

75 changes: 1 addition & 74 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,77 +6,4 @@

rsource "drivers/Kconfig"
rsource "lib/Kconfig"

menuconfig NCS_DOOR_LOCK
bool "NCS Door Lock Application [EXPERIMENTAL]"
depends on (SOC_SERIES_NRF54LX || SOC_SERIES_NRF53X || SOC_SERIES_NRF52X)
select EXPERIMENTAL
imply NFC_T4T_APDU
imply POLL
# storage
imply SETTINGS
imply FLASH
imply FLASH_MAP
imply REQUIRES_FULL_LIBCPP
imply REQUIRES_FULL_LIBC
imply NEWLIB_LIBC_NANO if NEWLIB_LIBC
help
This option enables the Door Lock Application which uses the Aliro reader stack.

if NCS_DOOR_LOCK

orsource "lib/aliro/interfaces/logger/Kconfig"

config DOOR_LOCK_BLE_UWB
bool "Aliro Bluetooth LE (BLE) transport together with ultra wideband (UWB)"
help
Enable the Aliro BLE transport protocol (TP). This is the transport layer
used by the Reader to communicate with the User Device. It is used to send and
receive packets over BLE. Additionally the UWB is enabled in order to manage the
ranging between the Reader and the User Device.

config DISABLE_ALIRO_NFC_TP
bool "Disable NFC transport protocol for development purposes"
help
Disable the NFC transport protocol. This is useful if you want to use Aliro with BLE only.

if DOOR_LOCK_BLE_UWB

config DOOR_LOCK_BLE_UWB_MAX_SESSIONS
int "Maximum number of BLE and UWB sessions"
range 1 BT_MAX_CONN
default BT_MAX_CONN
help
The maximum number of BLE and UWB sessions that can be established.

endif # DOOR_LOCK_BLE_UWB

rsource "lib/aliro/Kconfig.defconfig"

config DOOR_LOCK_DFU_BLE_SMP
bool "Enable DFU over SMP"
depends on !CHIP
help
Enables Device Firmware Upgrade over Bluetooth LE.

config DOOR_LOCK_DFU_BLE_SMP_STANDALONE
bool
default y if DOOR_LOCK_DFU_BLE_SMP && !DOOR_LOCK_BLE_UWB && !DOOR_LOCK_BLE_NUS
help
Automatically enabled when DFU over SMP is enabled standalone (without DOOR_LOCK_BLE_UWB or DOOR_LOCK_BLE_NUS).
This simplifies conditional compilation checks in the code.

config DOOR_LOCK_BLE_NUS
bool "Enable Nordic Uart Service (NUS)"
depends on !CHIP
help
Enables the Bluetooth LE Nordic Uart Service (NUS). Using NUS service you can control a door lock using pre-defined BLE commands.

# Source BLE defconfig when any BLE feature is enabled
if DOOR_LOCK_BLE_UWB || DOOR_LOCK_DFU_BLE_SMP || DOOR_LOCK_BLE_NUS

rsource "lib/aliro/Kconfig.ble.defconfig"

endif # DOOR_LOCK_BLE_UWB || DOOR_LOCK_DFU_BLE_SMP || DOOR_LOCK_BLE_NUS

endif # NCS_DOOR_LOCK
rsource "subsys/Kconfig"
62 changes: 18 additions & 44 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,65 +4,39 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

mainmenu "nRF Door Lock and Access Control Add-on"

module = DOOR_LOCK_APP
module-str = NCS_DOOR_LOCK_APP
module-dep = LOG
module-help = Enables nRF Connect SDK Door Lock Application log messages.
source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config"

choice DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION
prompt "Access Manager implementation"
default DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_DEFAULT

config DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_DEFAULT
bool "Access Manager default implementation"
help
Uses the default implementation of the Access Manager
provided by the Door Lock Reference Application.

config DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_CUSTOM
bool "Access Manager custom implementation"
help
Uses a custom implementation of the Access Manager.
This implementation is based on provided template
that can be tailored to specific requirements.
endchoice

config DOOR_LOCK_CLI
bool "Door Lock CLI support"
default y
bool "CLI support"
default y if (!DOOR_LOCK_RELEASE || !CHIP)
select SHELL
select REBOOT
help
Enable support for Door Lock CLI.

config DOOR_LOCK_PRINT_READER_GROUP_IDENTIFIER
bool "Print reader group identifier that should be provisioned into the User Device"
default y
help
Enable printing of the reader group identifier that should be provisioned into the User Device.

config DOOR_LOCK_USE_TEST_READER_IDENTIFIER
bool "Use test reader identifier"
default y
help
Initialize the reader Group Identifier and Group Sub Identifier to test values.

config DOOR_LOCK_USE_TEST_KEYS
bool "Use test keys"
default y
help
Initialize the reader keys to test values.
config DOOR_LOCK_RELEASE
bool "Release configuration"
help
In this configuration:
Aliro stack logs are disabled.
RFAL NFC driver logs are disabled.
Shell commands are disabled.
Device reset automatically on fatal error.

rsource "src/aliro/Kconfig"
rsource "src/Kconfig"

if DOOR_LOCK_BLE_NUS
rsource "src/bt_nus/Kconfig"
endif # DOOR_LOCK_BLE_NUS
rsource "Kconfig.defconfig"

if DOOR_LOCK_DFU_BLE_SMP
rsource "src/dfu_smp/Kconfig"
endif # DOOR_LOCK_DFU_BLE_SMP
# Source BLE defconfig when any BLE feature is enabled
if DOOR_LOCK_BLE_UWB || DOOR_LOCK_DFU_BLE_SMP || DOOR_LOCK_BLE_NUS
rsource "Kconfig.ble.defconfig"
endif # DOOR_LOCK_BLE_UWB || DOOR_LOCK_DFU_BLE_SMP || DOOR_LOCK_BLE_NUS

if CHIP

Expand Down
7 changes: 4 additions & 3 deletions lib/aliro/Kconfig.ble.defconfig → app/Kconfig.ble.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
config BT
default y

config BT_DEVICE_NAME
default "AliroDL"

config BT_PERIPHERAL
default y

Expand Down Expand Up @@ -48,3 +45,7 @@ config BT_BONDABLE

config BT_ID_MAX
default 2 if BT_BONDABLE

config BT_MAX_CONN
default 2 if DOOR_LOCK_BLE_UWB && (DOOR_LOCK_BLE_NUS || DOOR_LOCK_DFU_BLE_SMP)
default 1
88 changes: 5 additions & 83 deletions lib/aliro/Kconfig.defconfig → app/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,8 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# crypto default configuration
config MBEDTLS_PSA_CRYPTO_C
default y

config MBEDTLS_ENABLE_HEAP
default y

config MBEDTLS_HEAP_SIZE
default 8192

config MBEDTLS_X509_LIBRARY
default y

config PSA_WANT_ALG_ECDSA
default y

config PSA_WANT_ALG_ECDH
default y

config PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE
default y

config PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
default y

config PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT
default y

config PSA_WANT_ECC_SECP_R1_256
default y

config PSA_WANT_ALG_SHA_256
default y

config PSA_WANT_ALG_HKDF
default y

config PSA_WANT_ALG_HMAC
default y

config PSA_WANT_KEY_TYPE_HMAC
default y

config PSA_WANT_KEY_TYPE_AES
default y

config PSA_WANT_ALG_ECB_NO_PADDING
default y

config PSA_WANT_GENERATE_RANDOM
default y

config PSA_WANT_ALG_GCM
default y
config BT_DEVICE_NAME
default "AliroDL"

config TRUSTED_STORAGE
default y
Expand All @@ -73,10 +21,6 @@ endchoice
config HW_UNIQUE_KEY_WRITE_ON_CRYPTO_INIT
default y if (SOC_NRF5340_CPUAPP || SOC_SERIES_NRF54LX)

# APDU library
config NFC_T4T_APDU
default y

# required by Aliro persistent storage
config FLASH
default y
Expand All @@ -91,39 +35,23 @@ config NVS_LOOKUP_CACHE_SIZE
default 512 if NVS

config NVS_LOOKUP_CACHE_FOR_SETTINGS
default y if NVS
default y if SETTINGS_NVS

config ZMS
default y if SOC_FLASH_NRF_RRAM

config ZMS_LOOKUP_CACHE_SIZE
default 512 if ZMS
default 512 if SETTINGS_ZMS

config ZMS_LOOKUP_CACHE_FOR_SETTINGS
default y if ZMS
default y if SETTINGS_ZMS

config SETTINGS
default y

# required by Aliro CLI
config REBOOT
default y

config SHELL
default y

config EVENTS
default y

config SMF
default y

config SMF_ANCESTOR_SUPPORT
default y

config SMF_INITIAL_TRANSITION
default y

config NRF_SECURITY
default y

Expand All @@ -150,12 +78,6 @@ endchoice
config SHELL_CMD_BUFF_SIZE
default 256

config ZCBOR
default y

config ZCBOR_CANONICAL
default y

if !CHIP

config MAIN_STACK_SIZE
Expand Down
8 changes: 7 additions & 1 deletion app/boards/nrf52840dk_nrf52840.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@
};

aliases {
access-decision-indicator = &led1; /* green LED2 on nRF52840DK */
lock-sim-indicator = &led1; /* green LED2 on nRF52840DK */
};
};

&mx25r64 {
status = "okay";
};

&gpio0 {
status = "okay";
/* Use PORT event rather than GPIOTE IN event, to save power */
sense-edge-mask = <0x00000008>; /* P0.03 */
};
36 changes: 36 additions & 0 deletions app/boards/nrf52840dk_nrf52840_release.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include "nrf52840dk_nrf52840.overlay"

&uart1 {
status = "disabled";
};

&adc {
status = "disabled";
};

&i2c0 {
status = "disabled";
};

&i2c1 {
status = "disabled";
};

&pwm0 {
status = "disabled";
};

&nfct {
status = "disabled";
};

&usbd {
status = "disabled";
};

Loading