Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1ad5406

Browse filesBrowse files
aridetSuGlider
andauthored
Fix BluetoothSerial thinking it's disconnected (espressif#7372)
Currently, if a second connection occur in Bluetooth, this second connection is automatically disconnected (line 284). This disconnection trigger the ESP_SPP_CLOSE_EVT, which clear the bit SPP_CONNECTED. But the first connection remain active, and this flag shouldn't be cleared. This fix the issue, by clearing the flag only if the last connection is closed Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
1 parent 72e79f0 commit 1ad5406
Copy full SHA for 1ad5406

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎libraries/BluetoothSerial/src/BluetoothSerial.cpp

Copy file name to clipboardExpand all lines: libraries/BluetoothSerial/src/BluetoothSerial.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
301301
xEventGroupSetBits(_spp_event_group, SPP_DISCONNECTED);
302302
xEventGroupSetBits(_spp_event_group, SPP_CONGESTED);
303303
xEventGroupSetBits(_spp_event_group, SPP_CLOSED);
304+
xEventGroupClearBits(_spp_event_group, SPP_CONNECTED);
304305
}
305-
xEventGroupClearBits(_spp_event_group, SPP_CONNECTED);
306306
} else {
307307
log_e("ESP_SPP_CLOSE_EVT failed!, status:%d", param->close.status);
308308
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.