Re: [riot-devel] Year 2038

2015-10-29 Thread Kaspar Schleiser

Hey,

On 10/29/2015 03:03 PM, Baptiste Clenet wrote:

Most RIOT cpu use 32bit system or less, in 2038, 32bit system will get
an overflow if they use epoch system and it will comes back to year
1900.
How to avoid this problem, is there a solution with RIOT?


While RIOT currently doesn't have a consistent way of representing 
real-time, the main timer (xtimer) counts microseconds in 64bit values, 
which ought to be enough for everyone(tm).


Kaspar
___
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  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
>  
> 
> 
> 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 
>> 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


Re: [riot-devel] CoAP

2015-10-29 Thread Martine Lenders
Hi,
as libcoap uses POSIX sockets it should work without any porting effort to
gnrc. But since the socket API does not support options at the moment,
there might be some unexpected problems.

Cheers,
Martine

2015-10-29 15:32 GMT+01:00 Baptiste Clenet :

> Hi Lennart,
>
> >Also, you'd probably have to port it to RIOT first
> Just to let you know, libcoap has already been ported to RIOT (as a
> pkg as microcoap) [1]
> Yes it does network registering automatically but I don't if this port
> does it with the new network stack, need testing.
>
> [1] https://github.com/RIOT-OS/RIOT/tree/master/pkg/libcoap
>
> 2015-10-29 15:19 GMT+01:00 Lennart Dührsen  >:
> > Hi Ilias,
> >
> >> To use CoAP in my R21 boards should I rite the code of socket
> >> programming (open a udp port ,etc) or just use the coap library and it
> >> takes care about the socket?
> >
> > all the microcoap library does is create and parse payloads (CoAP
> > packets), and it let's you register callback functions for each URI.
> >
> > You have to handle all the networking stuff, i.e. sending and receiving
> > UDP packets, yourself.
> >
> > I'm currently working on the mostly absent documentation of microcoap,
> > you can find it in this fork:
> >
> > https://github.com/i2ot/microcoap
> >
> > It's not finished yet, but it might help you. For the networking stuff
> > on RIOT OS, check out
> >
> > https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking
> >
> > and
> >
> > https://github.com/RIOT-OS/RIOT/tree/master/examples/posix_sockets
> >
> > if you haven't already done so.
> >
> > The example code Baptiste pointed you to is indeed out of date, but the
> > CoAP parts in it are still correct and should work, so you'd just have
> > to change the socket calls etc.
> >
> > Regarding libcoap: It's a *lot* more code than microcoap, and yes, it
> > does all the socket stuff for you. But its documentation, too, is pretty
> > much nonexistent. Also, you'd probably have to port it to RIOT first, so
> > I suggest you use microcoap for devices that will run RIOT OS.
> >
> > If you run into problems with microcoap, feel free to send me an e-mail.
> >
> > Best,
> > Lennart
> > ___
> > devel mailing list
> > devel@riot-os.org
> > https://lists.riot-os.org/mailman/listinfo/devel
>
>
>
> --
> Baptiste
> ___
> 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] CoAP

2015-10-29 Thread Ilias Seitanidis
I am used to testing, It would be my pleasure.
Debugging since 2013 on android :)

2015-10-29 15:34 GMT+01:00 Ilias Seitanidis :

