.

Demo for periodic advertising. This requires two devices to run. Both devices run the same program. They attempt to find each other after which they adopt complementary roles. One sets up periodic advertising. The other attempts to scan and sync with the periodic advertising.

The role of the scanner device can also be performed by a BLE scanner on a smartphone. Connect to the advertiser. This will establish it as the advertiser. After you disconnect the device will begin periodic advertising. The canonical source for this example lives at https://github.com/ARMmbed/mbed-os-example-ble/tree/master/BLE_PeriodicAdvertising

Running the application

Requirements

Devices must support extended advertising and periodic advertising (Bluetooth version 5+).

The sample application can also be monitored by any BLE scanner on a smartphone.

If you don't have a scanner on your phone, please install:

Information about activity is printed over the serial connection - please have a client open. You may use:

Building instructions

Building instructions for all samples are in the https:github.com/ARMmbed/mbed-os-example-ble/blob/master/README.md.

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Thu Aug 15 17:02:13 2019 +0100
Parent:
2:9696401f0c19
Commit message:
Merge pull request #252 from donatieng/mbed_os_update

Update Master branch to use Mbed OS 5.13.1
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-ble

Changed in this revision

mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
diff -r 9696401f0c19 -r 68c67fc9134e mbed-os.lib
--- a/mbed-os.lib	Wed Feb 27 13:02:26 2019 +0000
+++ b/mbed-os.lib	Thu Aug 15 17:02:13 2019 +0100
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#51d55508e8400b60af467005646c4e2164738d48
+https://github.com/ARMmbed/mbed-os/#5941d1718339116cd12914238ec331c84da3d08f
diff -r 9696401f0c19 -r 68c67fc9134e mbed_app.json
--- a/mbed_app.json	Wed Feb 27 13:02:26 2019 +0000
+++ b/mbed_app.json	Thu Aug 15 17:02:13 2019 +0100
@@ -13,14 +13,10 @@
             "target.extra_labels_add": ["CORDIO", "CORDIO_BLUENRG"]
         },
         "NRF52840_DK": {
-            "target.features_add": ["BLE"],
-            "target.extra_labels_add": ["CORDIO", "CORDIO_LL", "SOFTDEVICE_NONE", "NORDIC_CORDIO"],
-            "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_S140_FULL", "NORDIC_SOFTDEVICE"]
+            "target.features_add": ["BLE"]
         },
         "NRF52_DK": {
-            "target.features_add": ["BLE"],
-            "target.extra_labels_add": ["CORDIO", "CORDIO_LL", "SOFTDEVICE_NONE", "NORDIC_CORDIO"],
-            "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_S132_FULL", "NORDIC_SOFTDEVICE"]
+            "target.features_add": ["BLE"]
         }
     }
 }