Commit d32fa5c
committed
Manually restart BLE advertising after disconnect to prevent stack freeze
Replaced use of `restartOnDisconnect(true)` with explicit (existing) manual re-advertising logic.
This avoids Bluetooth stack instability caused by overlapping advertising state,
Changes:
- Added explicit `Bluefruit.Advertising.stop()` and data clears in `startAdv()`
- Disabled automatic restart with `restartOnDisconnect(false)`
- Re-advertising now fully handled in `checkRecvFrame()` loop
Tested on: iPhone, Android, Windows, and Chrome – confirmed stable reconnects and name visibility.1 parent ec98d5f commit d32fa5c
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | | - | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | | - | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
0 commit comments