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.
Revision 4:44690f4495ef, committed 2019-03-22
- Comitter:
- lru
- Date:
- Fri Mar 22 10:11:59 2019 +0000
- Parent:
- 3:6f1e1510dd3e
- Commit message:
- Initialized properly device name characteristic and changed type of advertising MAC address used to guarantee uniqueness.
Changed in this revision
| source/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6f1e1510dd3e -r 44690f4495ef source/main.cpp
--- a/source/main.cpp Mon Mar 18 11:17:10 2019 +0000
+++ b/source/main.cpp Fri Mar 22 10:11:59 2019 +0000
@@ -76,12 +76,15 @@
}
void start_advertising() {
+ _ble.gap().setDeviceName((const uint8_t *)DEVICE_NAME);
+
/* Create advertising parameters and payload */
ble::AdvertisingParameters adv_parameters(
ble::advertising_type_t::CONNECTABLE_UNDIRECTED,
ble::adv_interval_t(ble::millisecond_t(1000))
);
+ adv_parameters.setOwnAddressType(ble::own_address_type_t::RESOLVABLE_PRIVATE_ADDRESS_PUBLIC_FALLBACK);
_adv_data_builder.setFlags();
_adv_data_builder.setLocalServiceList(mbed::make_Span(&_primary_uuid, 1));