[riot-devel] Host Name

Janna Om Janna_OM at hotmail.com
Fri Apr 20 12:02:26 CEST 2018


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



________________________________
From: devel <devel-bounces at riot-os.org> on behalf of Gaëtan Harter <gaetan.harter at fu-berlin.de>
Sent: Friday, April 20, 2018 11:29 AM
To: devel at riot-os.org
Subject: Re: [riot-devel] Host Name


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

[https://avatars3.githubusercontent.com/u/5746539?s=400&v=4]<https://github.com/iot-lab/openlab/blob/master/appli/iotlab/lib/iotlab_uid_num_hashtable.c>

iot-lab/openlab<https://github.com/iot-lab/openlab/blob/master/appli/iotlab/lib/iotlab_uid_num_hashtable.c>
github.com
openlab - OpenLab, a FreeRTOS dev env - by HiKoB


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><mailto: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<mailto: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/e7c752bf/attachment.html>


More information about the devel mailing list