Without this reset, if provision() was called first and incremented
passwordIndex, a subsequent readConfig() call would start at the wrong
password index and potentially skip the correct password entirely.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- DX-Smart auth now tries multiple passwords in sequence (555555, dx1234, 000000)
instead of hardcoding a single password. Matches Android behavior for better
compatibility across firmware versions.
- Added ProvisioningError enum with structured error codes (CONNECTION_FAILED,
AUTH_FAILED, SERVICE_NOT_FOUND, WRITE_FAILED, etc.) matching Android's
BeaconConfig error codes. All fail() calls now tagged with codes for better
debugging and error reporting.
- Added ProvisioningResult.failureWithCode case and handling in ScanView.
- Added missing API endpoints that Android has:
- getBusiness() - single business fetch
- getBusinessName() - cached business name lookup
- allocateServicePointMinor() - minor value allocation
- Fixed stray print() in Api.swift to use DebugLog.shared.log() for consistency.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>