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 updated issues with Maui (with Laerdal.Dfu) #48

Open
siki411 opened this issue May 16, 2024 · 0 comments
Open

dfu updated issues with Maui (with Laerdal.Dfu) #48

siki411 opened this issue May 16, 2024 · 0 comments

Comments

@siki411
Copy link

siki411 commented May 16, 2024

i am trying for dfu with maui and i have downloaded the laerdal.dfu 1.27.8 from Nuget Package then i created a function for picking up the file and i have also copy the zip file created by nordic for dfu then i have placed that file in mobile so i can select the file and it will start the dfu but i hit the function start it will destroy the dfu. i am sharing the code of instating the dfu and logs as well

private async Task StartDfuProcess(IPeripheral connectedDevice, string filePath)
{
try
{
//string Device_address = "C2:08:51:5F:5F:C0";
string Device_address = "D8:12:F2:92:46:8B";
var fileExists = File.Exists(filePath);
Debug.WriteLine($"File path exists: {fileExists}");

     if (!fileExists)
     {
         Debug.WriteLine("File does not exist, aborting DFU process.");
         return;
     }
     Debug.WriteLine("DFU process is about to start.");
     var _output = new DfuInstallation(Device_address, filePath);
 
     _output.Start();
     Debug.WriteLine("DFU process started successfully.");
 }
 catch (Exception ex)
 {
     Debug.WriteLine($"Error during DFU process: {ex.Message}");
 }

}

and logs are

[DOTNET] File selected: /data/data/com.companyname.bluetoothcourse/cache/2203693cc04e0be7f4f024d5f9499e13/8d01d97ef7354bc1828aa4125f15fa1c/dfu_application.zip
[0:] File path exists: True
[0:] DFU process is about to start.
[0:] DFU process started successfully.
[ViewRootImpl@5042f0f[IntermediateActivity]] stopped(false) old=true
[DfuBaseService] DFU service created. Version: 2.3.0
[ViewRootImpl@5042f0f[IntermediateActivity]] stopped(false) old=false
[SurfaceControl] assignNativeObject: nativeObject = 0 Surface(name=null)/@0xa550588 / android.view.SurfaceControl.readFromParcel:1121 android.view.IWindowSession$Stub$Proxy.relayout:1830 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
[SurfaceControl] assignNativeObject: nativeObject = 0 Surface(name=null)/@0xdb8cb9c / android.view.SurfaceControl.readFromParcel:1121 android.view.IWindowSession$Stub$Proxy.relayout:1840 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
[ViewRootImpl@5042f0f[IntermediateActivity]] Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) req=(1080,2340)4 dur=11 res=0x1 s={false 0} ch=false fn=-1
[ViewRootImpl@129f74a[MainActivity]] stopped(false) old=true
[DfuBaseService] Starting DFU service in foreground
Thread started: #23
[ViewRootImpl@129f74a[MainActivity]] stopped(false) old=false
[SurfaceControl] assignNativeObject: nativeObject = 0 Surface(name=null)/@0xf85a525 / android.view.SurfaceControl.readFromParcel:1121 android.view.IWindowSession$Stub$Proxy.relayout:1840 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
[ViewRootImpl@129f74a[MainActivity]] Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) req=(1080,2340)0 dur=14 res=0x7 s={true 488234582016} ch=true fn=-1
[DfuArchiveInputStream] Manifest failed to be parsed. Did you add
[DfuArchiveInputStream] -keep class no.nordicsemi.android.dfu.** { *; }
[DfuArchiveInputStream] to your proguard rules?
[DfuBaseService] An exception occurred while calculating file size
[DfuBaseService] java.io.IOException: The ZIP file must contain an Application, a Soft Device and/or a Bootloader.
[DfuBaseService] at no.nordicsemi.android.dfu.internal.ArchiveInputStream.(ArchiveInputStream.java:269)
[DfuBaseService] at no.nordicsemi.android.dfu.DfuBaseService.openInputStream(DfuBaseService.java:1457)
[DfuBaseService] at no.nordicsemi.android.dfu.DfuBaseService.onHandleIntent(DfuBaseService.java:1201)
[DfuBaseService] at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:77)
[DfuBaseService] at android.os.Handler.dispatchMessage(Handler.java:106)
[DfuBaseService] at android.os.Looper.loop(Looper.java:246)
[DfuBaseService] at android.os.HandlerThread.run(HandlerThread.java:67)
[SurfaceControl] assignNativeObject: nativeObject = 0 Surface(name=null)/@0xa550588 / android.view.SurfaceControl.readFromParcel:1121 android.view.IWindowSession$Stub$Proxy.relayout:1830 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
[SurfaceControl] assignNativeObject: nativeObject = 0 Surface(name=null)/@0xdb8cb9c / android.view.SurfaceControl.readFromParcel:1121 android.view.IWindowSession$Stub$Proxy.relayout:1840 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995
[ViewRootImpl@5042f0f[IntermediateActivity]] Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) req=(1080,2340)8 dur=18 res=0x1 s={false 0} ch=false fn=-1
[ViewRootImpl@5042f0f[IntermediateActivity]] dispatchDetachedFromWindow
[InputTransport] Input channel destroyed: '2d42ebf', fd=103
[ViewRootImpl@129f74a[MainActivity]] MSG_WINDOW_FOCUS_CHANGED 1 1
[InputMethodManager] prepareNavigationBarInfo() DecorView@9dac42e[MainActivity]
[InputMethodManager] getNavigationBarColor() -855310
[InputMethodManager] prepareNavigationBarInfo() DecorView@9dac42e[MainActivity]
[InputMethodManager] getNavigationBarColor() -855310
[InputMethodManager] Starting input: tba=com.companyname.bluetoothcourse ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
The thread 0x17 has exited with code 0 (0x0).
[InputMethodManager] startInputInner - Id : 0
[InputMethodManager] startInputInner - mService.startInputOrWindowGainedFocus
[InputTransport] Input channel constructed: 'ClientS', fd=90
[DfuBaseService] DFU service destroyed
Thread finished: #23
[SurfaceControl] nativeRelease nativeObject s[488234561536]

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

1 participant