Hello
I am using the plugin bluetoothle from Allan Ritchie.
At first I search for my BLE-Device, connect to them, check my services and characteristics.
But when I try to send some data, my BLE-Device got nothing.
Here ist my code:
`
public static void WriteDataToBle(IGattCharacteristic c, byte[] value)
{
System.Diagnostics.Debug.WriteLine($"**** Writing to Ble: {value[0]:X}{value[1]:X}");
if (c.CanWriteWithoutResponse())
{
System.Diagnostics.Debug.WriteLine("**** Writing to Ble CanWriteWithoutResponse");
c.WriteWithoutResponse(value);
}
else
{
if (c.CanWriteWithResponse())
{
System.Diagnostics.Debug.WriteLine("**** Writing to Ble CanWriteWithResponse");
c.Write(value);
}
else
{
if (c.CanWrite())
{
System.Diagnostics.Debug.WriteLine("**** Writing to Ble CanWrite");
c.Write(value);
}
else
{
System.Diagnostics.Debug.WriteLine("**** Writing to Ble ????");
}
}
}
}
}
}
other function:
byte[] data = new byte[2];
data[0] = Convert.ToByte(0x62);
data[1] = Convert.ToByte(0x42);
WriteDataToBle(Helper.TheCharacteristicReceived, data);
`
Do you have any Idea what is missing??