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.
Dependencies: BLE_API mbed nRF51822
Fork of BLE_Observer by
Revision 3:50a7d47912b2, committed 2015-05-18
- Comitter:
- rgrover1
- Date:
- Mon May 18 09:04:39 2015 +0000
- Parent:
- 2:e38ee32ba685
- Child:
- 4:dd8231564124
- Commit message:
- switch to new APIs around scanning.
Changed in this revision
--- a/BLE_API.lib Wed May 13 07:56:30 2015 +0000 +++ b/BLE_API.lib Mon May 18 09:04:39 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#0e714ad205b4 +http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#ca6b956b33d1
--- a/main.cpp Wed May 13 07:56:30 2015 +0000
+++ b/main.cpp Mon May 18 09:04:39 2015 +0000
@@ -25,18 +25,14 @@
led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */
}
-void advertisementCallback(const Gap::address_t peerAddr,
- int8_t rssi,
- bool isScanResponse,
- Gap::AdvertisementType_t type,
- uint8_t advertisingDataLen,
- const uint8_t *advertisingData) {
+void advertisementCallback(const Gap::AdvertisementCallbackParams_t *params) {
+
printf("Adv peerAddr: [%02x %02x %02x %02x %02x %02x] rssi %d, ScanResp: %u, AdvType: %u\r\n",
- peerAddr[5], peerAddr[4], peerAddr[3], peerAddr[2], peerAddr[1], peerAddr[0], rssi, isScanResponse, type);
+ params->peerAddr[5], params->peerAddr[4], params->peerAddr[3], params->peerAddr[2], params->peerAddr[1], params->peerAddr[0],
+ params->rssi, params->isScanResponse, params->type);
#if DUMP_ADV_DATA
- unsigned index = 0;
- for (; index < advertisingDataLen; index++) {
- printf("%02x ", advertisingData[index]);
+ for (unsigned index = 0; index < params->advertisingDataLen; index++) {
+ printf("%02x ", params->advertisingData[index]);
}
printf("\r\n");
#endif /* DUMP_ADV_DATA */
--- a/nRF51822.lib Wed May 13 07:56:30 2015 +0000 +++ b/nRF51822.lib Mon May 18 09:04:39 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#03a9fc49c21e +http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#3b34428e80ea
