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 213:781abfbf2d1c, committed 2016-03-18
- Comitter:
- Andrea Palmieri
- Date:
- Fri Mar 18 12:05:22 2016 +0100
- Parent:
- 211:5a6929d36db2
- Child:
- 214:926ca3e4ccce
- Commit message:
- Let update ADV data while advertising
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 |
--- a/source/BlueNRGGap.cpp Thu Jan 14 10:59:36 2016 +0100
+++ b/source/BlueNRGGap.cpp Fri Mar 18 12:05:22 2016 +0100
@@ -283,6 +283,21 @@
//Set the SCAN_RSP Payload
scan_response_payload = scanResponse.getPayload();
scan_rsp_length = scanResponse.getPayloadLen();
+
+ // Update the ADV data if we are already in ADV mode
+ if(AdvLen > 0 && state.advertising == 1) {
+
+ tBleStatus ret = aci_gap_update_adv_data(AdvLen, AdvData);
+ if(BLE_STATUS_SUCCESS!=ret) {
+ PRINTF("error occurred while adding adv data (ret=0x%x)\n", ret);
+ switch (ret) {
+ case BLE_STATUS_TIMEOUT:
+ return BLE_STACK_BUSY;
+ default:
+ return BLE_ERROR_UNSPECIFIED;
+ }
+ }
+ }
}
return BLE_ERROR_NONE;
}
