Re: [riot-devel] module documentation

2015-11-22 Thread Haoyang Yu
Hi Martine,

I understood the idea behind the concept. Thank you very much!

I came across a question about all the 

#ifdef MODULE___XXX, just like #ifdef MODULE_GNRC_NDP_ROUTER, 
MODULE_GNRC_NDP 

I have no idea where do the source code defined them, how was the name defined?

Thank you for your quick reply.

Cheers,
Haoyang


> On Nov 18, 2015, at 18:08, Martine Lenders <authmille...@gmail.com> wrote:
> 
> Hi Haoyang, 
> pseaudo-modules are used to describe certain module configurations (and macro 
> settings) in a way that is easy and convenient to use for a user. For 
> example: Without reading a lot about how networking is working under the 
> hoodit might not be immediately clear that for normal IPv6 communication you 
> need NDP and thus ICMPv6. The module `gnrc_ipv6_default` provides a user with 
> these modules without the requirement to know everything about our network 
> stack, while an experienced user might want to choose to exclude NDP to 
> optimize for size and configure the address resolution manually.
> 
> If gnrc_netif_default pulls in 6LoWPAN without the presence of IPv6 this is 
> definitely an error of the dependencies. I will look into it tomorrow.
> 
> Good night (from Berlin), 
> Martine
> 
> Am 18.11.2015 22:26 schrieb "Haoyang Yu" <haoyang...@rutgers.edu 
> <mailto:haoyang...@rutgers.edu>>:
> Hello Martine,
> 
> Thanks for you answer, right now I fully understand how it works. But why do 
> we need Pseudo-modules? Can we use other modules directly without indirect 
> way. 
> 
> My last question is there is a note that:
> # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
> I use module only for gnrc_netif_default, it seems include the 6LoWPAN module 
> too?
> 
> Thanks!
> Haoyang
> 
>> On Nov 18, 2015, at 01:18, Martine Lenders <authmille...@gmail.com 
>> <mailto:authmille...@gmail.com>> wrote:
>> 
>> Hello Haoyang,
>> gnrc_netif_default is a pseudo-module, defined in Makefile.pseudomodules. 
>> Pseudo-modules are modules, that don't have code, but are used by the 
>> build-system to collect other modules as dependencies or to express a 
>> certain build configuration. gnrc can be found in `sys/net/gnrc`. If the 
>> directory the module resides in is called the same as the module, the MODULE 
>> macro needs not be set in the module's Makefile.
>> Can you rephrase your second question. I have difficulties to understand 
>> what you are going at.
>> 
>> Cheers,
>> Martine
>> 
>> 2015-11-17 21:42 GMT+01:00 Haoyang Yu <haoyang...@rutgers.edu 
>> <mailto:haoyang...@rutgers.edu>>:
>> Hi all,
>> 
>> I followed that information provided by community, but did not find the 
>> MODULE gnrc, and also just find gnrc_netif MODULE in sys, but not 
>> gnrc_netif_default
>> 
>>  # gnrc is a meta module including all required, basic gnrc networking 
>> modules
>>   USEMODULE += gnrc
>>   # use the default network interface for the board
>>   USEMODULE += gnrc_netif_default
>> 
>> # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
>> If I just want to get IEEE802.15.4 data, from my perspective I directly use 
>> MODULE of gnrc_netif, right? And add packet header I defined by myself.
>> 
>> Thanks for your answers.
>> 
>> Cheers,
>> Haoyang
>> 
>> > On Nov 17, 2015, at 10:05, Oleg Hahm <oliver.h...@inria.fr 
>> > <mailto:oliver.h...@inria.fr>> wrote:
>> >
>> > Hi!
>> >
>> > One tiny addition:
>> >
>> > Am Tue, Nov 17, 2015 at 01:56:09PM +0100 schrieb Martine Lenders:
>> >> * gnrc_sixlowpan is the bare minimum implementation of 6LoWPAN for GNRC
>> >>  * gnrc_sixlowpan_frag and gnrc_sixlowpan_iphc implenent 6LoWPAN
>> >> fragmentation and IP header compression respectively
>> >
>> > There is also *grnc_sixlowpan_ctx* for stateful compression (using the 6co
>> > flag in RAs).
>> >
>> > Cheers,
>> > Oleg
>> > --
>> > printk (KERN_ALERT "You are screwed! " ...);
>> >linux-2.6.6/arch/i386/kernel/efi.c
>> > ___
>> > devel mailing list
>> > devel@riot-os.org <mailto:devel@riot-os.org>
>> > https://lists.riot-os.org/mailman/listinfo/devel 
>> > <https://lists.riot-os.org/mailman/listinfo/devel>
>> 
>> ___
>> devel mailing list
>> devel@riot-os.org <mailto:devel@riot-os.org>
>> ht

