I'm getting the following error:
Exception thrown: 'System.ObjectDisposedException' in System.Private.CoreLib.ni.dll ErrorThe object has been closed. (Exception from HRESULT: 0x80000013)
for the code snippet posted below:
var writer = new DataWriter();
writer.WriteBytes(packet_command);
GattWriteResult write_result = await PacketCharacteristic.WriteValueWithResultAsync(writer.DetachBuffer());
if (write_result.Status == GattCommunicationStatus.Success)
{
Debug.WriteLine("PACKETS SENT TO DEVICE = " + BitConverter.ToString(packet_command));
}
else
{
Debug.WriteLine("NOT WRITING TO DEVICE");
}
User contributions licensed under CC BY-SA 3.0