How to send packet to Coap server

How to send “gnrc_pktsnip_t” packet to Server Coap?

Hi Alberto,

Alberto,

You have a few options:

1) gcoap - See the link on the wiki [1] to the example. As the primary author, I'm kind of partial to it. :slight_smile:

2) nanocoap - There is a link to it's source from the gcoap entry on the wiki. It's an external package, but developed by Kaspar. There is a server-based example [3], but it can act as a client also. gcoap uses some of its functionality, and I also wrote a comparison with gcoap in a PR [2].

3) yacoap - It's a pull request [4], but provides client-based functionality to microcoap.

4) libcoap - There is a package for it [5], but it's oversized for resource constrained environments.

Check them out, or as Kaspar just posted, let us know your particular requirements.

Ken

[1] https://github.com/RIOT-OS/RIOT/wiki/Example-Applications [2] https://github.com/RIOT-OS/RIOT/pull/6117 [3] https://github.com/RIOT-OS/RIOT/tree/master/examples/nanocoap_server [4] https://github.com/RIOT-OS/RIOT/pull/5830 [5] https://github.com/RIOT-OS/RIOT/tree/master/pkg/libcoap

Hi Kaspar, you’re right. I have an OpenMote which has installed server Coap (https://github.com/RIOT-OS/RIOT/tree/master/examples/microcoap_server) and another OpenMote which has installed a sniffer (https://github.com/RIOT-OS/applications/blob/master/sniffer/main.c) that, i think, sniff “gnrc_pktsnip_t” and print it on the shell. Thus i want send these packet to server coap. Is it possible?

Thanks

No idea?

Alberto.