Now I'am trying to set my RPL-Border-Router so, that he gives every new Node an
prefix like aaaa:: or bbbb::
I'am a little bit confused, because I have once a code-snippet in "udp-client.c"
and one in "contiki-main.c" where the address/prefix is set.
set_global_address(void)
{
uip_ipaddr_t ipaddr;
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
...
so it looks in my client. I agree the now every client i flash got the prefix
aaaa ! But I don't want a static prefix. I want that my RPL-Border Router gives
every node an prefix like "aaaa"!
Did some body could help me or give me some helpfull tips!
Thank you.
greetz
Patrick
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Contiki-developers mailing list
Contiki-d...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/contiki-developers
The prefix of the RPL-Border-router is dissiminated in the DIO message. When your RPL-UDP-Client receives the DIO message for the first time, it calls the join-dag function in which the new prefix is set.(aaaa:: or other one)
regards,
Mathieu
-----Message d'origine-----
De : Patrick [mailto:patri...@googlemail.com]
Envoyé : lundi 21 novembre 2011 15:59
À : contiki-d...@lists.sourceforge.net
Objet : [Contiki-developers] RPL-Border-Router doesn't set Prefix for nodes!
-----Original Message-----
From: Patrick
Sent: Monday, November 21, 2011 9:59 AM
To: contiki-d...@lists.sourceforge.net
Subject: [Contiki-developers] RPL-Border-Router doesn't set Prefix for nodes!
Hello everybody, i'am working with the following three Boards:
1. Econotag ( RPL-Border-Router )
2. Econotag ( RPL-UDP-Client )
3. Raven ( RPL-UDP-Client )
Now I'am trying to set my RPL-Border-Router so, that he gives every new Node an
prefix like aaaa:: or bbbb::
I'am a little bit confused, because I have once a code-snippet in "udp-client.c"
and one in "contiki-main.c" where the address/prefix is set.
set_global_address(void)
{
uip_ipaddr_t ipaddr;
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
...
so it looks in my client. I agree the now every client i flash got the prefix
aaaa ! But I don't want a static prefix. I want that my RPL-Border Router gives
every node an prefix like "aaaa"!
Did some body could help me or give me some helpfull tips!
aaaa:: has the advantage of making smaller 6lowpan packets since it is the
default stateful prefix. Wireshark dumps will be confusing unless this is
mechanism is understood, so I agree start with something else that will have
long 6lowpan ipv6 addresses (which might be an assigned ipv6 subnet) and
later make that the stateful prefix when you want to minimize packet
lengths.
Abdellatif
Sent: Monday, November 21, 2011 10:32 AM
To: Contiki developer mailing list
Subject: Re: [Contiki-developers] RPL-Border-Router doesn't set Prefix
fornodes!
The clients do set their own ip addresses using this code u mentioned.
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
/* Here is the prefix aaaa set! */
uip_netif_addr_add(&ipaddr, 64, 0, AUTOCONF);
}
------------------------------------------------------------
And in the source file"contiki-raven-main.c" i found the following important
paragraph:
-------------------------------------------------------------------
/* Add addresses for testing */
#if 0
{
uip_ip6addr_t ipaddr;
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
// uip_ds6_prefix_add(&ipaddr,64,0);
}
#endif
-------------------------------------------------
But now if i comment out some lines with the aaaa in the source file "rpl-udp-
client.c" the prefix will taken if I flash the board from the contiki-raven-
main.c
Could someone please tell me what i need to change in the two files that the UDP
Client will get an Prefix from the RPL-Border-Router `?
Thanks
What version of contiki are you using? That uip_netif_addr_add is the pre
contiki-2. call I think.
-----Original Message-----
From: Patrick
Sent: Monday, November 21, 2011 12:48 PM
To: contiki-d...@lists.sourceforge.net
Subject: Re: [Contiki-developers] RPL-Border-Router doesn't set Prefix
fornodes!
After that i edited the following Files for the UDP-CLient. First i edited
the udp-client.c File where i had the following Part:
/*---------------------------------------------------------------------------*/
static void
set_global_address(void)
{
uip_ipaddr_t ipaddr;
uip_ip6addr(&ipaddr, 0xbbbb, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
Here i set the Prefix "bbbb", because i wanted to see that the UDP-CLient
gets the "aaaa" Prefix from the RPL-Border-Router! Now i flashed the UDP-Client
which works and i also could see him in the webbrowser. But if i sniff the
UDP-Traffic
with an Raven-Sniffer on RF-Channel 26 i only see that the UDP Client has
the IPv6-Address: bbbb::11:22ff:fe33:4452 but doesn't get an "aaaa" Prefix
from the Border-Router!
Did I have to edit something else in the Border-Router or my UDP-CLient ?
Greetz
uip_ip6addr(&ipaddr, 0xbcbc, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
...
--------------------------------------------------------
And in the contiki-mc1322x.c i see the following part from which the UDP-CLient
takes his IPv6-Address with Prefix.
--------------------------------------------------------
if(1) {
uip_ipaddr_t ipaddr;
int i;
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_TENTATIVE);
...
--------------------------------------------------------
If i flashed my UDP-CLient Econotag the function print_local_addresses shows me
that:
bcbc::11:22ff:fe33:4451
aaaa::11:22ff:fe33:4451
fe80::11:22ff:fe33:4451
And wth my Raven Sniffer i see that the UDP-CLient has the Ipv6-Address:
aaaa::11:22ff:fe33:4451, that which i gets from the contiki-mc.1322x.c
Maybe somebody could help me why it is so ?
-----Original Message-----
From: Patrick
Sent: Tuesday, November 22, 2011 7:13 AM
To: contiki-d...@lists.sourceforge.net
Subject: Re: [Contiki-developers]RPL-Border-Router doesn't set Prefix
fornodes!