-
Notifications
You must be signed in to change notification settings - Fork 17
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
DfuInstallation.Start() Exception thrown on .Net MAUI #27
Comments
What BLE Nuget are you using? @MouratidisA |
@ISSPRO-Eng I am using this NuGet package Plugin.BLE version 3.0.0. |
Okay. I am currently porting over a DFU application from Xamarin. Forms to MAUI, so I can help out once I get there. Do you have a public repo of the DFU app you have currently? No worries if you don't @MouratidisA |
Hi guys, I'm sorry I have very little time to contribute here. I have heard that one of our team has experienced that too. Not sure what the fix for it should be though. If one of you finds a fix, and has the time, I'd love to approve a PR on this 👍👍 |
Hey @framinosona , I'm not very experienced with NuGet package development, but I'm willing to give it a shot and assist with this issue. I've noticed there might be problems related to the |
@MouratidisA Did you have a working Xamarin.Forms version of the DFU Process? I could share that with you if that would help as well. Also, I am unable to set the File URL as it is protected in the updated nuget. Any idea how to get around this? public FileInfo SelectedFirmwareFile |
@ISSPRO-Eng You can use my |
at Laerdal.Dfu.Bindings.iOS.DFUFirmware..ctor(NSUrl urlToZipFile, NSError& error) @MouratidisA Same error here now... guess it is time to start trying to modify the nuget. |
@MouratidisA Have you tried on an Android device or only iOS? |
I'm getting the same error using Net MAUI v8 on iOS.
|
@juniorsaraviao Jumping back onto this project. Any luck with either iOS or Android? I of not need notifications or even to configure anything. Just need to select device and firmware file and send over. Everything else can be default for the time being. |
@ISSPRO-Eng I'm still getting issues on iOS, but there's a workaround to avoid
|
Going back to the original topic of this issue (the iOS error), the exception
seems to occur in the SetInitiator()-Method of the iOS specific DfuInstallation.cs in line 26:
As someone mentioned in another issue, nordic seems to have switched from NSUrl to Url type in their library implementation.
and accordingly changing the DFUFirmware interface in ApiDefinition.cs of ObjC and Sharpie from NSUrl to Url fix this issue? |
For those interested, the issue is in the native bindings: dotnet/maui#29 |
Describe the bug
I tried to implement the DFU on a .NET MAUI application, but it seems that when I create the DfuInstallation object and call the Start() function the process throws an Exception with a message:
Exception of type 'Foundation.You_Should_Not_Call_base_In_This_Method' was thrown.
To Reproduce
Steps to reproduce the behavior:
To download the firmware File:
To launch the update process:
FileUrl value: /var/mobile/Containers/Data/Application/537D36A3-7D6D-4A0F-B78A-8A03F85CEFEF/Documents/app_dfu_package.zip
Expected behavior
Start and complete the DFU process with the BLE device.
Exception information
Source: Laerdal.Dfu.Bindings.iOS
Message: Exception of type 'Foundation.You_Should_Not_Call_base_In_This_Method' was thrown.
StackTrace:
at Laerdal.Dfu.Bindings.iOS.DFUFirmware..ctor(NSUrl urlToZipFile, NSError& error)
at Laerdal.Dfu.DfuServiceInitiatorDelegate..ctor(DfuInstallation dfuInstallation)
at Laerdal.Dfu.DfuInstallation.Start(DfuConfiguration configuration)
at ProjectName.ViewModels.FirmwareUpdatePopUpViewModel.GetDfuInstallation() in /Users/username/ProjectName/ProjectName/ViewModels/FirmwareUpdatePopUpViewModel.cs: line 264
line 264 has the command Start command
Environment:
Additional context
I've tried to recreate the exception on Android 12, but the debugger gets disconnected when reaches the start command.
(I am using wireless debug, due to maui issues #16274.
Is there an active example on MAUI I can follow?
The text was updated successfully, but these errors were encountered: