Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of X_NUCLEO_IDB0XA1 by
Revision 156:662bb3992a03, committed 2015-10-28
- Comitter:
- Wolfgang Betz
- Date:
- Wed Oct 28 14:04:55 2015 +0100
- Parent:
- 155:3aa64b6ac12d
- Child:
- 157:e27f00b5e251
- Commit message:
- Workaround for discovery latencies
Changed in this revision
| source/BlueNRGGap.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/source/BlueNRGGap.cpp Wed Oct 28 08:57:21 2015 +0100
+++ b/source/BlueNRGGap.cpp Wed Oct 28 14:04:55 2015 +0100
@@ -1053,11 +1053,18 @@
PRINTF("BTLE re-init\n\r");
}
- ret = aci_gap_start_general_discovery_proc(scanningParams.getInterval(),
- scanningParams.getWindow(),
- addr_type,
- 1); // 1 to filter duplicates
+ while((ret = aci_gap_start_general_discovery_proc(scanningParams.getInterval(),
+ scanningParams.getWindow(),
+ addr_type,
+ 1) // 1 to filter duplicates
+ ) == ERR_COMMAND_DISALLOWED) {
+ PRINTF("betzw: wait a bit ...\n\r");
+ // FIXME: We need to wait for a while before creating a connection
+ // due to BlueNRG process queue handling
+ Clock_Wait(1000);
+ }
+
if (ret != BLE_STATUS_SUCCESS) {
printf("Start Discovery Procedure failed (0x%02X)\n\r", ret);
return BLE_ERROR_UNSPECIFIED;
