observe fixes

Dependencies:   nsdl_lib Nanostack_lib

Fork of mbedEndpointNetwork by Michael Koster

Files at this revision

API Documentation at this revision

Comitter:
michaeljkoster
Date:
Mon Apr 13 22:39:49 2015 +0000
Parent:
7:0e80a25afabc
Child:
9:88fa16b5f592
Commit message:
update nsdl_support.c NSP_registration() to do reg. update if already registered

Changed in this revision

NSDL/libnsdl.lib Show diff for this revision Revisions of this file
NSDL/nanoservice_client_1_12_X.lib Show annotated file Show diff for this revision Revisions of this file
NSDL/nsdl_support.cpp Show annotated file Show diff for this revision Revisions of this file
mesh_nework/AtmelRFDriverLib/low_level_RF.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/NSDL/libnsdl.lib	Thu Apr 09 03:07:58 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/users/ansond/code/libnsdl/#9cb268b96ffb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NSDL/nanoservice_client_1_12_X.lib	Mon Apr 13 22:39:49 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/michaeljkoster/code/nanoservice_client_1_12_X/#b5ecd6660d71
--- a/NSDL/nsdl_support.cpp	Thu Apr 09 03:07:58 2015 +0000
+++ b/NSDL/nsdl_support.cpp	Mon Apr 13 22:39:49 2015 +0000
@@ -146,16 +146,21 @@
 void NSP_registration( ) { 
         sn_nsdl_ep_parameters_s *endpoint_ptr = NULL;
  
-        endpoint_ptr = nsdl_init_register_endpoint(endpoint_ptr, (uint8_t *)domain_name, (uint8_t*)endpoint_name, ep_type, lifetime_ptr);
-        if(sn_nsdl_register_endpoint(endpoint_ptr) != 0) {
-            DBG("NSP re-registering failed\r\n");
-            endpoint_registered = false;
+        if (endpoint_registered){
+            nsdl_reg_update();
         }
-        else {
-            DBG("NSP re-registering OK\r\n");
-            endpoint_registered = true;
+        else{
+            endpoint_ptr = nsdl_init_register_endpoint(endpoint_ptr, (uint8_t *)domain_name, (uint8_t*)endpoint_name, ep_type, lifetime_ptr);
+            if(sn_nsdl_register_endpoint(endpoint_ptr) != 0) {
+                DBG("NSP registering failed\r\n");
+                endpoint_registered = false;
+            }
+            else {
+                DBG("NSP registering OK\r\n");
+                endpoint_registered = true;
+            }
+            nsdl_clean_register_endpoint(&endpoint_ptr);
         }
-        nsdl_clean_register_endpoint(&endpoint_ptr);
 }
 
 bool nsdl_endpoint_is_registered(void) {
--- a/mesh_nework/AtmelRFDriverLib/low_level_RF.cpp	Thu Apr 09 03:07:58 2015 +0000
+++ b/mesh_nework/AtmelRFDriverLib/low_level_RF.cpp	Mon Apr 13 22:39:49 2015 +0000
@@ -14,7 +14,8 @@
 #elif defined(TARGET_NUCLEO_F411RE)
 SPI spi(SPI_MOSI, SPI_MISO, SPI_SCK);
 #else
-  "SPI not defined for this platform"
+/*  "SPI not defined for this platform" */
+SPI spi(D11, D12, D13);
 #endif
 
 DigitalOut RF_CS(D10);