[riot-devel] Host Name

Gaëtan Harter gaetan.harter at fu-berlin.de
Fri Apr 20 11:29:36 CEST 2018


Hello Jana,


in the IoT-LAB freertos port there is a dictionary for node short-id -> 
node name: 
https://github.com/iot-lab/openlab/blob/master/appli/iotlab/lib/iotlab_uid_num_hashtable.c

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: 
https://github.com/iot-lab/iot-lab/wiki/Lib-iotlab_uid.


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:

https://github.com/iot-lab/openlab/blob/master/appli/iotlab/periph/iotlab_i2c/iotlab_i2c.c

https://github.com/iot-lab/openlab/blob/master/appli/iotlab/periph/iotlab_i2c/iotlab_i2c_.h

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


Regards,

Gaëtan


On 20.04.2018 03:58, Ludwig Knüpfer wrote:
> Hello Jana,
>
> If you're looking for a way to distinguish nodes based on their 
> hardware, this might be what you want:
> http://riot-os.org/api/group__drivers__periph__cpuid.html
>
> Cheers,
> Ludwig
>
> Am 19. April 2018 21:18:30 MESZ schrieb Janna Om <Janna_OM at hotmail.com>:
>
>     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
>
>
>
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20180420/991bfab2/attachment.html>


More information about the devel mailing list