Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DFU Fails on iOS but Succeeds on Android (DFU Error Code : 302) #159

Open
Soulddgy opened this issue Aug 8, 2024 · 1 comment
Open

DFU Fails on iOS but Succeeds on Android (DFU Error Code : 302) #159

Soulddgy opened this issue Aug 8, 2024 · 1 comment

Comments

@Soulddgy
Copy link

Soulddgy commented Aug 8, 2024

I'm experiencing an issue with DFU on iOS. While the DFU process works correctly on Android, it fails on iOS. I am using the same MAC address and UUID for both the bootloader and Bluetooth device, which seems to be causing the problem.
On iOS, I receive a "DFU Service not found" error. I suspect this is related to the way iOS handles Bluetooth connections. Any guidance or suggestions would be greatly appreciated.

console :

flutter: remote id for dfu : 6949E5E4-3A02-F8AA-AD92-B9DE3583AE72
flutter: 1-2024-08-08 13:50:56.772355 -- PublishingManager::publish - entered with topic D1
flutter: DFU error: PlatformException(302, DFU FAILED: DFU Service not found, Address: 6949E5E4-3A02-F8AA-AD92-B9DE3583AE72, Error type 302, null)

And this is my startDfu code :

image

@shubhamsinghshubham777
Copy link
Contributor

Try disabling alternativeAdvertisingNameEnabled in iosSpecialParameter like so:

final result = await NordicDfu().startDfu(
  remoteId,
  filePath,
  fileInAsset: false,,
  forceDfu: true,
  iosSpecialParameter: IosSpecialParameter(
    alternativeAdvertisingNameEnabled: false,
  ),
  enableUnsafeExperimentalButtonlessServiceInSecureDfu: true,
  progressChanged: (
    _,
    percent,
    __,
    ___,
    ____,
    _____
  ) {
    progress.value = percent / 100.0;
  },
);
print('DFU result: $result');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants