Host Name

Hello! Is it possible with RIOT OS to get access to the host name? I’m working with iot-lab m3 nodes and trying to get their ids or host names. I’m trying to make the node m3-id running my application to be aware that its hostname is m3-id or that its ID = id. Is there any possibility to achieve this goal. Thank You in advance!

Kind regards, Jana

Hello Jana,

If you’re looking for a way to distinguish nodes based on their hardware, this might be what you want:

Cheers, Ludwig

Hello Jana,

in the IoT-LAB freertos port there is a dictionary for node short-id -> node name:

There is also the script to update it in case nodes have been changed. You could adapt it in RIOT. The short-id used is this one: .

If you are only interested in having your current node information, and not resolve other nodes, you can also get this information from the control node i2c link.

It is not really advertised but the code is available here:

As I wrote it back then, I could do the port for RIOT if you are interested.



Hello, thank You very much for the answers. I’m implementing network coding, and need IDs with low memory consumption to distinguish the nodes of the network. Unfortunately CPU Ids of the sensor nodes aren’t unique and need space. I will try to adopt freertos UIDs for these needs. Thank You very much again for the information.

Kind regards, Jana