Connect the BLE_UART Console to a PC USB/Serial Console. Data written to PC console is sent over BLE UART Data received from BLE UART is displayed in PC console

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_LED_Controller by UCL IoT

Revision:
17:4aa151182398
Parent:
16:3faefe15a4a4
Child:
18:5f8cd32ff343
--- a/main.cpp	Fri Feb 13 15:14:27 2015 +0000
+++ b/main.cpp	Fri Feb 13 16:05:26 2015 +0000
@@ -61,12 +61,14 @@
 /* Periodic Ticker callback */
 void rxInterrupt(void)
 {
-     if (pcUart.readable()) {
-        char s[2];
-        s[1]=0;
-        s[0]=pcUart.getc();
- //       DEBUG("-%c_",s[0]);   
-        uartServicePtr->write(s,1);
+     while (pcUart.readable()) {
+         if (pcUart.readable()) {
+            char s[2];
+            s[1]=0;
+            s[0]=pcUart.getc();
+     //       DEBUG("-%c_",s[0]);   
+            uartServicePtr->write(s,1);
+         }
     }  
 }