Tested with Nucleo L476RG

Dependencies:   BLE_API X_NUCLEO_IDB0XA1 mbed

Fork of BLE_HeartRate_IDB0XA1 by ST

Files at this revision

API Documentation at this revision

Comitter:
kartjang
Date:
Sat Jan 07 14:24:35 2017 +0000
Parent:
21:0e7c08f5386f
Commit message:
ST Nucleo IDB05A1 BLE test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Oct 05 09:16:58 2016 +0000
+++ b/main.cpp	Sat Jan 07 14:24:35 2017 +0000
@@ -20,7 +20,7 @@
 
 DigitalOut led1(LED1, 1);
 
-const static char     DEVICE_NAME[]        = "HRM1";
+const static char     DEVICE_NAME[]        = "ST_NucleoIDB05A1";
 static const uint16_t uuid16_list[]        = {GattService::UUID_HEART_RATE_SERVICE};
 
 static volatile bool  triggerSensorPolling = false;
@@ -29,6 +29,7 @@
 {
     (void)params;
     BLE::Instance().gap().startAdvertising(); // restart advertising
+    printf("[BLE] disconnectionCallback() ...\n");
 }
 
 void periodicCallback(void)
@@ -44,6 +45,7 @@
     (void)ble;
     (void)error;
    /* Initialization error handling should go here */
+    printf("[BLE] onBleInitError() ...\n");
 }
 
 void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)
@@ -96,6 +98,7 @@
             ble.waitForEvent(); // low power wait for event
         }
     }
+    printf("[BLE] bleInitComplete() ...\n");
 }
 
 int main(void)
@@ -104,5 +107,6 @@
     ticker.attach(periodicCallback, 1); // blink LED every second
 
     BLE::Instance().init(bleInitComplete);
+    printf("[BLE] main() ...\n");
 }