Re: [riot-devel] Create a new module

2015-11-17 Thread Haoyang Yu
Hi Oleg,

I do cannot find any Makefile claim this module as the name gnrc_netif_default. 
But I found one named gnrc_netif. 

# use the default network interface for the board
  USEMODULE += gnrc_netif_default

I am wondering where can I find it. I used grep to search.

Thank you very much.

Cheers,
Haoyang

> On Nov 4, 2015, at 18:22, Oleg Hahm  wrote:
> 
> Hello Haoyang,
> 
>> I am staring to create my own module for RIOT CCN stuff, I am wondering for
>> the USEMODULE in Makefile,
> 
> Cool, looking forward to this implementation. May I ask what kind of CCN stuff
> you're going to implement? Are you developing from scratch or do you use any
> existing CCN implementation as a foundation?
> 
>> How can I add a self-define module in Makefile, and how do we specify the
>> name like? What is the underlying complying mechanism to find the module?
> 
> Usually, the name and path of the module is derived from its directory name.
> If you create a folder like `sys/foobar` and put a Makefile there which
> contains a line like this:
> `include $(RIOTBASE)/Makefile.base`
> all C files in this folder will be compiled to something that is usable via 
> `USEMODULE += foobar`. If you want to label your module different from its
> directory name for some reason, you can add another line to the Makefile
> before the above mentioned line saying `MODULE := myfoobar`.
> 
> However, for stuff residing inside a subdirectory of `sys` like `sys/net/...`
> you will need to some lines to `sys/Makefile` in order to let Make find this
> module. Just look at the existing examples there.
> 
> Cheers,
> Oleg
> -- 
> printk(KERN_WARNING "Warning: defective CD-ROM (volume sequence
> number). Enabling \"cruft\" mount option.\n");
>linux-2.2.16/fs/isofs/inode.c
> ___
> 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] Network Stack Question

2015-11-10 Thread Haoyang Yu
Hi,

I am a student in Rutgers, and I am trying to implement a new CCN lite protocol 
on RIOT, and facing one difficulty about how to get the packet from Link 
layer(Layer 2)?

Do you guys can give me some hints? Thank you very much!

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


[riot-devel] Create a new module

2015-11-04 Thread Haoyang Yu
Hi Team,

I am staring to create my own module for RIOT CCN stuff, I am wondering for the 
USEMODULE in Makefile,

How can I add a self-define module in Makefile, and how do we specify the name 
like? What is the underlying complying mechanism to find the module?

USEMODULE += gnrc_ipv6_router_default

Thanks,
Haoyang___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Forming Sensor Network

2015-10-29 Thread Haoyang Yu
samr21-xpro

Cheers,
Haoyang
> On Oct 29, 2015, at 03:41, Cenk Gündogan <cenk.guendo...@fu-berlin.de> wrote:
> 
> Hello Haoyang,
> 
> Please have a look at [1] for a quick tutorial on using RPL in RIOT.
> Out of curiosity: what kind of hardware do you use to build your sensor 
> network?
> 
> Cheers,
> Cenk
> 
> [1] 
> https://github.com/RIOT-OS/RIOT/wiki/Tutorial:-RIOT-and-Multi-Hop-Routing-with-RPL
>  
> <https://github.com/RIOT-OS/RIOT/wiki/Tutorial:-RIOT-and-Multi-Hop-Routing-with-RPL>
> 
> On 29.10.2015 06:41, Haoyang Yu wrote:
>> Hi all,
>> 
>> Right now, I am more familiar with RIOT OS, and also trying to build sensor 
>> network.
>> 
>> I am puzzled by how to implement sensor network for example using AODV 
>> routing protocol or RPL protocol to do network forming.
>> 
>> Question:
>> Neighbor discovering to form a stable sensor network?
>> Make device A to talk to device B which needs more hops or just one hop?
>> 
>> Thanks for the patience of this amazing group, I learned a lot during my 
>> implementation.
>> 
>> Cheers,
>> Haoyang
>> 
>> 
>> ___
>> devel mailing list
>> devel@riot-os.org <mailto:devel@riot-os.org>
>> https://lists.riot-os.org/mailman/listinfo/devel 
>> <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] Forming Sensor Network

2015-10-28 Thread Haoyang Yu
Hi all,

Right now, I am more familiar with RIOT OS, and also trying to build sensor 
network.

