|
From: Angel I. C. R. <al0...@gm...> - 2016-08-24 10:23:55
|
Hi Mr Lovelesh.
I found this NODEID mechanism useful to automate generation of different
images with well-known IPv6s addresses using a shell script. For example,
this works fine:
$# /bin/sh
for id in 1 2 3 4
do
make TARGET=openmote NODEID=$id
cp prog.bin prog-$id.bin
done
In fact, this mechanism still works with CC2538 (OpenMote) platforms. I
understand it as a special case of IEEE_ADDR_CONF_HARDCODED=1.
However, if this is an old/deprecated mechanism, maybe should be removed
from repository, because the lack of documentation and the bunch of
supported architectures, each with their own documentation/mechanisms,
makes the experience with Contiki becoming a nightmare for the
inexperienced user.
At least, for me now its completely clear.
Thank you very much for your effort and time trying to clarify this issue!
:D
Kind regards.
2016-08-24 5:31 GMT+02:00 Lovelesh Patel <lov...@gm...>:
> Hi Angel,
>
> NODEID was preliminary mechanism used in some MSP430 motes for example
> wismote. By mentioning NODEID you can set a static address to the device.
> In case of wismote NODEID=4 would make IP as fe80::200:0:0:4
>
> But coming back to CC2538, this mechanism is not required as you have
> better control over the IP address now.
>
> On Tue, Aug 23, 2016 at 3:12 PM Angel Ivan Castell Rovira <
> al0...@gm...> wrote:
>
>> 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/
>> ------------------------------------------------------------
>> ------------------
>> _______________________________________________
>> 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/
|