>
>
> 2015-10-29 15:32 GMT+01:00 Baptiste Clenet :
>
>> Hi Lennart,
>>
>> >Also, you'd probably have to port it to RIOT first
>> Just to let you know, libcoap has already been ported to RIOT (as a
>> pkg as microcoap) [1]
>> Yes it does network registering automatically but I don't if this port
>> does it with the new network stack, need testing.
>>
>> [1] https://github.com/RIOT-OS/RIOT/tree/master/pkg/libcoap
>>
>> 2015-10-29 15:19 GMT+01:00 Lennart Dührsen > >:
>> > Hi Ilias,
>> >
>> >> To use CoAP in my R21 boards should I rite the code of socket
>> >> programming (open a udp port ,etc) or just use the coap library and it
>> >> takes care about the socket?
>> >
>> > all the microcoap library does is create and parse payloads (CoAP
>> > packets), and it let's you register callback functions for each URI.
>> >
>> > You have to handle all the networking stuff, i.e. sending and receiving
>> > UDP packets, yourself.
>> >
>> > I'm currently working on the mostly absent documentation of microcoap,
>> > you can find it in this fork:
>> >
>> > https://github.com/i2ot/microcoap
>> >
>> > It's not finished yet, but it might help you. For the networking stuff
>> > on RIOT OS, check out
>> >
>> > https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking
>> >
>> > and
>> >
>> > https://github.com/RIOT-OS/RIOT/tree/master/examples/posix_sockets
>> >
>> > if you haven't already done so.
>> >
>> > The example code Baptiste pointed you to is indeed out of date, but the
>> > CoAP parts in it are still correct and should work, so you'd just have
>> > to change the socket calls etc.
>> >
>> > Regarding libcoap: It's a *lot* more code than microcoap, and yes, it
>> > does all the socket stuff for you. But its documentation, too, is pretty
>> > much nonexistent. Also, you'd probably have to port it to RIOT first, so
>> > I suggest you use microcoap for devices that will run RIOT OS.
>> >
>> > If you run into problems with microcoap, feel free to send me an e-mail.
>> >
>> > Best,
>> > Lennart
>> > ___
>> > devel mailing list
>> > devel@riot-os.org
>> > https://lists.riot-os.org/mailman/listinfo/devel
>>
>>
>>
>> --
>> Baptiste
>> ___
>> 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] CoAP

2015-10-29 Thread Ilias Seitanidis
2015-10-29 15:32 GMT+01:00 Baptiste Clenet :

> Hi Lennart,
>
> >Also, you'd probably have to port it to RIOT first
> Just to let you know, libcoap has already been ported to RIOT (as a
> pkg as microcoap) [1]
> Yes it does network registering automatically but I don't if this port
> does it with the new network stack, need testing.
>
> [1] https://github.com/RIOT-OS/RIOT/tree/master/pkg/libcoap
>
> 2015-10-29 15:19 GMT+01:00 Lennart Dührsen  >:
> > Hi Ilias,
> >
> >> To use CoAP in my R21 boards should I rite the code of socket
> >> programming (open a udp port ,etc) or just use the coap library and it
> >> takes care about the socket?
> >
> > all the microcoap library does is create and parse payloads (CoAP
> > packets), and it let's you register callback functions for each URI.
> >
> > You have to handle all the networking stuff, i.e. sending and receiving
> > UDP packets, yourself.
> >
> > I'm currently working on the mostly absent documentation of microcoap,
> > you can find it in this fork:
> >
> > https://github.com/i2ot/microcoap
> >
> > It's not finished yet, but it might help you. For the networking stuff
> > on RIOT OS, check out
> >
> > https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking
> >
> > and
> >
> > https://github.com/RIOT-OS/RIOT/tree/master/examples/posix_sockets
> >
> > if you haven't already done so.
> >
> > The example code Baptiste pointed you to is indeed out of date, but the
> > CoAP parts in it are still correct and should work, so you'd just have
> > to change the socket calls etc.
> >
> > Regarding libcoap: It's a *lot* more code than microcoap, and yes, it
> > does all the socket stuff for you. But its documentation, too, is pretty
> > much nonexistent. Also, you'd probably have to port it to RIOT first, so
> > I suggest you use microcoap for devices that will run RIOT OS.
> >
> > If you run into problems with microcoap, feel free to send me an e-mail.
> >
> > Best,
> > Lennart
> > ___
> > devel mailing list
> > devel@riot-os.org
> > https://lists.riot-os.org/mailman/listinfo/devel
>
>
>
> --
> Baptiste
> ___
> 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] CoAP

2015-10-29 Thread Baptiste Clenet
Hi Lennart,

>Also, you'd probably have to port it to RIOT first
Just to let you know, libcoap has already been ported to RIOT (as a
pkg as microcoap) [1]
Yes it does network registering automatically but I don't if this port
does it with the new network stack, need testing.

