Matthew Lister / X_NUCLEO_IDB0XA1

Files at this revision

API Documentation at this revision

Comitter:
Andrea Palmieri
Date:
Tue Oct 27 15:42:02 2015 +0100
Parent:
149:1758eaa54309
Child:
153:661dfc1a3088
Commit message:
Add delay before starting radio scan again

Signed-off-by: Andrea Palmieri <andrea.palmieri@st.com>

Changed in this revision

source/BlueNRGGap.cpp Show annotated file Show diff for this revision Revisions of this file
source/BlueNRGGattClient.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/source/BlueNRGGap.cpp	Tue Oct 27 10:22:40 2015 +0100
+++ b/source/BlueNRGGap.cpp	Tue Oct 27 15:42:02 2015 +0100
@@ -1029,6 +1029,9 @@
       
     } else {
       PRINTF("re-startRadioScan\n\r");
+      // FIXME: We need to wait for a while before creating a connection
+      // due to BlueNRG process queue handling
+      Clock_Wait(100);
       startRadioScan(_scanningParams);
     }
 
@@ -1041,7 +1044,7 @@
   
   uint8_t ret = BLE_STATUS_SUCCESS;
 
-  printf("Scanning...\n\r");
+  PRINTF("Scanning...\n\r");
 
   // We received a start scan request from the application level.
   // If we are on X-NUCLEO-IDB04A1 (playing a single role at time),
--- a/source/BlueNRGGattClient.cpp	Tue Oct 27 10:22:40 2015 +0100
+++ b/source/BlueNRGGattClient.cpp	Tue Oct 27 15:42:02 2015 +0100
@@ -544,9 +544,9 @@
   // Save the attribute_handle not provided by evt_att_read_resp    
   gattc->readCBParams.handle = attributeHandle;
   
-  // We need to wait for a while before starting a read due to
-  // BlueNRG process queue handling
-  Clock_Wait(100); //(?)
+  // FIXME: We need to wait for a while before starting a read
+  // due to BlueNRG process queue handling
+  Clock_Wait(100);
 
   ret = aci_gatt_read_charac_val(connHandle, attributeHandle);