I am puzzled by how to implement sensor network for example using AODV routing 
protocol or RPL protocol to do network forming.

Question:
Neighbor discovering to form a stable sensor network?
Make device A to talk to device B which needs more hops or just one hop?

Thanks for the patience of this amazing group, I learned a lot during my 
implementation.

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


Re: [riot-devel] Hack'n'ACK October '15

2015-10-28 Thread Haoyang Yu
Thanks Peter,

I encountered an question about DEFAULT program. 

the _netif_send is the underlying function for txtsnd, it use 
genre_netapi_send(dev, pkt) to send the packet. But in pkt_dump process running 
background, I notice the _eventloop(void *arg), is the codes in charge of 
printing. The question is:

gnrc_netapi_send is sending GNRC_NETAPI_MSG_TYPE_SND, but in _eventloop, it is 
the GNRC_NETAPI_MSG_TYPE_RCV type, because the stdout result shows “PKTDUMP: 
data received:”. Is there any problem?

Thanks,
Haoyang

> On Oct 28, 2015, at 05:12, Peter Kietzmann <peter.kietzm...@haw-hamburg.de> 
> wrote:
> 
> Hi Haoyang,
> 
> yesterday it was too late for joining the session. We've already closed the 
> conference at that time. Usually we start the Hack'n'ACK about 17:30 p.m. 
> CET. 
> 
> If you want to join discussions you can also follow the virtual meetings that 
> take place on wednesdays at 2 p.m. CET *if* someone put content in a prepared 
> pad. If I see it correctly this pad should be the one for the next potential 
> conference:
> 
> http://riot.pad.spline.de/23 <http://riot.pad.spline.de/23>?
> 
> Alternatively you can use this list to discuss anything :-).
> 
> Best,
> Peter
> 
> 
> 
> Am 27.10.2015 um 22:32 schrieb Haoyang Yu:
>> Hi Martine,
>> 
>> What is the actual time for the Hack’n’ACK meeting, I want to join to 
>> discuss with RIOTers.
>> 
>> Thanks,
>> Haoyang
>> 
>>> On Oct 27, 2015, at 12:02, Martine Lenders <mlend...@inf.fu-berlin.de 
>>> <mailto:mlend...@inf.fu-berlin.de>> wrote:
>>> 
>>> Hello fellow RIOTers,
>>> 
>>> Cenk and I are holding the castle for tonight's Hack'n'ACK at FU Berlin. 
>>> You can join via your favorite PlaceCam link: 
>>> http://placecam.de/call.php?c=lmakKMrDG8a35aIBNqLBvOnApExkKFntj9xXawGNgTc- 
>>> <http://placecam.de/call.php?c=lmakKMrDG8a35aIBNqLBvOnApExkKFntj9xXawGNgTc->
>>> 
>>> If you never used PlaceCam before, please refer to [1]
>>> 
>>> Lots of fun and merges tonight,
>>> Martine
>>> 
>>> [1]  
>>> <https://github.com/RIOT-OS/RIOT/wiki/Instructions-for-remote-participation>https://github.com/RIOT-OS/RIOT/wiki/Instructions-for-remote-participation
>>>  
>>> <https://github.com/RIOT-OS/RIOT/wiki/Instructions-for-remote-participation>___
>>> devel mailing list
>>> devel@riot-os.org <mailto:devel@riot-os.org>
>>> https://lists.riot-os.org/mailman/listinfo/devel 
>>> <https://lists.riot-os.org/mailman/listinfo/devel>
>> 
>> 
>> 
>> ___
>> devel mailing list
>> devel@riot-os.org <mailto:devel@riot-os.org>
>> https://lists.riot-os.org/mailman/listinfo/devel 
>> <https://lists.riot-os.org/mailman/listinfo/devel>
> 
> -- 
> Peter Kietzmann
> 
> Hamburg University of Applied Sciences
> Dept. Informatik, Internet Technologies Group
> Berliner Tor 7, 20099 Hamburg, Germany
> Fon: +49-40-42875-8426 
> Web: http://www.haw-hamburg.de/inet <http://www.haw-hamburg.de/inet>
> ___
> 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] Network Stack Question

