Skip to content

Commit 6d22f3d

Browse files
sgbihuSidLeung
authored andcommitted
Jira 832 Sketch cannot exercise BLE broadcast, git 420
Root Cause: Need to restart advertising after setting the broadcast option in Characteristic. Otherwise, broadcasting would not take effect. Code mods: 1. libraries/CurieBLE/src/BLECharacteristic.cpp: - At the processing of the Boardcast option in the characteristic, stop and restart advertising if advertising has already started.
1 parent a2df179 commit 6d22f3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/CurieBLE/src/BLECharacteristic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ bool BLECharacteristic::broadcast()
294294
if (BLEDeviceManager::instance()->advertising())
295295
{
296296
BLEDeviceManager::instance()->stopAdvertising();
297-
BLEDeviceManager::instance()->startAdvertising();
298297
}
298+
BLEDeviceManager::instance()->startAdvertising();
299299
return _broadcast;
300300
}
301301

0 commit comments

Comments
 (0)