Skip to content

Commit fd2a29d

Browse files
Adrian GielniewskiLuDuda
authored andcommitted
CI/CD: Synchronize ncs-aliro@f1533b2f0967 and ncs-door-lock-app
Source commit ID: @f1533b2f0967 sync-ncs-aliro-f1533b2f0967 Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.com>
1 parent 4e1f574 commit fd2a29d

91 files changed

Lines changed: 3827 additions & 572 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Kconfig

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
rsource "drivers/Kconfig"
88
rsource "lib/Kconfig"
99

10-
menuconfig NCS_ALIRO
11-
bool "NCS Aliro reader [EXPERIMENTAL]"
10+
menuconfig NCS_DOOR_LOCK
11+
bool "NCS Door Lock Application [EXPERIMENTAL]"
1212
depends on (SOC_SERIES_NRF54LX || SOC_SERIES_NRF53X || SOC_SERIES_NRF52X)
1313
select EXPERIMENTAL
1414
imply NFC_T4T_APDU
@@ -21,13 +21,13 @@ menuconfig NCS_ALIRO
2121
imply REQUIRES_FULL_LIBC
2222
imply NEWLIB_LIBC_NANO if NEWLIB_LIBC
2323
help
24-
This option enables the Aliro reader stack.
24+
This option enables the Door Lock Application which uses the Aliro reader stack.
2525

26-
if NCS_ALIRO
26+
if NCS_DOOR_LOCK
2727

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

30-
config ALIRO_BLE_UWB
30+
config DOOR_LOCK_BLE_UWB
3131
bool "Aliro Bluetooth LE (BLE) transport together with ultra wideband (UWB)"
3232
help
3333
Enable the Aliro BLE transport protocol (TP). This is the transport layer
@@ -40,31 +40,43 @@ config DISABLE_ALIRO_NFC_TP
4040
help
4141
Disable the NFC transport protocol. This is useful if you want to use Aliro with BLE only.
4242

43-
if ALIRO_BLE_UWB
43+
if DOOR_LOCK_BLE_UWB
4444

45-
config ALIRO_BLE_UWB_MAX_SESSIONS
45+
config DOOR_LOCK_BLE_UWB_MAX_SESSIONS
4646
int "Maximum number of BLE and UWB sessions"
4747
range 1 BT_MAX_CONN
4848
default BT_MAX_CONN
4949
help
5050
The maximum number of BLE and UWB sessions that can be established.
5151

52-
rsource "lib/aliro/Kconfig.ble.defconfig"
53-
54-
endif # ALIRO_BLE_UWB
52+
endif # DOOR_LOCK_BLE_UWB
5553

5654
rsource "lib/aliro/Kconfig.defconfig"
5755

58-
config DOOR_LOCK_DFU_BLE_SMP
56+
config DOOR_LOCK_DFU_BLE_SMP
5957
bool "Enable DFU over SMP"
6058
depends on !CHIP
6159
help
6260
Enables Device Firmware Upgrade over Bluetooth LE.
6361

62+
config DOOR_LOCK_DFU_BLE_SMP_STANDALONE
63+
bool
64+
default y if DOOR_LOCK_DFU_BLE_SMP && !DOOR_LOCK_BLE_UWB && !DOOR_LOCK_BLE_NUS
65+
help
66+
Automatically enabled when DFU over SMP is enabled standalone (without DOOR_LOCK_BLE_UWB or DOOR_LOCK_BLE_NUS).
67+
This simplifies conditional compilation checks in the code.
68+
6469
config DOOR_LOCK_BLE_NUS
6570
bool "Enable Nordic Uart Service (NUS)"
6671
depends on !CHIP
6772
help
6873
Enables the Bluetooth LE Nordic Uart Service (NUS). Using NUS service you can control a door lock using pre-defined BLE commands.
6974

