BLE mbed Endpoint network stack for mbedConnectorInterface. The stack makes use of a special BLE Socket abstraction to create socket() semantics over BLE.

Dependencies:   libnsdl_m0 BLE_API Base64 nRF51822 SplitterAssembler

Revision:
5:9233e88b9c83
Parent:
2:30f4a0dab604
Child:
6:98af441fd960
--- a/NSDL/nsdl_support.cpp	Sat Feb 14 08:45:12 2015 +0000
+++ b/NSDL/nsdl_support.cpp	Mon Feb 16 06:37:35 2015 +0000
@@ -137,9 +137,6 @@
         register_endpoint(false);
         DBG("NSP: (re)registering complete.\r\n");
     }
-    else {
-        DBG("NSP: BLE not connected. Skipping re-registration...\r\n");
-    }
 }
 
 void nsdl_init() {    
@@ -194,12 +191,13 @@
         ble.waitForEvent();
         
         // only process if we are registered and thus connected... otherwise ignore
-        if (__registered) {
+        if (__registered == true) {
             //DBG("NSP: waiting for data...\r\n");
             int n = server.receiveFrom(from,nsp_buffer,sizeof(nsp_buffer));
-    
-            //DBG("NSP: received %d bytes... processing..\r\n.",n);
-            if (n >= 0) sn_nsdl_process_coap((uint8_t*)nsp_buffer,n,&received_packet_address);  
+            if (n >= 0) {
+                DBG("NSP: received %d bytes... processing..\r\n.",n);
+                sn_nsdl_process_coap((uint8_t*)nsp_buffer,n,&received_packet_address); 
+            } 
         }      
      }
 }
\ No newline at end of file