{"id":51030842,"url":"https://github.com/osdp-dev/libosdp","last_synced_at":"2026-06-22T00:04:59.652Z","repository":{"id":43382769,"uuid":"208411245","full_name":"osdp-dev/libosdp","owner":"osdp-dev","description":"OSDP (Open Supervised Device Protocol) library; this project provides a C library for OSDP with bindings/glues for various platforms and languages","archived":false,"fork":false,"pushed_at":"2026-06-20T21:32:51.000Z","size":3385,"stargazers_count":191,"open_issues_count":3,"forks_count":107,"subscribers_count":16,"default_branch":"master","last_synced_at":"2026-06-21T11:29:22.810Z","etag":null,"topics":["osdp","osdp-arduino","osdp-python","osdp-rust"],"latest_commit_sha":null,"homepage":"https://osdp.dev","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osdp-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG/CHANGELOG.legacy","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"sidcha"}},"created_at":"2019-09-14T08:25:41.000Z","updated_at":"2026-06-21T07:16:58.000Z","dependencies_parsed_at":"2023-02-06T10:00:51.193Z","dependency_job_id":"8d35d586-46cc-48b7-ae51-8779c1f92f01","html_url":"https://github.com/osdp-dev/libosdp","commit_stats":null,"previous_names":["osdp-dev/libosdp"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/osdp-dev/libosdp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdp-dev%2Flibosdp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdp-dev%2Flibosdp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdp-dev%2Flibosdp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdp-dev%2Flibosdp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osdp-dev","download_url":"https://codeload.github.com/osdp-dev/libosdp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdp-dev%2Flibosdp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34629735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["osdp","osdp-arduino","osdp-python","osdp-rust"],"created_at":"2026-06-22T00:04:58.952Z","updated_at":"2026-06-22T00:04:59.643Z","avatar_url":"https://github.com/osdp-dev.png","language":"C","funding_links":["https://github.com/sponsors/sidcha"],"categories":[],"sub_categories":[],"readme":"# LibOSDP - Open Supervised Device Protocol Library\n\n[![Latest Release][1]][2]\n[![Build CI][3]][4]\n[![PyPI Version][16]][12]\n[![PlatformIO Registry][17]][18]\n[![Vcpkg Version][32]][33]\n[![Crates.io LibOSDP version][34]][35]\n[![Crates.io osdpctl version][36]][37]\n\nThis is a cross-platform open source implementation of IEC 60839-11-5 Open\nSupervised Device Protocol (OSDP). The protocol is intended to improve\n[interoperability][40] among access control and security products. It supports\nSecure Channel (SC) for encrypted and authenticated communication between\nconfigured devices.\n\nOSDP describes the communication protocol for interfacing one or more Peripheral\nDevices (PD) to a Control Panel (CP) over a two-wire RS-485 multi-drop serial\ncommunication channel. Nevertheless, this protocol can be used to transfer\nsecure data over any stream based physical channel. Read more about OSDP\n[here][21].\n\nThis protocol is developed and maintained by [Security Industry Association][20]\n(SIA).\n\n## Salient Features of LibOSDP\n\n  - Supports secure channel communication (AES-128) by default and provides a\n    custom init-time flag to enforce a higher level of security not mandated by\n    the specification ([see][41])\n  - Can be used to setup a PD or CP mode of operation (see [examples][39]).\n  - Exposes a well defined contract though a single [header file][38].\n  - Cross-platform; can be built to run on bare-metal embedded devices, Linux,\n    Mac, and Windows.\n  - No run-time memory allocation. All memory is allocated at init-time\n  - No external dependencies (for ease of cross compilation)\n  - Fully non-blocking, asynchronous design\n  - Provides Rust, Python3, and C++ bindings for the C library for faster\n    integration into various development phases.\n  - Includes dozens of integration and unit tests which are incorporated in CI\n    to ensure higher quality of releases.\n  - Built-in, sophisticated, debugging infrastructure and tools ([see][14]).\n  - Packaged and distributed through various package repositories such as\n    Cargo [crates][19], [PyPI][12], [Vcpkg][33], [PlatformIO][18], etc.,\n\n## Usage Overview\n\nA device complying with OSDP can either be a CP or a PD. There can be only one\nCP on a bus which can talk to multiple PDs. LibOSDP allows your application to\nwork either as a CP or a PD so depending on what you want to do you have to do\nsome things differently.\n\nLibOSDP creates the following constructs which allow interactions between\ndevices on the OSDP bus. These should not be confused with the protocol\nspecified terminologies that may use the same names. They are:\n  - Channel - Something that allows two OSDP devices to talk to each other\n  - Commands - A call for action from a CP to one of its PDs\n  - Events - A call for action from a PD to its CP\n\nYou start by implementing the `osdp_channel` interface; this allows LibOSDP to\ncommunicate with other OSDP devices on the bus. Then you describe the PD you\nare\n  - talking to on the bus (in case of CP mode of operation) or,\n  - going to behave as on the bus (in case of PD mode of operation)\nby using the `osdp_pd_info_t` struct.\n\nYou can use `osdp_pd_info_t` struct (or an array of it in case of CP) to create\na `osdp_t` context. Then your app needs to call the `osdp_cp/pd_refresh()` as\nfrequently as possible. To meet the OSDP specified timing requirements, your\napp must call this method at least once every 50ms.\n\nAfter this point, the CP context can,\n  - send commands to any one of the PDs (to control LEDs, Buzzers, etc.,)\n  - register a callback for events that are sent from a PD\n\nand the PD context can,\n  - notify it's controlling CP about an event (card read, key press, etc.,)\n  - register a callback for commands issued by the CP\n\n## Language Support\n\n### C/C++ API\n\nLibOSDP core is written in C. It exposes a [minimal set of API][26] to setup\nand manage the life-cycle of OSDP devices. See `include/osdp.h` or\n`include/osdp.hpp` for more details.\n\n### Rust API\n\nLibOSDP is available via [crates.io][10]. See [rust/README.md][11] for more\ninfo and usage examples.\n\n### Python API\n\nLibOSDP is available as a [python package][12]. See [python/README.md][13] for\nmore info and usage examples.\n\n## Supported Commands and Replies\n\nOSDP has certain command and reply IDs pre-registered. This implementation of\nthe protocol support only the most common among them. You can see a list of\ncommands and replies and their support status in LibOSDP [here][22].\n\n## Dependencies\n\n  * A working C compiler; such as gcc, clang or msvc\n  * CMake 3.14 or newer (or GNU Make)\n  * [goToMain/C-Utils][25] submodule\n\nOptionally,\n  * Python3 (host)\n  * [Doxygen][9] (host; for generating API metadata)\n  * [OpenSSL][8] (host and target, optional - recommended)\n  * [MbedTLS][7] (host and target, optional)\n  * [PyTest][5] (host; for running the integrated test suite)\n\n## Compile LibOSDP\n\nLibOSDP provides a lean-build that only builds the core library and nothing\nelse. This is useful if you are cross compiling as it doesn't have any other\ndependencies but a C compiler. Here is an example of how you can cross compile\nLibOSDP to `arm-none-eabi-gcc`.\n\n```\nexport CROSS_COMPILE=arm-none-eabi-\nexport CCFLAGS=--specs=nosys.specs\n./configure.sh\nmake\n```\n\nTo build LibOSDP and all its components you must have CMake version 3.14 (or\nabove) and a C compiler installed. This repository produces a `libosdp.so` and\n`libosdpstatic.a`; so depending on your needs you can link these with `-losdp`\nor `-losdpstatic`, respectively. Downstream CMake projects can consume the\nlibrary with `find_package(libosdp CONFIG REQUIRED)` and link against the\n`libosdp::libosdp` target.\n\nHave a look at `examples/*` for a quick lookup on how to consume this library and\nstructure your application.\n\nYou can also read the [API documentation][26] for a comprehensive list of APIs\nthat are exposed by LibOSDP.\n\n```sh\ngit clone https://github.com/goToMain/libosdp --recurse-submodules\ncd libosdp\ncmake -B build .\ncmake --build build --parallel\n```\n\nRefer to the project links below for more information on build and usage.\n\n### Run the test suite\n\nLibOSDP uses the [PyTest][5] python framework to test changes made to ensure\nwe aren't breaking existing functionalities while adding newer ones. You can\ninstall PyTest in your development machine with,\n\n```sh\npython3 -m pip install pytest\n```\n\nRunning the tests locally before creating a pull request is recommended to make\nsure that your changes aren't breaking any of the existing functionalities. Here\nis how you can run them:\n\n```sh\n./scripts/make-release.sh\n```\n\nTo add new tests for the feature you are working one, see the other tests in\n`pytest` directory.\n\n## Contributions, Issues and Bugs\n\nThe Github issue tracker doubles up as TODO list for this project. Have a look\nat the [open issues][31], PRs in those directions are welcome.\n\nIf you have a idea, find bugs, or other issues, please [open a new issue][28]\nin the github page of this project [https://github.com/goTomain/libosdp][24].\n\nYou can read more on this [here](CONTRIBUTING.md).\n\n## License\n\nThis software is distributed under the terms of Apache-2.0 license. If you don't\nknow what that means/implies, you can consider it is as \"free as in beer\".\n\nOSDP protocol is also open for consumption into any product. There is no need\nto,\n - obtain permission from SIA\n - pay royalty to SIA\n - become SIA member\n\nThe OSDP specification can be obtained from SIA for a cost. Read more at our\n[FAQ page][27].\n\n## Support the development\n\nSince this is no longer a hobby project, it takes time and effort to develop\nand maintain this project. If you are a user and are happy with it, consider\nsupporting the development by donations though my [GitHub sponsors page][15].\nYour support will ensure sustained development of LibOSDP.\n\n[1]: https://img.shields.io/github/v/release/GoToMain/libosdp?display_name=tag\u0026logo=github\n[2]: https://github.com/goToMain/libosdp/releases/latest\n[3]: https://github.com/goTomain/libosdp/workflows/Build%20CI/badge.svg\n[4]: https://github.com/goTomain/libosdp/actions?query=workflow%3A%22Build+CI%22\n[5]: https://docs.pytest.org/en/latest/\n[7]: https://github.com/ARMmbed/mbedtls\n[8]: https://www.openssl.org/\n[9]: https://www.doxygen.nl/index.html\n[10]: https://crates.io/crates/libosdp\n[11]: https://github.com/goToMain/libosdp-rs/tree/master/libosdp\n[12]: https://pypi.org/project/libosdp/\n[13]: https://github.com/goToMain/libosdp/tree/master/python\n[14]: https://doc.osdp.dev/libosdp/debugging\n[15]: https://github.com/sponsors/sidcha\n[16]: https://img.shields.io/pypi/v/libosdp?logo=python\u0026link=https%3A%2F%2Fpypi.org%2Fproject%2Flibosdp%2F\n[17]: https://badges.registry.platformio.org/packages/sidcha/library/LibOSDP.svg\n[18]: https://registry.platformio.org/libraries/sidcha/LibOSDP\n[19]: https://crates.io/search?q=libosdp\n[20]: https://www.securityindustry.org/industry-standards/open-supervised-device-protocol/\n[21]: https://doc.osdp.dev/protocol/\n[22]: https://doc.osdp.dev/protocol/commands-and-replies\n[24]: https://github.com/goTomain/libosdp\n[25]: https://github.com/goTomain/c-utils\n[26]: https://doc.osdp.dev/api/\n[27]: https://doc.osdp.dev/protocol/faq\n[28]: https://github.com/goToMain/libosdp/issues/new/choose\n[31]: https://github.com/goToMain/libosdp/issues\n[32]: https://img.shields.io/vcpkg/v/libosdp\n[33]: https://vcpkg.link/ports/libosdp\n[34]: https://img.shields.io/crates/v/libosdp?style=flat\u0026logo=rust\u0026logoColor=DDD\u0026label=crate%20%3A%20libosdp\u0026link=https%3A%2F%2Fcrates.io%2Fcrates%2Flibosdp\n[35]: https://crates.io/crates/libosdp\n[36]: https://img.shields.io/crates/v/osdpctl?style=flat\u0026logo=rust\u0026logoColor=DDD\u0026label=crate%20%3A%20osdpctl\u0026link=https%3A%2F%2Fcrates.io%2Fcrates%2Fosdpctl\n[37]: https://crates.io/crates/osdpctl\n[38]: https://github.com/goToMain/libosdp/blob/master/include/osdp.h\n[39]: https://github.com/goToMain/libosdp/tree/master/examples\n[40]: https://doc.osdp.dev/libosdp/compatibility\n[41]: https://doc.osdp.dev/libosdp/secure-channel\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosdp-dev%2Flibosdp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosdp-dev%2Flibosdp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosdp-dev%2Flibosdp/lists"}