2015-10-27 Thread Haoyang Yu
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
> On Oct 25, 2015, at 11:57, Martine Lenders <authmille...@gmail.com> wrote:
> 
> Hi Haoyang,
> 
> 2015-10-24 21:17 GMT+02:00 Haoyang Yu <haoyang...@rutgers.edu 
> <mailto:haoyang...@rutgers.edu>>:
> where can I find the txtsnd source codes?
> `txtsnd` is a default shell command for the `gnrc_netif` module pulled in by 
> the `shell_commands` module. As such you can find it in 
> `sys/shell/commands/sc_netif.c`.
> (When I'm not sure were something is located in RIOT, I use `git grep` ;-)) 
> Does packet txtsnd sent is through RF based on GNRC protocol, not the serial 
> right? 
> Depends, normally (for physical boards) it sends over RF. On native there is 
> no RF, so we use TAP [1] [2] to virtualize an Ethernet connection. Since 
> native doesn't have a serial line either (since it is just a process in the 
> host OS, utilizing normal stdin/stdout) we decided to "misuse" the PORT 
> environment variable for native to point to the TAP instead to the serial 
> device (so that might be where your confusion stems from). For physical 
> boards you can however also send packets via serial line, if you wish to (for 
> a border router e.g.), using SLIP [3]. See my last mail for how to activate 
> that in RIOT.
> 
> [1] https://www.kernel.org/doc/Documentation/networking/tuntap.txt 
> <https://www.kernel.org/doc/Documentation/networking/tuntap.txt>
> [2] https://en.wikipedia.org/wiki/TUN/TAP 
> <https://en.wikipedia.org/wiki/TUN/TAP>
> [3] https://tools.ietf.org/html/rfc1055 
> <https://tools.ietf.org/html/rfc1055>___
> 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] Hack'n'ACK October '15

2015-10-27 Thread Haoyang Yu
Hi Martine,

What is the actual time for the Hack’n’ACK meeting, I want to join to discuss 
with RIOTers.

Thanks,
Haoyang

> On Oct 27, 2015, at 12:02, Martine Lenders  wrote:
> 
> Hello fellow RIOTers,
> 
> Cenk and I are holding the castle for tonight's Hack'n'ACK at FU Berlin. You 
> can join via your favorite PlaceCam link: 
> http://placecam.de/call.php?c=lmakKMrDG8a35aIBNqLBvOnApExkKFntj9xXawGNgTc- 
> 
> 
> If you never used PlaceCam before, please refer to [1]
> 
> Lots of fun and merges tonight,
> Martine
> 
> [1] 
> https://github.com/RIOT-OS/RIOT/wiki/Instructions-for-remote-participation 
> ___
> 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] Network Stack Question

2015-10-24 Thread Haoyang Yu
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


> On Oct 23, 2015, at 15:34, Martine Lenders <authmille...@gmail.com> wrote:
> 
> Hi Haoyang,
> 
> 
> 2015-10-23 20:08 GMT+02:00 Haoyang Yu <haoyang...@rutgers.edu 
> <mailto:haoyang...@rutgers.edu>>:
> txtsnd: I cannot set the interface, if I use tap0, which will echo: error: 
> invalid interface given. 
> You need to use the interface on the node, not the TAP. The TAP is the 
> endpoint on the host system for the "cable" you draw between host and native 
> node. Use `ifconfig` to see what interface to use (as documented in the 
> default example's README [1]).
> I found the tutorial that said using addr, but I do not have the addr command 
> when I use the R21 board.
> Can you point us to this tutorial? The addr command was dropped for the last 
> release. Everything can be done with `ifconfig` now (there is already an 
> address configured though). 
> And what is the mean for interface for txtsnd to use, if I have 
> /dev/tty.usbmodem* MCU device
> I don't know what you mean by that? If you mean it in the same way as you 
> said you used `tap0` on the native node, see above, if you want to send 
> actual packets over the serial line, have a look at SLIP [2] (or the 
> gnrc_border_router example about how to use it).
>  
> [1] https://github.com/RIOT-OS/RIOT/tree/2015.09/examples/default#networking 
> <https://github.com/RIOT-OS/RIOT/tree/2015.09/examples/default#networking>
> [2] http://doc.riot-os.org/group__net__gnrc__slip.html 
> <http://doc.riot-os.org/group__net__gnrc__slip.html>___
> 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] Network Stack Question

2015-10-23 Thread Haoyang Yu
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


> On Oct 23, 2015, at 13:50, Oliver Hahm  wrote:
> 
> 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
> -- 
> The problem with a SQL security joke is that Sony don't get it.
> ___
> 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] Network Stack Question

2015-10-23 Thread Haoyang Yu
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
> On Oct 23, 2015, at 06:48, Oliver Hahm  wrote:
> 
> 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
> -- 
> Institute of Computer Science
> Freie Universität Berlin
> AG-Tech, Room 148
> Takustr. 9, 14195 Berlin
> Mail: oliver.h...@inria.fr
> Web: http://www.des-testbed.net
> http://www.riot-os.org

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