2015-10-29 15:32 GMT+01:00 Baptiste Clenet <[email protected]>:
> 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 <[email protected] > >: > > 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 > > [email protected] > > https://lists.riot-os.org/mailman/listinfo/devel > > > > -- > Baptiste > _______________________________________________ > devel mailing list > [email protected] > https://lists.riot-os.org/mailman/listinfo/devel >
_______________________________________________ devel mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/devel
