BT:LE OnCharacteristicChanged not called after SetCharacteristicNotification.

I am working with bluetooth in my android application,

I have discovered my device, connected and started discovering services. I am attempting to receive notifications from characteristics but am having no joy. I know the device is sending as i have similar cod working on my iOS app with the same bluetooth hardware. this is on my OnServiceDiscovered code

public override void OnServicesDiscovered (BluetoothGatt gatt, GattStatus status)
{
foreach (var service in gatt.Services) {
foreach (var characteristic in service.Characteristics.ToList()) {
var response = gatt.SetCharacteristicNotification (characteristic, true);
}

            }
        }


I am hitting the loop for several characteristics and services but i never get a callback to the following method

public override void OnCharacteristicChanged (BluetoothGatt gatt, BluetoothGattCharacteristic characteristic)
{
var id = characteristic.Uuid.ToString ();
}

Am i missing something? I essentially want to subscribe to all services and attributes and receive notifications..

Answers

  • oxoocoffeeoxoocoffee USMember

    Have you ever figured out this? I have same issue now :)

  • "Have you ever figured out this? I have same issue now :)"

    Same Here Do you have any solutions?

  • shahilceshahilce Member

    Hello Guys,

    Did you guys get any solution, I am not able to move forward. please help me if you guys get any solution. plz plz plz.

Sign In or Register to comment.