Hi Haoyang,
welcome to RIOT!
I forward this mail to my colleague Oleg, who is actually doing the same
thing - so I guess he is probably the best one to help you!
Since you already found the mailing list, I took the liberty of replying here
instead.
Yes, I'm working indeed on CCN for RIOT. Until recently, there was a port of
ccn-lite [1] in RIOT. See for example our second last release 2014.12 [2].
However, during refactoring the network stack and due to the increasing
divergence of RIOT's ccn-lite port and the upstream version, we decided to
remove it temporarily and re-integrate it. Hence, I'm currently working
towards this re-integration as a package [3].
@Oleg: do you have already code for CCN-lite @ netapi?
The code I have for now is probably of very limited use for other people, but
I think the main question for you is how to interact with layer 2. Hence, I
would advice to take a look at the default example [4] which provides a very
simple example for dealing with L2 transmissions. You probably also want to
look at the documentation for the gnrc network stack, most particular the
documentation of the netapi [5] and the registry [6]. There's also some
ongoing effort on some more high-level documentation in [7].
Please, don't hesitate to ask more questions here on the list or on IRC.
Cheers,
Oleg
[1] http://www.ccn-lite.net/
https://github.com/cn-uofbasel/ccn-lite
[2] https://github.com/RIOT-OS/RIOT/releases/tag/2014.12
[3] https://github.com/RIOT-OS/RIOT/wiki/External-Libraries
[4] https://github.com/RIOT-OS/RIOT/tree/master/examples/default
[5] http://doc.riot-os.org/group__net__gnrc__netapi.html
[6] http://doc.riot-os.org/group__net__gnrc__netreg.html
[7] https://github.com/RIOT-OS/RIOT/issues/4072#issuecomment-147752215
https://github.com/RIOT-OS/RIOT/pull/4091
Hi Oliver,
Thanks for your quick response! These resources will be very useful for me, I will ask more question here.
The problem I face now is that I want to use the embedded default network stack to make two Atmel R21board to send packet with each other through RF, before I implemented the a new protocol on Network stack. Do you have any experience about that? I did not find many resources online.
Thanks,
Haoyang
Hi Haoyang!
The problem I face now is that I want to use the embedded default network
stack to make two Atmel R21board to send packet with each other through RF,
before I implemented the a new protocol on Network stack. Do you have any
experience about that? I did not find many resources online.
I'm not sure, if I understand your question correctly: by "embedded default
network stack" you mean RIOT's default stack aka gnrc stack? If the answer is
yes, than just take a look at the default example I mentioned in the previous
mail (it has a README and the shell has an online help), flash it to two nodes
and play around by sending messages over the link layer using the `txtsnd`
command.
Cheers,
Oleg
Hi Oleg,
I understand and tried what you said. The problem I faced for a long time is that
- txtsnd: I cannot set the interface, if I use tap0, which will echo: error: invalid interface given.
- I found the tutorial that said using addr, but I do not have the addr command when I use the R21 board.
- And what is the mean for interface for txtsnd to use, if I have /dev/tty.usbmodem* MCU device
Thanks,
Haoyang
Thanks for your answer!
I think I can send data between with each other, but I am puzzled by the realization,
- where can I find the txtsnd source codes?
- Does packet txtsnd sent is through RF based on GNRC protocol, not the serial right?
Thanks,
Haoyang
Hi Martine,
Thank you so much for your patient answer!
I changed hundreds of codes in NETWORK stack for the example of default, which implemented txtsnd and echo a ACK back to the source. However, there is still some puzzles hang over my head:
-
#ifdef MODULE_GNRC_NETIF vs #ifdef MODULE_NETIF: Are they the same definition of MODULE_GNRC_NETIF and MODULE_NETIF?
- I understand one packet is formed by many snipts which use linked list. gnrc_pktbuf_add() is used to form a packet. I add the hardware address on linked layer using gnrc_pkbuf_add with the data payload. For layer 3, layer4, is it okay still use gnrc_pktbuf_add() to link the layer 3, layer 4 header?
- I am not fully understand the type of GNRC_NETTYPE_UNDEF, is it just the data payload? And also for the GNRC_NETTYPE_NETIF, is it the layer 2 snipt type?
Because my main focus will be grab the layer 2 packet and the implement a new protocol I defined on for layer 3, layer 4 in ICN. Thank you for your help!
my changes: https://github.com/haoyangyu/RIOT/commits?author=haoyangyu
Best,
Haoyang