Improve BLE scan reliability for BMS selection

This commit is contained in:
2026-06-04 02:02:09 -06:00
parent 35c0b4ca61
commit 94687abbf4
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -85,6 +85,9 @@ int scanBleDevices(uint32_t scanSeconds) {
Serial.println("BLE: Disconnecting BMS before scan");
client->disconnect();
bmsData.connected = false;
Serial.println("BLE: Waiting for device advertising...");
delay(2000);
}
bleScanResultCount = 0;
@@ -356,7 +356,7 @@ void handleDebugSerial() {
}
if (command == "scan ble") {
int count = scanBleDevices(10);
int count = scanBleDevices(20);
if (count == 0) {
Serial.println("No BLE devices found.");