Skip to content

Commit 7bd2bbe

Browse files
committed
Fix examples
1 parent c519c62 commit 7bd2bbe

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/Advanced/NimBLE_Server/main/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void app_main(void) {
233233
/** If your device is battery powered you may consider setting scan response
234234
* to false as it will extend battery life at the expense of less data sent.
235235
*/
236-
pAdvertising->setScanResponse(true);
236+
pAdvertising->enableScanResponse(true);
237237
pAdvertising->start();
238238

239239
printf("Advertising Started\n");

examples/NimBLE_server_get_client_name/main/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ extern "C" void app_main(void) {
6060

6161
BLEAdvertising* pAdvertising = NimBLEDevice::getAdvertising();
6262
pAdvertising->addServiceUUID(SERVICE_UUID);
63-
pAdvertising->setScanResponse(true);
63+
pAdvertising->enableScanResponse(true);
6464

6565
pAdvertising->start();
6666
printf("Advertising started, connect with your phone.\n");

examples/basic/BLE_notify/main/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void app_main(void) {
152152
// Start advertising
153153
BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
154154
pAdvertising->addServiceUUID(SERVICE_UUID);
155-
pAdvertising->setScanResponse(false);
155+
pAdvertising->enableScanResponse(false);
156156
/** This method had been removed **
157157
pAdvertising->setMinPreferred(0x0); // set value to 0x00 to not advertise this parameter
158158
**/

examples/basic/BLE_server/main/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,27 @@ void app_main(void) {
3131
BLEService *pService = pServer->createService(SERVICE_UUID);
3232
BLECharacteristic *pCharacteristic = pService->createCharacteristic(
3333
CHARACTERISTIC_UUID,
34-
/***** Enum Type NIMBLE_PROPERTY now *****
34+
/***** Enum Type NIMBLE_PROPERTY now *****
3535
BLECharacteristic::PROPERTY_READ |
36-
BLECharacteristic::PROPERTY_WRITE
36+
BLECharacteristic::PROPERTY_WRITE
3737
);
3838
*****************************************/
3939
NIMBLE_PROPERTY::READ |
40-
NIMBLE_PROPERTY::WRITE
40+
NIMBLE_PROPERTY::WRITE
4141
);
4242

4343
pCharacteristic->setValue("Hello World says Neil");
4444
pService->start();
4545
// BLEAdvertising *pAdvertising = pServer->getAdvertising(); // this still is working for backward compatibility
4646
BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
4747
pAdvertising->addServiceUUID(SERVICE_UUID);
48-
pAdvertising->setScanResponse(true);
49-
48+
pAdvertising->enableScanResponse(true);
49+
5050
/** These methods have been removed **
5151
pAdvertising->setMinPreferred(0x06); // functions that help with iPhone connections issue
5252
pAdvertising->setMinPreferred(0x12);
5353
*/
54-
54+
5555
BLEDevice::startAdvertising();
5656
printf("Characteristic defined! Now you can read it in your phone!\n");
5757
}

0 commit comments

Comments
 (0)