This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Assign a mesh-local EID address

Hi Everyone,

Is it possible to programmatically assign a static mesh-local EID IPv6 address to a node in a network? I would like to communicate to individual nodes in the network using the EID addresses. I know the EID IPv6 does not change when the network topology change, but does change after flashing the chip. Is there a way around this?

Parents
  • Hello Roger,

    Thread specification mandates Mesh-Local EID address to be randomly generated after node is commissioned to the network. Node stores this address in non-volatile memory, which makes it persistent over reboot. The Mesh-Local EID however changes, when node is re-commissioned again.

    Note that for development, you can always flash a new firmware without erasing Thread persistent data (where Mesh-Local EID is stored) - simply avoid using --chiperase parameter when using nrfjprog.

    All in all, I can recommend you two ways of solving described problem:

    1. Use otIp6AddUnicastAddress method to assign a new IPv6 address to the Thread interface. Then you have a full control from the application on the IPv6 addresses of the node. Note that you can create additional address based on Mesh-Local Prefix.

    Reference: openthread.io/.../api-ip6

    1. Implement mechanism for node discovery e.g. mDNS or some proprietary one, like we have in nRF5 SDK for Thread in our CoAP examples to perform provisioning.
  • Hello Roger,

    Please add the "--sectorerase" option to the nrfjprog e.g.:

    nrfjprog -f NRF52 --sectorerase --program _build\nrf52840_xxaa.hex

Reply Children
No Data
Related