70-
endif # NCS_ALIRO
75+
# Source BLE defconfig when any BLE feature is enabled
76+
if DOOR_LOCK_BLE_UWB || DOOR_LOCK_DFU_BLE_SMP || DOOR_LOCK_BLE_NUS
77+
78+
rsource "lib/aliro/Kconfig.ble.defconfig"
79+
80+
endif # DOOR_LOCK_BLE_UWB || DOOR_LOCK_DFU_BLE_SMP || DOOR_LOCK_BLE_NUS
81+
82+
endif # NCS_DOOR_LOCK

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ nrfutil sdk-manager toolchain launch --ncs-version v3.2.0-preview2 --shell
2424
```
2525

2626
```shell
27-
# initialize workspace for the ncs-door-lock-app (v0.5.0 release)
28-
west init -m https://github.com/nrfconnect/ncs-door-lock-app --mr v0.5.0 door-lock-workspace
27+
# initialize workspace for the ncs-door-lock-app (v0.6.0-rc1 release)
28+
west init -m https://github.com/nrfconnect/ncs-door-lock-app --mr v0.6.0-rc1 door-lock-workspace
2929
```
3030

3131
```shell

app/Kconfig

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

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

13-
choice ACCESS_MANAGER_IMPLEMENTATION
13+
choice DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION
1414
prompt "Access Manager implementation"
15-
default ACCESS_MANAGER_IMPLEMENTATION_DEFAULT
15+
default DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_DEFAULT
1616

17-
config ACCESS_MANAGER_IMPLEMENTATION_DEFAULT
17+
config DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_DEFAULT
1818
bool "Access Manager default implementation"
1919
help
2020
Uses the default implementation of the Access Manager
2121
provided by the Door Lock Reference Application.
2222

23-
config ACCESS_MANAGER_IMPLEMENTATION_CUSTOM
23+
config DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_CUSTOM
2424
bool "Access Manager custom implementation"
2525
help
2626
Uses a custom implementation of the Access Manager.
@@ -60,6 +60,10 @@ if DOOR_LOCK_BLE_NUS
6060
rsource "src/bt_nus/Kconfig"
6161
endif # DOOR_LOCK_BLE_NUS
6262

63+
if DOOR_LOCK_DFU_BLE_SMP
64+
rsource "src/dfu_smp/Kconfig"
65+
endif # DOOR_LOCK_DFU_BLE_SMP
66+
6367
if CHIP
6468

6569
rsource "src/matter/Kconfig"

app/VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION_MAJOR = 0
2-
VERSION_MINOR = 5
2+
VERSION_MINOR = 6
33
PATCHLEVEL = 0
44
VERSION_TWEAK = 0
5-
EXTRAVERSION =
5+
EXTRAVERSION = rc1

app/prj.conf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# Aliro
99
#
1010

11-
# Enable Aliro
12-
CONFIG_NCS_ALIRO=y
11+
CONFIG_NCS_DOOR_LOCK=y
1312

1413
# Basic system configuration
1514
CONFIG_CPP=y
@@ -22,18 +21,19 @@ CONFIG_SYS_HEAP_RUNTIME_STATS=y
2221

2322
# Stack sizes
2423
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3072
24+
CONFIG_SHELL_STACK_SIZE=4096
2525

2626
# Logging
2727
CONFIG_CONSOLE=y
2828
CONFIG_LOG=y
2929
CONFIG_LOG_MODE_DEFERRED=y
30-
CONFIG_NCS_ALIRO_RFAL_LOG_LEVEL_DBG=y
31-
CONFIG_NCS_ALIRO_BLE_LOG_LEVEL_INF=y
32-
CONFIG_NCS_ALIRO_UWB_LOG_LEVEL_INF=y
30+
CONFIG_DOOR_LOCK_RFAL_LOG_LEVEL_DBG=y
31+
CONFIG_DOOR_LOCK_BLE_LOG_LEVEL_INF=y
32+
CONFIG_DOOR_LOCK_UWB_LOG_LEVEL_INF=y
3333
CONFIG_USE_SEGGER_RTT=n
3434
CONFIG_LOG_BACKEND_RTT=n
3535
CONFIG_LOG_BACKEND_SHOW_COLOR=n
36-
CONFIG_NCS_DOOR_LOCK_APP_LOG_LEVEL_INF=y
36+
CONFIG_DOOR_LOCK_APP_LOG_LEVEL_INF=y
3737
CONFIG_BT_HCI_CORE_LOG_LEVEL_ERR=y
3838
CONFIG_BT_HCI_DRIVER_LOG_LEVEL_ERR=y
3939

