Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribe to GATT Characteristic Notifications not found #23

Open
esleybonomo opened this issue Jul 28, 2022 · 0 comments
Open

Subscribe to GATT Characteristic Notifications not found #23

esleybonomo opened this issue Jul 28, 2022 · 0 comments

Comments

@esleybonomo
Copy link

esleybonomo commented Jul 28, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant