Open Umer-Mahmood opened 1 year ago
Try using this in your appdelgate.cs NativeDeviceIdHelper.GetIdFromNativeDevice = o => { if (o is CBPeripheral bt) { return bt.Identifier.ToString(); }
return null;
};
I already do this as:
public class NativeBluetoothDeviceInfoService : INativeBluetoothDeviceInfoService
{
public string GetDeviceAddress(Plugin.BLE.Abstractions.Contracts.IDevice device)
{
var nativeDevice = device.NativeDevice as CoreBluetooth.CBPeripheral;
return nativeDevice.Identifier.ToString();
}
}
And before starting dfu I call it as:
_deviceId = _nativeDeviceService.GetDeviceAddress(BleSubscriber.Instance.CurrentBleDevice.Device);
var updater = new Laerdal.Dfu.DfuInstallation(_deviceId, dfuFilePath);
updater.Start();
I looks like I get the right device Id back from the native service. It seems like it is not caused by the wrong device id or file path. Is there any sample for iOS implementation or xamarin forms implementation anywhere?
@Umer-Mahmood did you get anywhere with this. I think we're hitting a similar issue but we're trying to do this with MAUI (net-6.0-ios) and not having much luck on iOS.
@baddinosaur-kyle Unfortunatly no progress on this mainly because I didn't get a chance to work further on this. I will definitly post here if I figure something out.
Describe the bug Device firmware update works for android but fails for iOS as soon as I call
Start()
method onLaerdal.Dfu.DfuInstallation
instance. To Reproduce Steps to reproduce the behavior:Laerdal.Dfu 1.25.2
in shared project, android project and iOS projectExpected behavior The device firmware process should start successfully as it does in android.
Call stack
Smartphone (please complete the following information):
Additional context The exception does not seem to depend on what I pass as device id and dfu file path.