app/src/aliro/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ add_subdirectory(platform)
1010
add_subdirectory(storage)
1111

1212
add_subdirectory_ifdef(CONFIG_DOOR_LOCK_STEP_UP_PHASE access_document)
13-
add_subdirectory_ifdef(CONFIG_ACCESS_MANAGER_IMPLEMENTATION_DEFAULT access_manager_impl_default)
14-
add_subdirectory_ifdef(CONFIG_ACCESS_MANAGER_IMPLEMENTATION_CUSTOM access_manager_impl_custom)
13+
add_subdirectory_ifdef(CONFIG_DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_DEFAULT access_manager_impl_default)
14+
add_subdirectory_ifdef(CONFIG_DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_CUSTOM access_manager_impl_custom)
1515
add_subdirectory_ifdef(CONFIG_DOOR_LOCK_EXPEDITED_FAST_PHASE kpersistent_manager)
1616
add_subdirectory_ifdef(CONFIG_DOOR_LOCK_CLI cli)
1717

app/src/aliro/Kconfig

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,37 @@ config DOOR_LOCK_STEP_UP_PHASE
1818
If enabled, the Step-up phase is supported.
1919
The user authentication is based on the Access Document.
2020

21-
rsource "platform/Kconfig"
21+
config DOOR_LOCK_CREDENTIAL_ISSUER_CA
22+
bool "Support for Credential Issuer CA public key"
23+
default y if DOOR_LOCK_STEP_UP_PHASE
24+
help
25+
If enabled, the Credential Issuer CA public key is supported.
26+
The Credential Issuer CA public key is used to verify the signature of the Credential Issuer certificate.
27+
28+
config DOOR_LOCK_READER_CERTIFICATE
29+
bool "Support for Reader certificates"
30+
default y if !CHIP
31+
help
32+
Use the reader certificate for the reader authentication.
2233

23-
config ALIRO_ACCESS_MANAGER_MAX_STORED_KEYS
24-
int "Maximum number of stored public keys"
25-
default 5
34+
if DOOR_LOCK_READER_CERTIFICATE
35+
36+
config DOOR_LOCK_READER_CERTIFICATE_MAX_SIZE
37+
int "Maximum size of the Reader certificate"
38+
default 512
2639
help
27-
Specifies the maximum number of public keys that can be
28-
stored in the AccessManager. This determines the size of
29-
the statically allocated array for key storage.
40+
Specifies the maximum size of the Reader certificate.
41+
The Reader certificate is used to identify the Reader.
42+
43+
endif # DOOR_LOCK_READER_CERTIFICATE
44+
45+
rsource "platform/Kconfig"
46+
47+
if DOOR_LOCK_CLI
48+
rsource "cli/Kconfig"
49+
endif
3050

31-
if ACCESS_MANAGER_IMPLEMENTATION_DEFAULT
51+
if DOOR_LOCK_ACCESS_MANAGER_IMPLEMENTATION_DEFAULT
3252
rsource "access_manager_impl_default/Kconfig"
3353
endif
3454

app/src/aliro/access_manager_impl_custom/access_manager_impl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <zephyr/logging/log.h>
1010

11-
LOG_MODULE_REGISTER(access_manager_impl_custom, CONFIG_NCS_DOOR_LOCK_APP_LOG_LEVEL);
11+
LOG_MODULE_REGISTER(access_manager_impl_custom, CONFIG_DOOR_LOCK_APP_LOG_LEVEL);
1212

