Re: [riot-devel] CoAP observe support
No worries, Koen. I see you've been busy elsewhere in the tree. Congrats on the recent merges. Below are my thoughts on priorities, but of course the implementation emerges from everyone's priorities. Any CoAP implementation needs to include the base spec, and the Observe and Block extensions. I'm working on Observe for gcoap, and I'll probably add the CON type with that. Both gcoap and nanocoap need Block support. The Observe spec includes some clever uses of URIs (section 1.4), so just adding Uri-Query option support would be valuable. I like the choice of implementations within RIOT of nanocoap (class 0/1 devices) and gcoap (class 1/2) devices, so keeping them in sync is valuable, too. On top of this base, security is critical. RIOT includes a DTLS implementation (transport layer), but interesting work is going into the OSCOAP draft (application layer), too. Also see the documents in the IETF core working group -- monitoring via CORE/COMI (which was my original reason for working on CoAP), pub-sub, HTTP mapping, multicast. Then there is the work from the thing to thing group (T2TRG) and ensuring a protocol like LWM2M works well. Carsten has posted a couple of messages recently about CoAP over serial that would be cool to implement, too. At this level, the priorities really depend on what you need CoAP to do. Ken On 01/21/2017 10:55 AM, Koen Zandberg wrote: Hi Ken, Sorry for the slow response. Time limitations are also an issue for me. I'm going to look at the code in the next few weeks when I have time. Besides the work for coap observe, what would be the priority to work on? Koen On 01/10/2017 12:31 PM, Ken Bannister wrote: Hi Koen, Thanks for your interest! I am working actively on Observe support for gcoap/nanocoap. I don't see a technical difficulty -- the biggest issue for me is time to work on it. :-/ My first goal is server-side support. I plan to create a WIP PR within a week or two, so at least there will be a place for discussions. You'll see a new branch in my repository before then, and I'm happy to discuss at any time. If you are generally interested in contributing to CoAP within RIOT, both nanocoap and gcoap could use some help. There are a couple of open PRs for work on nanocoap. Certainly it would benefit from more documentation and unit tests, which are a great way to get into the code. I also maintain a wiki about gcoap [1], and also have written up some issues as 'notes to self' [2] but would be happy for someone to move them to official RIOT issues. gcoap also needs full-on confirmable messaging support, which actually is a requirement for Observe. Ken [1] https://github.com/kb2ma/RIOT/wiki/gcoap-Status [2] https://github.com/kb2ma/RIOT/issues On 01/10/2017 04:56 AM, Koen Zandberg wrote: Hello, I was looking for a CoAP implementation to use with RIOT. Having looked at both microcoap and nanocoap (gcoap), as far as I could tell both lack observe support. Are there difficulties with implementing this? If there are no blocking issues with it, I might be willing to spent some time trying to get it working. Koen. ___ 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 ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] CoAP observe support
Hi Ken, Sorry for the slow response. Time limitations are also an issue for me. I'm going to look at the code in the next few weeks when I have time. Besides the work for coap observe, what would be the priority to work on? Koen On 01/10/2017 12:31 PM, Ken Bannister wrote: > > Hi Koen, > > Thanks for your interest! I am working actively on Observe support for > gcoap/nanocoap. I don't see a technical difficulty -- the biggest > issue for me is time to work on it. :-/ My first goal is server-side > support. I plan to create a WIP PR within a week or two, so at least > there will be a place for discussions. You'll see a new branch in my > repository before then, and I'm happy to discuss at any time. > > If you are generally interested in contributing to CoAP within RIOT, > both nanocoap and gcoap could use some help. There are a couple of > open PRs for work on nanocoap. Certainly it would benefit from more > documentation and unit tests, which are a great way to get into the > code. I also maintain a wiki about gcoap [1], and also have written up > some issues as 'notes to self' [2] but would be happy for someone to > move them to official RIOT issues. gcoap also needs full-on > confirmable messaging support, which actually is a requirement for > Observe. > > Ken > > [1] https://github.com/kb2ma/RIOT/wiki/gcoap-Status > [2] https://github.com/kb2ma/RIOT/issues > > > On 01/10/2017 04:56 AM, Koen Zandberg wrote: >> Hello, >> >> I was looking for a CoAP implementation to use with RIOT. Having looked >> at both microcoap and nanocoap (gcoap), as far as I could tell both lack >> observe support. Are there difficulties with implementing this? If there >> are no blocking issues with it, I might be willing to spent some time >> trying to get it working. >> >> Koen. >> >> >> >> >> ___ >> 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 signature.asc Description: OpenPGP digital signature ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] CoAP observe support
Hi Koen, Thanks for your interest! I am working actively on Observe support for gcoap/nanocoap. I don't see a technical difficulty -- the biggest issue for me is time to work on it. :-/ My first goal is server-side support. I plan to create a WIP PR within a week or two, so at least there will be a place for discussions. You'll see a new branch in my repository before then, and I'm happy to discuss at any time. If you are generally interested in contributing to CoAP within RIOT, both nanocoap and gcoap could use some help. There are a couple of open PRs for work on nanocoap. Certainly it would benefit from more documentation and unit tests, which are a great way to get into the code. I also maintain a wiki about gcoap [1], and also have written up some issues as 'notes to self' [2] but would be happy for someone to move them to official RIOT issues. gcoap also needs full-on confirmable messaging support, which actually is a requirement for Observe. Ken [1] https://github.com/kb2ma/RIOT/wiki/gcoap-Status [2] https://github.com/kb2ma/RIOT/issues On 01/10/2017 04:56 AM, Koen Zandberg wrote: Hello, I was looking for a CoAP implementation to use with RIOT. Having looked at both microcoap and nanocoap (gcoap), as far as I could tell both lack observe support. Are there difficulties with implementing this? If there are no blocking issues with it, I might be willing to spent some time trying to get it working. Koen. ___ 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
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
Re: [riot-devel] CoAP
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
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] CoAP
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] CoAP
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 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
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
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