Skip to content
Alexandre Abadie edited this page Apr 27, 2018 · 1 revision

IoT-LAB nodes feature an easy-to-use 16 bits unique ID which can be handy e.g. for logging or defining well-known addresses.

The iotlab_uid mechanism is based on the node's underlying uid chip API and is exposed as simple static inline for C code to use. Provided UIDs are guaranteed to be unique for a given radio type nodes across the whole testbed (m3/a8-m3:at86rf231, wsn430:cc1101 and wsn430:cc2420).

The code for M3/A8-M3 nodes is available here, sample usage is available here.

The definition is as follows:

static inline uint16_t iotlab_uid() {
    return (uid->uid8[8] | (uid->uid8[10] << 7)) << 8 | uid->uid8[9];
}

M3 / A8-M3 UID

The iotlab M3 and A8-M3 nodes are using the nodes CPU stm32 96bits unique device identifier to calculate the uid.

To find the formula, all nodes CPU id was saved during hardware tests and then post-processed to try extracting two valuable bytes. Common bits where removed and remaining ones where mixed to find the final 16bits.

It was test driven to be unique for all nodes with at86rf231 radios on the testbed.

Clone this wiki locally