1313
namespace Aliro {
1414

@@ -41,15 +41,15 @@ AliroError AccessManagerImpl::_VerifyKPersistentKey(CryptoTypes::KeyId, bool, Se
4141
return ALIRO_ERROR_NOT_IMPLEMENTED;
4242
}
4343

44-
#ifdef CONFIG_ALIRO_BLE_UWB
44+
#ifdef CONFIG_DOOR_LOCK_BLE_UWB
4545
AliroError AccessManagerImpl::_StartRangingSession(uint32_t, const CryptoTypes::Ursk &, SessionContext)
4646
{
4747
LOG_INF("Custom %s function", __FUNCTION__);
4848
return ALIRO_ERROR_NOT_IMPLEMENTED;
4949
}
50-
#endif // CONFIG_ALIRO_BLE_UWB
50+
#endif // CONFIG_DOOR_LOCK_BLE_UWB
5151

52-
AliroError AccessManagerImpl::_AddPublicKey(const CryptoTypes::PublicKey &, PublicKeyType, std::optional<size_t>)
52+
AliroError AccessManagerImpl::_AddPublicKey(const CryptoTypes::PublicKey &, PublicKeyType, size_t)
5353
{
5454
LOG_INF("Custom %s function", __FUNCTION__);
5555
return ALIRO_ERROR_NOT_IMPLEMENTED;
@@ -74,7 +74,7 @@ AliroError AccessManagerImpl::_GetPublicKey(size_t, CryptoTypes::PublicKey &)
7474
return ALIRO_ERROR_NOT_IMPLEMENTED;
7575
}
7676

77-
AliroError AccessManagerImpl::_RemovePublicKey(const CryptoTypes::PublicKey &, PublicKeyType)
77+
AliroError AccessManagerImpl::_RemovePublicKey(PublicKeyType, size_t)
7878
{
7979
LOG_INF("Custom %s function", __FUNCTION__);
8080
return ALIRO_ERROR_NOT_IMPLEMENTED;

app/src/aliro/access_manager_impl_custom/access_manager_impl.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ class AccessManagerImpl : public AccessManager {
2929
const std::optional<AccessDocumentTypes::AccessDocument> &accessDocument = std::nullopt);
3030
AliroError _VerifyKPersistentKey(CryptoTypes::KeyId kpersistentKeyId, bool isNfcSession,
3131
SessionContext sessionContext);
32-
#ifdef CONFIG_ALIRO_BLE_UWB
32+
#ifdef CONFIG_DOOR_LOCK_BLE_UWB
3333
AliroError _StartRangingSession(uint32_t rangingSessionId, const CryptoTypes::Ursk &ursk,
3434
SessionContext sessionContext);
35-
#endif // CONFIG_ALIRO_BLE_UWB
36-
AliroError _AddPublicKey(const CryptoTypes::PublicKey &publicKey, PublicKeyType publicKeyType,
37-
std::optional<size_t> keyIndex = std::nullopt);
35+
#endif // CONFIG_DOOR_LOCK_BLE_UWB
36+
AliroError _AddPublicKey(const CryptoTypes::PublicKey &publicKey, PublicKeyType publicKeyType, size_t keyIndex);
3837
bool _IsPublicKeyStored(const CryptoTypes::PublicKey &publicKey, size_t *keyIndex);
3938
AliroError _GetPublicKey(size_t keyIndex, CryptoTypes::PublicKey &publicKey);
40-
AliroError _RemovePublicKey(const CryptoTypes::PublicKey &publicKey, PublicKeyType publicKeyType);
39+
AliroError _RemovePublicKey(PublicKeyType publicKeyType, size_t keyIndex);
4140
AliroError _GetCredentialIssuerPublicKey(const CryptoTypes::KeyIdentifier &keyIdentifier,
4241
CryptoTypes::PublicKey &publicKey) const;
4342
void _ClearStoredKeys();

app/src/aliro/access_manager_impl_default/Kconfig

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
config ALIRO_CREDENTIAL_ISSUER_MAX_STORED_KEYS
7+
config DOOR_LOCK_ACCESS_MANAGER_CREDENTIAL_ISSUER_MAX_STORED_KEYS
88
int "Maximum number of stored Credential Issuer public keys"
99
default 5 if DOOR_LOCK_STEP_UP_PHASE
1010
default 0
@@ -15,17 +15,17 @@ config ALIRO_CREDENTIAL_ISSUER_MAX_STORED_KEYS
1515
public key is used to verify the signature of the access document.
1616
If this option is set to 0, the access document is not supported.
1717

18-
config ALIRO_ACCESS_MANAGER_MAX_STORED_KEYS
18+
config DOOR_LOCK_ACCESS_MANAGER_ACCESS_CREDENTIAL_MAX_STORED_KEYS
1919
int "Maximum number of stored public keys"
2020
default 5
2121
help
2222
Specifies the maximum number of public keys that can be
2323
stored in the AccessManager. This determines the size of
2424
the statically allocated array for key storage.
2525

26-
if ALIRO_BLE_UWB
26+
if DOOR_LOCK_BLE_UWB
2727

28-
config ALIRO_ACCESS_MANAGER_MAX_ALLOWED_DISTANCE_CM
28+
config DOOR_LOCK_ACCESS_MANAGER_MAX_ALLOWED_DISTANCE_CM
2929
int "Maximum allowed distance for granting access (cm)"
3030
default 100
3131
help
@@ -34,33 +34,33 @@ config ALIRO_ACCESS_MANAGER_MAX_ALLOWED_DISTANCE_CM
3434
This is used to determine if the Aliro User Device
3535
is within the allowed proximity range.
3636

37-
choice ALIRO_ACCESS_MANAGER_TERMINATE_SESSION
37+
choice DOOR_LOCK_ACCESS_MANAGER_TERMINATE_SESSION
3838
prompt "Terminate session on given condition"
39-
default ALIRO_ACCESS_MANAGER_TERMINATE_SESSION_ON_TIMEOUT
39+
default DOOR_LOCK_ACCESS_MANAGER_TERMINATE_SESSION_ON_TIMEOUT
4040
help
4141
Select the condition under which the AccessManager will
4242
terminate the current Aliro session.
4343

44-
config ALIRO_ACCESS_MANAGER_TERMINATE_SESSION_ON_ACCESS_GRANTED
44+
config DOOR_LOCK_ACCESS_MANAGER_TERMINATE_SESSION_ON_ACCESS_GRANTED
4545
bool "Terminate the session if the access was granted"
4646
help
4747
If enabled, the AccessManager will terminate each
4848
session immediately when an access is granted.
4949

50-
config ALIRO_ACCESS_MANAGER_TERMINATE_SESSION_ON_TIMEOUT
50+
config DOOR_LOCK_ACCESS_MANAGER_TERMINATE_SESSION_ON_TIMEOUT
5151
bool "Terminate session on timeout"
5252
help
5353
If enabled, the AccessManager will terminate each ongoing
54-
session if it times out according to ALIRO_ACCESS_MANAGER_SESSION_TIMEOUT_MS.
54+
session if it times out according to DOOR_LOCK_ACCESS_MANAGER_SESSION_TIMEOUT_MS.
5555

5656
endchoice
5757

58-
if ALIRO_ACCESS_MANAGER_TERMINATE_SESSION_ON_TIMEOUT
58+
if DOOR_LOCK_ACCESS_MANAGER_TERMINATE_SESSION_ON_TIMEOUT
5959

60-
config ALIRO_ACCESS_MANAGER_SESSION_TIMEOUT_MS
60+
config DOOR_LOCK_ACCESS_MANAGER_SESSION_TIMEOUT_MS
6161
int "Session timeout in milliseconds"
6262
default 10000
6363

6464
endif
6565

66-
endif # ALIRO_BLE_UWB
66+
endif # DOOR_LOCK_BLE_UWB

0 commit comments

Comments
 (0)