Coap Client and Server

Dependencies:   DebugLib EthernetInterface cantcoap mbed-rtos

Dependents:   COAP coap

Fork of yeswecancoap by Sille Van Landschoot

YesWeCanCoap

Is a small coap client and server library for mbed based on the cantcoap library.

Import librarycantcoap

This is CoAP library with a focus on simplicity. It offers minimal CoAP PDU construction and decoding to and from byte buffers.

yeswecancoap server enables easy implementation of coap resources, each with a dedicated function. When the function is registered by the server, it will do the rest.

Coap server example

Repository: YesWeCanCoap-example

Coap client example

under construction

Revision:
14:ce76110ecf4d
Parent:
10:77bd145ec06c
Child:
15:3a83785963fa
--- a/client.cpp	Wed Oct 21 11:46:01 2015 +0000
+++ b/client.cpp	Wed Oct 21 13:28:34 2015 +0000
@@ -24,7 +24,8 @@
             break;
     }
     req_pdu->setMessageID(new_message_id++);
-    req_pdu->setToken((uint8_t *)new_token_id, sizeof(new_token_id));
+    new_token_id++;
+    req_pdu->setToken((uint8_t *)&new_token_id, sizeof(new_token_id));
     req_pdu->setURI(uri, strlen(uri));
 
     unsigned int retries = 5;