[1] https://github.com/RIOT-OS/RIOT/tree/master/pkg/libcoap

2015-10-29 15:19 GMT+01:00 Lennart Dührsen :
> Hi Ilias,
>
>> To use CoAP in my R21 boards should I rite the code of socket
>> programming (open a udp port ,etc) or just use the coap library and it
>> takes care about the socket?
>
> all the microcoap library does is create and parse payloads (CoAP
> packets), and it let's you register callback functions for each URI.
>
> You have to handle all the networking stuff, i.e. sending and receiving
> UDP packets, yourself.
>
> I'm currently working on the mostly absent documentation of microcoap,
> you can find it in this fork:
>
> https://github.com/i2ot/microcoap
>
> It's not finished yet, but it might help you. For the networking stuff
> on RIOT OS, check out
>
> https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking
>
> and
>
> https://github.com/RIOT-OS/RIOT/tree/master/examples/posix_sockets
>
> if you haven't already done so.
>
> The example code Baptiste pointed you to is indeed out of date, but the
> CoAP parts in it are still correct and should work, so you'd just have
> to change the socket calls etc.
>
> Regarding libcoap: It's a *lot* more code than microcoap, and yes, it
> does all the socket stuff for you. But its documentation, too, is pretty
> much nonexistent. Also, you'd probably have to port it to RIOT first, so
> I suggest you use microcoap for devices that will run RIOT OS.
>
> If you run into problems with microcoap, feel free to send me an e-mail.
>
> Best,
> Lennart
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel



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


Re: [riot-devel] CoAP

2015-10-29 Thread Lennart Dührsen
Hi Ilias,

> To use CoAP in my R21 boards should I rite the code of socket
> programming (open a udp port ,etc) or just use the coap library and it
> takes care about the socket?

all the microcoap library does is create and parse payloads (CoAP
packets), and it let's you register callback functions for each URI.

You have to handle all the networking stuff, i.e. sending and receiving
UDP packets, yourself.

I'm currently working on the mostly absent documentation of microcoap,
you can find it in this fork:

https://github.com/i2ot/microcoap

It's not finished yet, but it might help you. For the networking stuff
on RIOT OS, check out

https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking

and

https://github.com/RIOT-OS/RIOT/tree/master/examples/posix_sockets

if you haven't already done so.

The example code Baptiste pointed you to is indeed out of date, but the
CoAP parts in it are still correct and should work, so you'd just have
to change the socket calls etc.

Regarding libcoap: It's a *lot* more code than microcoap, and yes, it
does all the socket stuff for you. But its documentation, too, is pretty
much nonexistent. Also, you'd probably have to port it to RIOT first, so
I suggest you use microcoap for devices that will run RIOT OS.

If you run into problems with microcoap, feel free to send me an e-mail.

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


Re: [riot-devel] CoAP

2015-10-29 Thread Baptiste Clenet
I didn't try it since it's big comparing to microcoap (because it
implements both client and server).
There is no example for libcoap so you will have to register an UDP
socket to the new network stack as well.
IMHO, if you don't need a CoAP client , you should use microcoap.

Baptiste

2015-10-29 15:02 GMT+01:00 Ilias Seitanidis :
> Hi Baptiste,
> do you know if libcoap is working on the new stack?
> Best,
> Ilias
>
> 2015-10-29 14:56 GMT+01:00 Baptiste Clenet :
>>
>> Hi Illias,
>>
>> There is an example of the use of microcoap [1] but it hasn't been
>> updated with the new network stack so it might not work.
>> No microcoap doesn't take care about socket so you have to register a
>> new UDP socket which will be redirected to your microcoap handle
>> function.
>>
>>
>> [1] https://github.com/RIOT-OS/applications/blob/master/microcoap/main.c
>>
>>
>> 2015-10-29 12:52 GMT+01:00 Ilias Seitanidis :
>> > Hi ! To use CoAP in my R21 boards should I rite the code of socket
>> > programming (open a udp port ,etc) or just use the coap library and it
>> > takes
>> > care about the socket?
>> > Thank you in advance!!!
>> >
>> > ___
>> > devel mailing list
>> > devel@riot-os.org
>> > https://lists.riot-os.org/mailman/listinfo/devel
>> >
>>
>>
>>
>> --
>> Baptiste
>> ___
>> 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
>



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


