Re: [riot-devel] Connectivity between new NG stack and loopback

2015-07-27 Thread Lennart Dührsen
Hi everyone,

I'm sorry for answering so late (I had some other things to take care
of), and I would like to thank you for your help.

The reason why this wasn't working on my system was just my firewall
that interfered. After turning it off, everything worked just as you
described.

To make it easier for other newcomers, who might have to deal with this,
I created a wiki article that describes how to talk to your RIOT process
and mentions some of the pitfalls. It's not published yet, for now it's
just a gist, but feel free to check it out:

https://gist.github.com/backenklee/2dbdaae90af5b5878200

If you feel like something is missing or think something could be
improved, please let me know.

Cheers,
Lennart

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


Re: [riot-devel] Connectivity between new NG stack and loopback

2015-06-25 Thread Alexandru Razvan Caciulescu
Hello Lennart,

Did you by any chance forgot to edit the makefile to include the module for
ng_nativenet and recompile?

Cheers,
Alex

2015-06-25 18:49 GMT+03:00 Cenk Gündogan cenk.guendo...@fu-berlin.de:

 Hello Lennart,

 On 25.06.2015 16:14, Lennart Dührsen wrote:

 the method you suggested now works halfway for me, but I still can't

 that's half the battle (:

 linux~ nc -u fe80::b400:b1ff:fe63:f33d%tap0 54545

 Using nc without the -l flag will start a udp client and connect to the
 riot server. You will however not be able to receive messages on Linux
 without starting a udp server (-l flag). You need to also specify the
 tap0's ipv6 address here  f33c  with the %tap0 suffix, instead of riot's
 ipv6 address, in order to listen on the tap0 device.

 Additionally, what I don't really understand is how one device (tap0)
 can have two IPv6 addresses. In the default example for RIOT, where two

 In general, it is completely valid for a device to have multiple ipv6
 addresses. However, this is not the case in this situation. In Linux you
 should only see one ipv6 address when you use ip/ifconfig on tap0 with
 this method.

 I am not really experienced enough to tell how ng_nativenet utilizes the
 tun/tap interface in detail.. Maybe it's possible to use tap0 and tap1 and
 the additional bridge to establish a connection between riot and linux..
 But one tap interface seems to be sufficient for this purpose.

 Btw, using nc as you initially described did not produce any output on
 either side (nc -ul fe80:...:f33c%tap0 54545).

 Could you try this again and re-check the ipv6 addresses you used? I don't
 know why this shouldn't work..

 Best,
 Cenk

 ___
 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


Re: [riot-devel] Connectivity between new NG stack and loopback

2015-06-25 Thread Cenk Gündogan

Hello Lennart,

On 25.06.2015 16:14, Lennart Dührsen wrote:

the method you suggested now works halfway for me, but I still can't

that's half the battle (:

linux~ nc -u fe80::b400:b1ff:fe63:f33d%tap0 54545
Using nc without the -l flag will start a udp client and connect to the 
riot server. You will however not be able to receive messages on Linux 
without starting a udp server (-l flag). You need to also specify the 
tap0's ipv6 address here  f33c  with the %tap0 suffix, instead of 
riot's ipv6 address, in order to listen on the tap0 device.

Additionally, what I don't really understand is how one device (tap0)
can have two IPv6 addresses. In the default example for RIOT, where two
In general, it is completely valid for a device to have multiple ipv6 
addresses. However, this is not the case in this situation. In Linux you 
should only see one ipv6 address when you use ip/ifconfig on tap0 with 
this method.


I am not really experienced enough to tell how ng_nativenet utilizes the 
tun/tap interface in detail.. Maybe it's possible to use tap0 and tap1 
and the additional bridge to establish a connection between riot and 
linux.. But one tap interface seems to be sufficient for this purpose.

Btw, using nc as you initially described did not produce any output on
either side (nc -ul fe80:...:f33c%tap0 54545).
Could you try this again and re-check the ipv6 addresses you used? I 
don't know why this shouldn't work..


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


Re: [riot-devel] Connectivity between new NG stack and loopback

2015-06-25 Thread Alexandru Razvan Caciulescu
Hello Cenk,

I tried your method and it works !
Thanks for the help !

Cheers,
Alex

2015-06-24 20:34 GMT+03:00 Cenk Gündogan cenk.guendo...@fu-berlin.de:

 Hello Lennart,

 I might be wrong and Sebastian might be able to shed some light on this,
 BUT
 isn't marz restricted to the old network stack? As far as I know it
 strips/adds the old nativenet header from outgress/ingress packets.

 BTW, are you also using the old network stack? My described method works
 only for the new network stack and with ng_nativenet (:

 cheers,
 CG


 On 24.06.2015 19:27, Lennart Dührsen wrote:

 Hi Alex,

 have a look at the microcoap example [1], which uses marz [2] to connect
 the RIOT node with your »normal« localhost. The RIOT application in this
 example is a just a server (and only reacts on requests), but it
 shouldn't be too hard to extend/customize.

 The marz code is a bit spaghetti like, and maybe I will build a better
 solution in the near future, as I need the same functionality you do for
 testing a gateway.

 As for the microcoap example: beware of pip, you may want to install
 Twisted and bidict manually by downloading it from the respective
 websites, because (on my system) pip installed only parts of the
 libraries. Also, check the $PYTHONPATH variable and which version of
 python the respective file/program uses when things don't work, this
 caused some trouble for me.

 As soon as I know more, I'll let you know.

 The method described by Cenk did not work for me, but I'll try and make
 that (or something similar) work as well.

 Best,
 Lennart


 [1] https://github.com/RIOT-OS/applications/tree/master/microcoap

 [2] https://github.com/sgso/marz
 ___
 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

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


[riot-devel] Connectivity between new NG stack and loopback

2015-06-24 Thread Alexandru Razvan Caciulescu
Hello everyone,

I'm new to RIOT and currently trying to test the connectivity between a
RIOT instance on native and the loopback. I'm currently using the
ng_networking.elf from the examples and while I can pass messages between 2
RIOT instances using this example I would also like to be able to have a
connection with the loopback on my machine for future tests but I can't
seem to make it work.
If someone could give me a quick walkthrough or help me figure out where my
mistake is I would really appreciate it. I'm sure this must seem trivial .

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


Re: [riot-devel] Connectivity between new NG stack and loopback

2015-06-24 Thread Cenk Gündogan

Hello Alexandru,

I am not certain that this method is bullet-proof, but you can try the 
following:


* Create a tun/tap interface:
 sudo openvpn --mktun --dev tap0
[FYI: I did not test this method with the tapsetup script]

* Enable the interface:
 sudo ip link set dev tap0 up

* start ng-nativenet
 make term PORT=tap0
[FYI: Starting RIOT with tap0 will assign an ip address to tap0]

* In Linux: lookup the ipv6 address of tap0
 ifconfig tap0

* Start a udp server on Linux
 nc -ul ip-address of tap0%tap0 13377
[ It is necessary to use the suffix %tap0 in order to give a hint to 
Linux that this is a tun/tap device]


* In RIOT: start a udp server and happily communicate with linux
 udp server start 13377
 udp send ip-address of tap0 13377 HELLO-RIOT

* In Linux: netcat will receive this message and you can reply by just 
typing something in your shell


I hope this helps

cheers,
Cenk

On 24.06.2015 10:40, Alexandru Razvan Caciulescu wrote:

Hello everyone,

I'm new to RIOT and currently trying to test the connectivity between 
a RIOT instance on native and the loopback. I'm currently using the 
ng_networking.elf from the examples and while I can pass messages 
between 2 RIOT instances using this example I would also like to be 
able to have a connection with the loopback on my machine for future 
tests but I can't seem to make it work.
If someone could give me a quick walkthrough or help me figure out 
where my mistake is I would really appreciate it. I'm sure this must 
seem trivial .


Thank you,
Alex


___
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


Re: [riot-devel] Connectivity between new NG stack and loopback

2015-06-24 Thread Lennart Dührsen
Hi Alex,

have a look at the microcoap example [1], which uses marz [2] to connect
the RIOT node with your »normal« localhost. The RIOT application in this
example is a just a server (and only reacts on requests), but it
shouldn't be too hard to extend/customize.

The marz code is a bit spaghetti like, and maybe I will build a better
solution in the near future, as I need the same functionality you do for
testing a gateway.

As for the microcoap example: beware of pip, you may want to install
Twisted and bidict manually by downloading it from the respective
websites, because (on my system) pip installed only parts of the
libraries. Also, check the $PYTHONPATH variable and which version of
python the respective file/program uses when things don't work, this
caused some trouble for me.

As soon as I know more, I'll let you know.

The method described by Cenk did not work for me, but I'll try and make
that (or something similar) work as well.

Best,
Lennart


[1] https://github.com/RIOT-OS/applications/tree/master/microcoap

[2] https://github.com/sgso/marz
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Connectivity between new NG stack and loopback

2015-06-24 Thread Cenk Gündogan

Hello Lennart,

I might be wrong and Sebastian might be able to shed some light on this, BUT
isn't marz restricted to the old network stack? As far as I know it 
strips/adds the old nativenet header from outgress/ingress packets.


BTW, are you also using the old network stack? My described method works 
only for the new network stack and with ng_nativenet (:


cheers,
CG

On 24.06.2015 19:27, Lennart Dührsen wrote:

Hi Alex,

have a look at the microcoap example [1], which uses marz [2] to connect
the RIOT node with your »normal« localhost. The RIOT application in this
example is a just a server (and only reacts on requests), but it
shouldn't be too hard to extend/customize.

The marz code is a bit spaghetti like, and maybe I will build a better
solution in the near future, as I need the same functionality you do for
testing a gateway.

As for the microcoap example: beware of pip, you may want to install
Twisted and bidict manually by downloading it from the respective
websites, because (on my system) pip installed only parts of the
libraries. Also, check the $PYTHONPATH variable and which version of
python the respective file/program uses when things don't work, this
caused some trouble for me.

As soon as I know more, I'll let you know.

The method described by Cenk did not work for me, but I'll try and make
that (or something similar) work as well.

Best,
Lennart


[1] https://github.com/RIOT-OS/applications/tree/master/microcoap

[2] https://github.com/sgso/marz
___
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