Hi! I am trying to get OSDP communication up and running on my nrf9160dk board. I am trying to run this sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/mgmt/osdp/peripheral_device i have gone into the odsp Kconfig file and commented out the crypto options from:
config OSDP_SC_ENABLED bool "OSDP Secure Channel" depends on CSPRING_ENABLED default y select CRYPTO #select CRYPTO_MBEDTLS_SHIM #select MBEDTLS #select MBEDTLS_CIPHER_AES_ENABLED #select MBEDTLS_CIPHER_CCM_ENABLED
like mentioned in Configuration Conflicts with OSDP and NRF Security
this is my prj.conf
# OSDP config CONFIG_OSDP=y CONFIG_OSDP_MODE_PD=y # LED CONTROL CONFIG_OSDP_PD_CAP_READER_LED_CONTROL_COMP_LEVEL=1 CONFIG_OSDP_PD_CAP_READER_LED_CONTROL_NUM_ITEMS=1 CONFIG_NRF_SECURITY=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_HEAP_SIZE=8192 CONFIG_PSA_CRYPTO_DRIVER_OBERON=n CONFIG_PSA_CRYPTO_DRIVER_CC3XX=y CONFIG_PSA_WANT_ALG_CCM=y CONFIG_ENTROPY_GENERATOR=y CONFIG_OSDP_CRYPTO_DRV_NAME="CRYPTO_CC3XX" CONFIG_MBEDTLS_USE_PSA_CRYPTO=y # Enable OSDP Secure Channel feature CONFIG_OSDP_SC_ENABLED=y CONFIG_OSDP_PD_SCBK="NONE" CONFIG_OSDP_PD_CAP_TIME_KEEPING_COMP_LEVEL=2
I have the dev kit wired to my pc via a usb-uart converter but when i try to send the secure key i get:
[00:00:14.277,435] <err> osdp: osdp_encrypt: Failed to get crypto dev binding!
from osdp_sc.c:
void osdp_encrypt(uint8_t *key, uint8_t *iv, uint8_t *data, int len)
{
const struct device *dev;
struct cipher_ctx ctx = {
.keylen = 16,
.key.bit_stream = key,
.flags = CAP_NO_IV_PREFIX
};
struct cipher_pkt encrypt = {
.in_buf = data,
.in_len = len,
.out_buf = data,
.out_len = len
};
dev = device_get_binding(CONFIG_OSDP_CRYPTO_DRV_NAME);
if (dev == NULL) {
LOG_ERR("Failed to get crypto dev binding!");
return;
}
i am using ncs v2.3.0 but have updated the osdp headers and source code to the newest version included in Zephyr. I have included the project.
I have gone trough the zephyr.dts file but cant find any crypto driver bindings there. What should i set CONFIG_OSDP_CRYPTO_DRV_NAME to?