Skip to content

Commit 6e8bc21

Browse files
committed
factorysetup: don't skip BLE if already flashed
If the BLE boot check failed further below, repeating the factory setup made it report success, as _verify_ble() only checks if the BLE firmware was flashed properly already, and the boot check is skipped in that case. For now we simply remove this check so every attempt tries the whole BLE setup & verification procedure. To be refactored later.
1 parent e2eed40 commit 6e8bc21

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/factorysetup.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -512,13 +512,6 @@ static ble_error_code_t _setup_ble(void)
512512
return BLE_ERR_FW_NOT_ALLOWED;
513513
}
514514

515-
// BLE already setup, no need to repeat it. This saves a lot of time when repeating the
516-
// factorysetup of a device, as then we can skip the time-consuming chip erase below.
517-
if (_verify_ble(ble_fw_hash, checksum) == BLE_OK) {
518-
screen_print_debug("Skipping BLE setup.\nAlready done.", 0);
519-
return BLE_OK;
520-
}
521-
522515
spi_mem_protected_area_unlock();
523516

524517
// Erase chip.

0 commit comments

Comments
 (0)