This is a simple program to work with RedBearLab BLE Controller App. Type something from the Terminal to send to the BLEController App or vice verse. Characteristics received from App will print on Terminal. This version works on the first hw version of the BLE Nano (1)

Dependencies:   BLE_API mbed nRF51822

Fork of nRF51822_SimpleChat by RedBearLab

Revision:
4:d7872f84c03c
Parent:
2:4b66b69c7ecb
Child:
5:ee7e1a9e1985
--- a/main.cpp	Mon Jul 27 06:52:44 2015 +0000
+++ b/main.cpp	Thu Mar 31 15:20:16 2016 +0000
@@ -81,9 +81,7 @@
         memset(txPayload, 0, TXRX_BUF_LEN);
         memcpy(txPayload, buf, TXRX_BUF_LEN);       
         pc.printf("WriteHandler \r\n");
-        pc.printf("Length: ");
-        pc.putc(bytesRead);
-        pc.printf("\r\n");
+        pc.printf("Length: %d \r\n", nbytesRead);
         pc.printf("Data: ");
         for(index=0; index<bytesRead; index++)
         {
@@ -102,9 +100,7 @@
         {
             ble.updateCharacteristicValue(rxCharacteristic.getValueAttribute().getHandle(), rx_buf, rx_len); 
             pc.printf("RecHandler \r\n");
-            pc.printf("Length: ");
-            pc.putc(rx_len);
-            pc.printf("\r\n");
+            pc.printf("Length: %d \rn\n",rx_len);            
             rx_len = 0;
             break;
         }