zephyr/samples/subsys/mgmt/osdp
Keith Packard 0b90fd5adf samples, tests, boards: Switch main return type from void to int
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Most of these changes were automated using coccinelle with the following
script:

@@
@@
- void
+ int
main(...) {
	...
-	return;
+	return 0;
	...
}

Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
..
control_panel samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_device samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
README.rst mgmt/osdp: Split CP and PD samples into dedicated directories 2020-10-21 17:36:16 +02:00

.. _osdp-sample:

Open Supervised Device Protocol (OSDP)
######################################

Open Supervised Device Protocol (OSDP) is an IEC standard (IEC 60839-11-5)
intended to improve interoperability among access control and security products.
It supports Secure Channel (SC) for encrypted and authenticated communication
between configured devices.

OSDP describes the communication protocol for interfacing one or more Peripheral
Devices (PD) to a Control Panel (CP) over a two-wire RS-485 multi-drop serial
communication channel. Nevertheless, this protocol can be used to transfer
secure data over any stream based physical channel. Read more about `OSDP here
<https://libosdp.gotomain.io/>`_..

Although OSDP is steered towards the Access and Security industries, it can be
used as a general communication protocol for devices in a secure way without
too much resource requirements. The security is not top-notch (AES-128) but it
is reasonable enough, given that the alternative is no security at all.

OSDP Supports the control of the following components on a PD:
   - LED
   - Buzzer
   - Keypad
   - Output (GPIOs)
   - Input Control (GPIOs)
   - Displays
   - Device status (tamper, power, etc.,)
   - Card Reader
   - Fingerprint Reader