Long HW Address/MAC address Issue - telosB

Hello everyone,

I am trying to get the Mac address of multiple telosB devices. I am using riot shell to do this via ifconfig command. Problem, shell displays exactly same address for all the devices.

I tried sending/receiving data using same address. As expected, sender telosb is also receiving its own data/packet (apart from designated receiver telosb). Address I am getting is: “22:23:23:23:23:23:23:23”

I tried using Contiki to fetch the address and use that address. But, packet/data does not get delivered to that address.

Is there a way around this? Please let me know, thank you.

Regards,

Navneet Pandey

Hi,

in RIOT the MAC address is basically generated from the CPUID and in case of it's absence a static fallback value is incorporated. The msp430s don't provide CPUIDs so the latter is the case.

The driver sets up the MAC address during initialization: https://github.com/RIOT-OS/RIOT/blob/master/drivers/cc2420/cc2420.c#L55

The generic "luid" module uses a backup seed (LUID_BACKUP_SEED) which is overwritten in a CPUID is present (which isn't the case for msp430): https://github.com/RIOT-OS/RIOT/blob/master/sys/luid/luid.c#L51

The backup seed is set here and can be overwritten: https://github.com/RIOT-OS/RIOT/blob/master/sys/include/luid.h#L67

Cheers Peter

Hello Peter, thanks for answering my question. I just had one follow-up question.