I'm trying to send a notification from a Tizen watch Wearable App (peripheral device as server) to an Android Smartphone App (central device as client). But I got an error when sending the notification from the wearable App.
In tizen Wearable App (using .net API) I send the notification like this :
string remoteDeviceAddress = "10:C7:53:50:C4:E5";
server.SendNotification(charc, remoteDeviceAddress);
Which raise the error below :
11-25 10:46:05.969 Error 8874 8874 CAPI_NETWORK_BLUETOOTH bluetooth-gatt.c: bt_gatt_server_notify_characteristic_changed_value(2964) > [bt_gatt_server_notify_characteristic_changed_value] INVALID_PARAMETER(0callback=NULL)
11-25 17:20:18.225 Error 15042 15042 Tizen.Network.Bluetooth BluetoothGattImpl.cs: SendNotification(113) > Failed to send value changed notification for characteristic uuid 00000002-1000-2000-3000-111122223333, err: InvalidParameter
In Android App side, I subscribe to notifications as below :
mBluetoothGatt.setCharacteristicNotification(characteristic, true);
BluetoothGattDescriptor descriptor = characteristic.getDescriptor(
UUID.fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
mBluetoothGatt.writeDescriptor(descriptor);
I don't understand why this error is raised. I checked that :
- the Android client device is connected to the BLE watch device.
- the Gatt service exposed by the Gatt server App is find by the client App.
- the remote device bluetooth address of the watch device is exactly that is display by Android in bluetooth settings.
The error seems to mean that the .net API call the native API function bt_gatt_server_notify_characteristic_changed_value() which expect a callback but the .net API method SendNotification() does not require a such callback in its specifications as here API specifications
Does anyone has an idea why the error above is raised ?
Thanks in advance !