Validate reliable and repeatable BLE DFU updates from the iOS app to an ESP32 target using Nordic Legacy DFU semantics.
This plan covers:
- Device discovery and selection
- DFU transfer behavior and stage transitions
- Recovery behavior (disconnect, cancel, retry)
- File handling and error surfacing
- Stability across repeated update cycles
This plan does not cover:
- Firmware business logic validation beyond successful boot
- Security hardening of the firmware image format
- iPhone running iOS 16+
- ESP32 device running compatible DFU firmware
- Stable power source for ESP32
- At least one known-good firmware binary
- At least one intentionally invalid file
- Bluetooth permission is granted to the app.
- The ESP32 advertises the expected DFU service UUID.
- The firmware file is accessible from Files/iCloud/local storage.
- iPhone battery > 20% and ESP32 power is stable.
- Launch app and scan for devices.
- Select target ESP32.
- Select valid firmware binary.
- Start DFU.
- Wait for completion.
Expected:
- Stage transitions progress in order to Completed.
- Progress reaches 100%.
- ESP32 reboots and runs updated firmware.
- Select an invalid or non-firmware file.
- Start DFU.
Expected:
- DFU does not proceed successfully.
- Error message is visible and actionable.
- App remains responsive and does not crash.
- Start DFU with valid firmware.
- During transfer, force disconnect (move out of range / power cycle target).
Expected:
- Session transitions to retry flow when enabled.
- If retries are exhausted, stage transitions to Failed.
- User can restart DFU afterward.
- Start DFU.
- Tap Cancel during firmware upload.
Expected:
- Current operation is aborted cleanly.
- Stage reports cancellation/failure state consistently.
- No stuck BLE connection remains.
- Cause one transient disconnect.
- Ensure auto reconnect is enabled.
- Verify operation resumes via retry path.
Expected:
- Retry message appears.
- Workflow either completes or exits with clear error.
- No app restart is required.
- Perform 5 to 10 successful updates in sequence.
Expected:
- No crash or significant responsiveness degradation.
- Memory usage remains stable (no obvious leak pattern).
- Device remains discoverable and updatable each cycle.
Run TC-01 and TC-03 against at least these combinations:
- PRN: 0, default, high value
- MTU preference: minimum, default, maximum
- Auto reconnect: on and off
- App remains usable while scanning and during long transfer.
- Screen awake behavior follows settings during active DFU.
- Localization changes do not break runtime status rendering.
- Zero crashes in all planned scenarios.
- Deterministic stage behavior for success/failure.
- Correct and understandable user-facing error messages.
- Firmware boots after successful update.
- iOS logs with timestamps for DFU stages and BLE events
- ESP32 serial logs around update, validate, reboot
- Firmware hash/version before and after update
- Video capture for at least one happy path and one failure path
Testing can be considered complete when:
- All functional cases pass on at least one target device.
- Critical and high severity defects are resolved.
- Retry/cancel behavior has been validated at least twice.