Re: [riot-devel] new network stack mini howto

2015-04-12 Thread Martine Lenders
Hi,

2015-04-12 11:33 GMT+02:00 Kaspar Schleiser :

> Hey Martine,
>
> thanks a lot, that was what I was looking for!
>
> On 04/11/15 22:31, Martine Lenders wrote:
>
>> Just take the current ng_icmpv6/feat/initial branch in my repo (PR'ed in
>> #2555) + your favorite device driver. Start your device in a nomac
>> thread (look into tests/driver_xbee for how to do it) and add
>> ng_icmpv6_echo, ng_netbase and ng_nomac to your application's modules.
>> Currently you have to set up your local IP addresses by hand using
>> ifconfig in the shell and you also have to populate the neighbor cache
>> with the ncache command.
>>
> That's exactly what I needed. I can now ping6 a native instance of riot
> using the dev_eth+tap driver.
>

Great!


> […]
>
> - our native tap drivers take the mac address from the tap interface. if
> using the same tap interface on the host, the mac addresses collide. I
> solved this by just incrementing the last byte of tap's mac address. As tap
> mac addresses are random, that *should* be ok with 1:2^48 probability,
> right?
>

Ah, why did I not realize this by now m). I think as an initial address
this is alright, but maybe you can allow for the user to set the MAC
address (using ng_netdev_driver_t::set) for the host side of the TAP then,
too.


>
> - (bug in icmpv6? [1])
>

Fixed


>
> It seems very reliable and quite fast:
> --snip--
> [kaspar@localhost sys]$ sudo ping6 2001:db8::2 -f -c 10
> PING 2001:db8::2(2001:db8::2) 56 data bytes
> ..
> --- 2001:db8::2 ping statistics ---
> 10 packets transmitted, 8 received, 0% packet loss, time 5905ms
> rtt min/avg/max/mdev = 0.028/0.040/1.384/0.017 ms, ipg/ewma 0.059/0.045 ms
> [kaspar@localhost sys]$
> --snip--
>

Awesome! :3

Cheers,
Martine
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] new network stack mini howto

2015-04-12 Thread Kaspar Schleiser

Hey Martine,

thanks a lot, that was what I was looking for!

On 04/11/15 22:31, Martine Lenders wrote:

Just take the current ng_icmpv6/feat/initial branch in my repo (PR'ed in
#2555) + your favorite device driver. Start your device in a nomac
thread (look into tests/driver_xbee for how to do it) and add
ng_icmpv6_echo, ng_netbase and ng_nomac to your application's modules.
Currently you have to set up your local IP addresses by hand using
ifconfig in the shell and you also have to populate the neighbor cache
with the ncache command.
That's exactly what I needed. I can now ping6 a native instance of riot 
using the dev_eth+tap driver.


What I stumpled upon on the way:

- also have to populate the neighbour cache of the Linux box I used to 
ping from (doh)


- our native tap drivers take the mac address from the tap interface. if 
using the same tap interface on the host, the mac addresses collide. I 
solved this by just incrementing the last byte of tap's mac address. As 
tap mac addresses are random, that *should* be ok with 1:2^48 
probability, right?


- (bug in icmpv6? [1])

It seems very reliable and quite fast:
--snip--
[kaspar@localhost sys]$ sudo ping6 2001:db8::2 -f -c 10
PING 2001:db8::2(2001:db8::2) 56 data bytes
..
--- 2001:db8::2 ping statistics ---
10 packets transmitted, 8 received, 0% packet loss, time 5905ms
rtt min/avg/max/mdev = 0.028/0.040/1.384/0.017 ms, ipg/ewma 0.059/0.045 ms
[kaspar@localhost sys]$
--snip--

Kaspar

[1] https://github.com/RIOT-OS/RIOT/pull/2555/files#r28201992 )
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] new network stack mini howto

2015-04-11 Thread Martine Lenders
Hey Kaspar,
Just take the current ng_icmpv6/feat/initial branch in my repo (PR'ed in
#2555) + your favorite device driver. Start your device in a nomac thread
(look into tests/driver_xbee for how to do it) and add ng_icmpv6_echo,
ng_netbase and ng_nomac to your application's modules. Currently you have
to set up your local IP addresses by hand using ifconfig in the shell and
you also have to populate the neighbor cache with the ncache command.

Then you can use the ping6 command to send echo requests. Echo relies are
answered automatically in the background. If you want to dump them to the
terminal register ng_pktdump for NG_NETTYPE_ICMPV6 (merge branch
pktdump/feat/dump-ipv6 (#2741) for nicer output).

If you need 6LoWPAN, merge the branch ng_sixlowpan_frag/feat/initial
(#2781) and add the module ng_sixlowpan_frag, but be aware that I need to
test if the reassembly on receive is working, yet ;). 6LoWPAN needs to be
initialized for the interface too. For now using ifconfig  6lo (or
simply set the NG_IPV6_NETIF_FLAGS_SIXLOWPAN flag for the ng_ipv6_netif_t
of your interface in your code).
Hope this was helpful.

Cheers,
Martine
Am 11.04.2015 12:15 schrieb "Kaspar Schleiser" :

> Hey guys,
>
> is there any kind of example on how to set up the new network stack as far
> as currently possible?
>
> So many PR's, components, etc. and all I want is ping my node...
>
> Kaspar
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] new network stack mini howto

2015-04-11 Thread Kaspar Schleiser

Hey guys,

is there any kind of example on how to set up the new network stack as 
far as currently possible?


So many PR's, components, etc. and all I want is ping my node...

Kaspar

___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel