[DllImport(Libraries.Bluetooth, EntryPoint = "bt_gatt_server_send_response")]
internal static extern int BtGattServerSendResponse(int requestId, int requestType, int offset, int status, byte[] value, int valueLen);
- [DllImport(Libraries.Bluetooth, EntryPoint = "bt_gatt_server_notify")]
- internal static extern int BtGattServerNotify(BluetoothGattAttributeHandle characteristicHandle, bool sendIndication, BtGattServerNotificationSentCallback callback, string clientAddress, IntPtr userData);
+ [DllImport(Libraries.Bluetooth, EntryPoint = "bt_gatt_server_notify_characteristic_changed_value")]
+ internal static extern int BtGattServerNotify(BluetoothGattAttributeHandle characteristicHandle, BtGattServerNotificationSentCallback callback, string clientAddress, IntPtr userData);
}
}
internal void SendNotification(BluetoothGattCharacteristic characteristic, string clientAddress)
{
- int err = Interop.Bluetooth.BtGattServerNotify(characteristic.GetHandle(), false, null, clientAddress, IntPtr.Zero);
+ int err = Interop.Bluetooth.BtGattServerNotify(characteristic.GetHandle(), null, clientAddress, IntPtr.Zero);
GattUtil.ThrowForError(err, string.Format("Failed to send value changed notification for characteristic uuid {0}", characteristic.Uuid));
}
}
};
- int err = Interop.Bluetooth.BtGattServerNotify(characteristic.GetHandle(), true, cb, clientAddress, IntPtr.Zero);
+ int err = Interop.Bluetooth.BtGattServerNotify(characteristic.GetHandle(), cb, clientAddress, IntPtr.Zero);
GattUtil.ThrowForError(err, string.Format("Failed to send value changed indication for characteristic uuid {0}", characteristic.Uuid));
return tcs.Task;