|
From: Angel I. C. R. <al0...@gm...> - 2016-08-23 09:40:19
|
Yes, your answer is very clear and solves my question perfectly. This
information should be included in some contiki's guide, just for reference
of others.
I have investigated this issue more deeply. The user can also define 2 LSB
of the IEEE MAC address (IPv6 related address) at build time, defining
variable NODEID when launching 'make' command. For example,
$ make TARGET=openmote NODEID=0x1234
will result in a IEEE MAC address with last two bytes set to 0x12 0x34
I suppose this method has only sense when IEEE_ADDR_CONF_HARDCODED is equal
to 1.
Thank you very much for your answer, Mr. Lovelesh! :)
2016-08-22 21:17 GMT+02:00 Lovelesh Patel <lov...@gm...>:
> Hi Angel,
>
> In case of cc2538, there are 2 ways to generate IEEE MAC addresses which
> are in turn used to generate IPV6 addresses in Contiki.
>
> If IEEE_ADDR_CONF_HARDCODED is 0 then actual MAC address of CC2538 is
> used to generate IPv6 address. There is a standard mechanism to generate
> the local IPv6 address from IEEE MAC address.
> PROS: As IPv6 addresses are unique, IPv6 conflict is not possible.
> CONS: You need login in every mote to determine the IPv6 address or check
> BR webpage for new nodes.
>
> If IEEE_ADDR_CONF_HARDCODED is 1 then you can override the IEEE MAC of
> CC2538 and use your defined MAC to generate local IPv6 address. The
> procedure to generate IPv6 from MAC is same in both cases. This approach is
> useful when you want static IPv6 addresses in your network.
> PROS: As you manually assign the IPv6 addresses, you have better control
> over the addressing.
> CONS: Chances of having IP conflict if care is not taken while programming.
>
> If IEEE MAC is 00:12:4B:00:89:AB:CD:EF then local IPv6 address would be
> fe80::0012:4B00:89AB:CDEF
>
> Hope I have answered your query.
>
> Regards,
> Lovelesh
>
>
> On Mon, Aug 22, 2016 at 8:48 PM Angel Ivan Castell Rovira <
> al0...@gm...> wrote:
>
>> Hi forum.
>>
>> File contiki-conf.h for the OpenMote platform specifies a
>> IEEE_ADDR_CONF_HARDCODED macro predefined with value 0, what means: "Read
>> from InfoPage".
>>
>> /**
>> * \brief Location of the IEEE address
>> * 0 => Read from InfoPage,
>> * 1 => Use a hardcoded address, configured by IEEE_ADDR_CONF_ADDRESS
>> */
>> #ifndef IEEE_ADDR_CONF_HARDCODED
>> #define IEEE_ADDR_CONF_HARDCODED 0
>> #endif
>>
>> /**
>> * \brief The hardcoded IEEE address to be used when
>> IEEE_ADDR_CONF_HARDCODED
>> * is defined as 1
>> */
>> #ifndef IEEE_ADDR_CONF_ADDRESS
>> #define IEEE_ADDR_CONF_ADDRESS { 0x00, 0x12, 0x4B, 0x00, 0x89, 0xAB,
>> 0xCD, 0xEF }
>> #endif
>>
>> Where is that "InfoPage" available in the OpenMote platform? And how can
>> be used to set the IPv6 address of mote?
>>
>> Thanks in advance!
>>
>> Best regards,
>>
>> ------------------------------------------------------------
>> ------------------
>> _______________________________________________
>> Contiki-developers mailing list
>> Con...@li...
>> https://lists.sourceforge.net/lists/listinfo/contiki-developers
>>
>
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> Contiki-developers mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/contiki-developers
>
>
--
al004140 - Ivan Castell
Registered Linux User #386573
Registered Ubuntu User #11676
Blogspot - http://aicastell.blogspot.com/
|