# How does libcacard implement automatic allocation of node ID?

**URL:** <https://forum.opencyphal.org/t/how-does-libcacard-implement-automatic-allocation-of-node-id/593>\
**Category:** Libcanard\
**Created:** [August 15, 2019, 8:52am UTC](https://forum.opencyphal.org/t/how-does-libcacard-implement-automatic-allocation-of-node-id/593 "2019-08-15T08:52:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YGQ](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/y/97f17d/32.png) [@YGQ](https://forum.opencyphal.org/u/YGQ)\
**Post date:** [August 15, 2019, 8:52am UTC](https://forum.opencyphal.org/t/how-does-libcacard-implement-automatic-allocation-of-node-id/593/1 "2019-08-15T08:52:20Z")

</div>

I currently use canardSetLocalNodeID to assign an ID, but I want to use dynamic allocation, as if I don’t have this feature in libcanard

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [August 15, 2019, 11:45am UTC](https://forum.opencyphal.org/t/how-does-libcacard-implement-automatic-allocation-of-node-id/593/2 "2019-08-15T11:45:21Z")

</div>

Libcanard does not contain any application-layer logic, so you’ll have to implement that yourself. Start from this demo app:

> <https://github.com/UAVCAN/libcanard/blob/master/tests/demo.c>