[riot-devel] Year 2038

2015-10-29 Thread Baptiste Clenet
Hi,

Most RIOT cpu use 32bit system or less, in 2038, 32bit system will get
an overflow if they use epoch system and it will comes back to year
1900.
How to avoid this problem, is there a solution with RIOT?

Example:
int date = 2147483649;
struct tm now;
now = *localtime((time_t*)&date);
printf("New date: day:%d month:%d year:%d Hour:%d  Min:%d  Sec:%d\n",
now.tm_mday,
now.tm_mon,
1900 + now.tm_year,
now.tm_hour,
now.tm_min,
now.tm_sec);

New date: day:13 month:11 year:1901 Hour:20  Min:45  Sec:53



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


Re: [riot-devel] CoAP

2015-10-29 Thread Ilias Seitanidis
Hi Baptiste,
do you know if libcoap is working on the new stack?
Best,
Ilias

2015-10-29 14:56 GMT+01:00 Baptiste Clenet :

> Hi Illias,
>
> There is an example of the use of microcoap [1] but it hasn't been
> updated with the new network stack so it might not work.
> No microcoap doesn't take care about socket so you have to register a
> new UDP socket which will be redirected to your microcoap handle
> function.
>
>
> [1] https://github.com/RIOT-OS/applications/blob/master/microcoap/main.c
>
>
> 2015-10-29 12:52 GMT+01:00 Ilias Seitanidis :
> > Hi ! To use CoAP in my R21 boards should I rite the code of socket
> > programming (open a udp port ,etc) or just use the coap library and it
> takes
> > care about the socket?
> > Thank you in advance!!!
> >
> > ___
> > devel mailing list
> > devel@riot-os.org
> > https://lists.riot-os.org/mailman/listinfo/devel
> >
>
>
>
> --
> Baptiste
> ___
> 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] CoAP

2015-10-29 Thread Baptiste Clenet
Hi Illias,

There is an example of the use of microcoap [1] but it hasn't been
updated with the new network stack so it might not work.
No microcoap doesn't take care about socket so you have to register a
new UDP socket which will be redirected to your microcoap handle
function.


[1] https://github.com/RIOT-OS/applications/blob/master/microcoap/main.c


2015-10-29 12:52 GMT+01:00 Ilias Seitanidis :
> Hi ! To use CoAP in my R21 boards should I rite the code of socket
> programming (open a udp port ,etc) or just use the coap library and it takes
> care about the socket?
> Thank you in advance!!!
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>



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


[riot-devel] CoAP

2015-10-29 Thread Ilias Seitanidis
Hi ! To use CoAP in my R21 boards should I rite the code of socket
programming (open a udp port ,etc) or just use the coap library and it
takes care about the socket?
Thank you in advance!!!
___
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 Cenk Gündogan

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


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
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-29 Thread Peter Kietzmann

Hi Haoyang,

I'm not quite sure if I got your question. But I can try to solve some 
confusion. Se me comments inline!


Am 29.10.2015 um 05:18 schrieb 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:


- The command "txtsnd" in the default example *sends* plain data over an 
interface, without using other protocols
- netapi is an IPC mechanism to communicate between modules/threads in 
the network-stack
- pkd_dump you can understand as a *receiver* thread. You register it 
for some kind of protocol and if this kind is received, pkt_dum just 
prints the packets contents to the console




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?


- GNRC_NETAPI_MSG_TYPE_SND and GNRC_NETAPI_MSG_TYPE_RCV are two types of 
the communication mechanism netapi. Like the names already say, one type 
is used when there is data to send (network-stack from top to bottom) 
and the other is used when there is data received (network-stack bottom 
to top).


If you are still confused, could you explain your scenario and the 
existing problem in a bit more detail?




Thanks,
Haoyang



Cheers,
Peter

On Oct 28, 2015, at 05:12, Peter Kietzmann 
> 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?

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 
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-


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


--
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
___
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


--
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

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