1# 2# Copyright (c) 2020 Siddharth Chandrasekaran <siddharth@embedjournal.com> 3# 4# SPDX-License-Identifier: Apache-2.0 5# 6 7menuconfig OSDP 8 bool "Open Supervised Device Protocol (OSDP) driver" 9 select RING_BUFFER 10 imply SERIAL_SUPPORT_INTERRUPT 11 imply UART_INTERRUPT_DRIVEN 12 select CRC 13 help 14 Add support for Open Supervised Device Protocol (OSDP) 15 16if OSDP 17 18choice 19 prompt "OSDP Mode of Operation" 20 config OSDP_MODE_PD 21 bool "Configure OSDP in Peripheral Device mode" 22 help 23 Configure this device to operate as a PD (Peripheral Device) 24 config OSDP_MODE_CP 25 bool "Configure OSDP in Control Panel mode" 26 help 27 Configure this device to operate as a CP (Control Panel) 28endchoice 29 30config OSDP_UART_BAUD_RATE 31 int "OSDP UART baud rate" 32 default 115200 33 help 34 OSDP defines that baud rate can be either 9600 or 38400 or 35 115200. 36 37config OSDP_LOG_LEVEL 38 int "OSDP Logging Level" 39 default 1 40 help 41 Set the logging level for the OSDP driver 42 43config OSDP_UART_BUFFER_LENGTH 44 int "OSDP UART buffer length" 45 default 256 46 help 47 OSDP RX and TX buffer FIFO length. 48 49config OSDP_THREAD_STACK_SIZE 50 int "OSDP Thread stack size" 51 default 1024 52 help 53 Thread stack size for osdp refresh thread 54 55config OSDP_PACKET_TRACE 56 bool "Print bytes sent/received over OSDP to console" 57 help 58 Prints bytes sent/received over OSDP to console for debugging. 59 LOG_HEXDUMP_DBG() is used to achieve this and can be very verbose. 60 61config OSDP_SKIP_MARK_BYTE 62 bool "Skip sending the initial marking byte (0xFF)" 63 help 64 As per the OSDP specification, the first byte in the channel has 65 to be a MARK byte which is 0xFF. Since this is not stated in the 66 packet structure definition, some commercial CPs and PDs do not 67 handle the initial mark byte correctly. This option can be used to 68 completely disable sending/expecting a mark byte to work with 69 such non-conforming devices. 70 71config OSDP_SC_ENABLED 72 bool "OSDP Secure Channel" 73 depends on CSPRNG_ENABLED 74 default y 75 select CRYPTO 76 select CRYPTO_MBEDTLS_SHIM 77 select MBEDTLS 78 select MBEDTLS_CIPHER_CCM_ENABLED 79 help 80 Secure the OSDP communication channel with encryption and mutual 81 authentication. 82 83if OSDP_SC_ENABLED 84 85config OSDP_SC_RETRY_WAIT_SEC 86 int "Retry wait time in seconds after a Secure Channel error" 87 default 600 88 help 89 Time in seconds to wait after a secure channel failure, and before 90 retrying to establish it. 91 92config OSDP_CRYPTO_DRV_NAME 93 string "Crypto driver to use with OSDP" 94 default "CRYPTO_MTLS" 95 help 96 OSDP Secure Channel uses AES-128 to secure communication between 97 CP and PD. Provide an available crypto driver name here. 98 99endif # OSDP_SC_ENABLED 100 101if OSDP_MODE_PD 102source "subsys/mgmt/osdp/Kconfig.pd" 103endif 104 105if OSDP_MODE_CP 106source "subsys/mgmt/osdp/Kconfig.cp" 107endif 108 109endif # OSDP 110