Skip to content

Subscribe to GATT Characteristic Notifications not found #23

Description

@esleybonomo

Hello guys,

I need make a communication with a fat scale equipment in .Net core, so i need followings:

  • Write in one characterisct with person data (I beleave that its ok for me)
  • And whatch a characterisc with notify.

So, I can't get the notify value. I looked for samples, but I didn't find it.
I beleave that I'm doing anything wrong in code.

Look it:

          private async Task GetNotificationBodyFatScaleAsync()
          {
              var characteristic = await LoadCharacteristic(CHARACTERISTIC_MEASURE);
              characteristic.Value += BodyFatScaleDataReceivedAsync;
          }

        private async Task BodyFatScaleDataReceivedAsync(GattCharacteristic sender, GattCharacteristicValueEventArgs eventArgs)
        {
            try
            {
                Console.Out.WriteLine($"Received event from fat scale {eventArgs.Value}");
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex);
            }
        }

I'm following by this one https://github.com/hashtagchris/DotNet-BlueZ#subscribe-to-gatt-characteristic-notifications

Could you help me? Could you send me an example? Or are there any error in lib?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions