Hi,
I am able to run native build after creating tap.
I run make term PORT=tap0 from the default examples folder.
After running ifconfig this is what I get
/home/RIOT/examples/default/bin/native/default.elf tap0
RIOT native interrupts/signals initialized.
LED_GREEN_OFF
LED_RED_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
main(): This is RIOT! (Version: 2016.03-devel-793-gf7ddeb-Inspiron-N5010)
Native RTC initialized.
Welcome to RIOT!
ifconfig
ifconfig
Iface 4 HWaddr: b2:eb:2d:8b:e2:ca
Source address length: 6
Is something missing here
After that, I try to set the addr via
ifconfig 4 add 2001:db8::1
ifconfig 4 add 2001:db8::1
error: unable to add IPv6 address.
I’ve referred to the following
https://github.com/RIOT-OS/RIOT/wiki/Virtual-riot-network
https://github.com/RIOT-OS/RIOT/wiki/Creating-your-first-RIOT-project
Please advise as to what needs to be done
My aim is to have 2 instances communicate over the tap interface.
Thanks,
Suvrat
Hello Suvrat,
Could you try the same steps again with the gnrc_networking
example
instead of the default
example?
Best,
Cenk
Hi,
I used the same steps with the “gnrc_networking” example, txtsnd still does not work for me.
eg
txtsnd 6 fe80::38d0:c2ff:fef4 Hello
error: invalid address given
txtsnd 6 ff02::1:fff4:787 Hello
this one does not return any error but the message “Hello” is not received on the other end. ping6 works as below.
ping6 3 ff02::1:fff4:787
12 bytes from fe80::38d0:c2ff:fef4:787: id=83 seq=1 hop limit=64 time = 0.441 ms
12 bytes from fe80::38d0:c2ff:fef4:787: id=83 seq=2 hop limit=64 time = 0.723 ms
12 bytes from fe80::38d0:c2ff:fef4:787: id=83 seq=3 hop limit=64 time = 0.793 ms
— ff02::1:fff4:787 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2.062811 s
rtt min/avg/max = 0.441/0.652/0.793 ms
Hi Suvrat,
`txtsnd` is used to send link-layer packets so using IPv6 addresses
with it won't work of course (it excepts them however since they are
also hexadecimal strings and gives thus no warning). You have to use a
hardware address with it.
However, I just realized that the documentation doesn't really reflect
that. I've opened an issue to fix that:
https://github.com/RIOT-OS/RIOT/issues/4997
Cheers,
Martine
hmmm,
still does not work with hwaddr for me
tap1 instance
ifconfig
ifconfig
Iface 4 HWaddr: 26:77:52:80:c9:00
Source address length: 6
tap0 instance
ifconfig
ifconfig
Iface 4 HWaddr: b2:08:44:51:74:4b
Source address length: 6
txtsnd
txtsnd
usage: txtsnd [|bcast]
txtsnd 4 26:77:52:80:c9:00 Hello
txtsnd 4 26:77:52:80:c9:00 Hello
Hi,
That’s unusual, since you receiving IPv6 data (with ping). Which application are you using? As far as I can see gnrc_networking isn’t registering any server for GNRC_NETTYPE_NETIF
(which would be to required for printing received link-layer information).
Cheers,
Martine
Hi,
you can by editing the applications main.c e.g.:
#include "net/gnrc/pktdump.h"
#include "net/gnrc/netreg.h"
int main() {
gnrc_netreg_entry_t dump;
dump.pid = gnrc_pktdump_getpid();
dump.demux_ctx = GNRC_NETREG_DEMUX_CTX_ALL;
gnrc_netreg_register(GNRC_NETTYPE_NETIF, &dump);
/* rest of main() */
}
Buuuut, that would cause to also print ALL the other packets that are
send over the link layer (i.e. the 6LoWPAN data), not just the packets
send with `txtsnd`.
Cheers,
Martine