Future Electronics
/
sequana-ble-lab-base
This is a basic code to be used for Sequana BLE Lab exercises.
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 |
--- 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));