Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions ShimmerBLE/ShimmerBLEAPI.iOS/Communications/VerisenseBLEManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Plugin.BLE.Abstractions.Contracts;
using shimmer.Communications;
using ShimmerBLEAPI.Communications;
using ShimmerBLEAPI.Devices;
using ShimmerBLEAPI.iOS.Communications;
using ShimmerBLEAPI.Models;
using System;
Expand Down Expand Up @@ -34,7 +35,7 @@ private void BLEManager_BLEEvent(object sender, BLEManagerEvent e)
}
else if (e.CurrentEvent == shimmer.Communications.BLEManagerEvent.BLEAdapterEvent.DevicePaired)
{
Console.WriteLine(((VerisenseBLEScannedDevice)e.objMsg).Uuid.ToString() + " is paired.");
Console.WriteLine(((VerisenseBLEDeviceIOS)e.objMsg).Asm_uuid.ToString() + " is paired.");
}
}
public List<VerisenseBLEScannedDevice> GetListOfScannedDevices()
Expand Down Expand Up @@ -102,9 +103,15 @@ public static bool GetBondingStatus(string id)

return isBonded;
}
public Task<bool> PairVerisenseDevice(object Device, IBLEPairingKeyGenerator generator)
public async Task<bool> PairVerisenseDevice(object Device, IBLEPairingKeyGenerator generator)
{
throw new NotImplementedException();
var pairingResult = await ((VerisenseBLEDeviceIOS)Device).PairDeviceAsync();
if (pairingResult)
{
if (BLEManagerEvent != null)
BLEManagerEvent.Invoke(null, new BLEManagerEvent { CurrentEvent = shimmer.Communications.BLEManagerEvent.BLEAdapterEvent.DevicePaired, objMsg = (VerisenseBLEDeviceIOS)Device, message = "Device Is Successfully Paired" });
}
return pairingResult;
}

public void StopScanForDevices()
Expand Down
2 changes: 1 addition & 1 deletion ShimmerBLE/ShimmerBLEAPI/Devices/VerisenseBLEDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ public async Task<bool> Connect(bool initialize, DeviceByteArraySettings configu
}
opConfig = UpdateDefaultDeviceConfigBytes(deviceOpConfig, configuration.GetOperationalConfigurationBytes());
}

var wopcresult = await ExecuteRequest(RequestType.WriteOperationalConfig, opConfig);
if (wopcresult == null)
{
Expand Down
2 changes: 1 addition & 1 deletion ShimmerBLE/ShimmerBLEAPI/Devices/VerisenseBLEDeviceIOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public VerisenseBLEDeviceIOS(string id, string name) : base(id, name)
public async Task<bool> PairDeviceAsync()
{
var result = await Connect(false);

/*
InitializeRadio();
BLERadio.Asm_uuid = Asm_uuid;
Expand Down