coap-example
Dependencies: NetworkServices W5500Interface easy-connect
Fork of coap-example by
Revision 1:b56863927244, committed 2017-07-06
- Comitter:
- sgnezdov
- Date:
- Thu Jul 06 06:58:22 2017 +0000
- Parent:
- 0:0681e205d0e9
- Commit message:
- can send CoAP messages to http://i-ce.itron.cloud
Changed in this revision
diff -r 0681e205d0e9 -r b56863927244 NetworkServices.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NetworkServices.lib Thu Jul 06 06:58:22 2017 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/sgnezdov/code/NetworkServices/#c976088bf39d
diff -r 0681e205d0e9 -r b56863927244 W5500Interface.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/W5500Interface.lib Thu Jul 06 06:58:22 2017 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/sgnezdov/code/W5500Interface/#41393623ead4
diff -r 0681e205d0e9 -r b56863927244 easy-connect.lib --- a/easy-connect.lib Wed Feb 15 21:18:58 2017 +0100 +++ b/easy-connect.lib Thu Jul 06 06:58:22 2017 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/easy-connect/#a913964341394430cd3997c6f2950f93ba1d75c8 +https://developer.mbed.org/users/sgnezdov/code/easy-connect/#e8ce78953d20
diff -r 0681e205d0e9 -r b56863927244 mbed-os.lib --- a/mbed-os.lib Wed Feb 15 21:18:58 2017 +0100 +++ b/mbed-os.lib Thu Jul 06 06:58:22 2017 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#269f58d75b752a4e67a6a2d8c5c698635ffd6752 +https://github.com/ARMmbed/mbed-os/#8828635da469162cf2854b5287561c663fb96e72
diff -r 0681e205d0e9 -r b56863927244 source/main.cpp --- a/source/main.cpp Wed Feb 15 21:18:58 2017 +0100 +++ b/source/main.cpp Thu Jul 06 06:58:22 2017 +0000 @@ -18,7 +18,6 @@ #include <string> #include "mbed.h" #include "easy-connect.h" -#include "sn_nsdl.h" #include "sn_coap_protocol.h" #include "sn_coap_header.h" @@ -79,6 +78,7 @@ } int main() { + printf("Easy connect...\n"); NetworkInterface *network = easy_connect(true); if (!network) { printf("Cannot connect to the network, see serial output"); @@ -97,7 +97,7 @@ recvfromThread.start(&recvfromMain); // Path to the resource we want to retrieve - const char* coap_uri_path = "/hello"; + const char* coap_uri_path = "/test"; // See ns_coap_header.h sn_coap_hdr_s *coap_res_ptr = (sn_coap_hdr_s*)calloc(sizeof(sn_coap_hdr_s), 1); @@ -126,8 +126,8 @@ // } // printf("\n"); - int scount = socket.sendto("coap.me", 5683, message_ptr, message_len); - printf("Sent %d bytes to coap://coap.me:5683\n", scount); + int scount = socket.sendto("i-ce.itron.cloud", 5683, message_ptr, message_len); + printf("Sent %d bytes to coap://i-ce.itron.cloud:5683\n", scount); free(coap_res_ptr); free(message_ptr);