Giter Site home page Giter Site logo

Comments (8)

aritchie avatar aritchie commented on July 18, 2024 1

This is working fine for me using iOS nrf connect to android shiny gatt server running in the sample app. Was there an exception? Anything in the output window.

from shiny.

aritchie avatar aritchie commented on July 18, 2024

Please file a reproducible case where possible. This is still in beta, so I need help, not just issues. The GATT server is not completed fully yet obviously.

from shiny.

ThumbGen avatar ThumbGen commented on July 18, 2024

The best case possible is your own excellent Samples project:

In Sample.BlePeripherals.MainViewModel, there's

                            this.notifications = sb.AddCharacteristic
                            (
                                NotifyCharacteristicUuid,
                                cb => cb.SetNotification(cs =>
                                {
                                    var subs = cs.Characteristic.SubscribedCentrals.Count;

                                    var @event = cs.IsSubscribing ? "Subscribed" : "Unsubcribed";
                                    this.Write($"Device {cs.Peripheral.Uuid} {@event}");
                                    this.Write($"Charcteristic Subcribers: {subs}");

                                    if (subs == 0)
                                        this.StopTimer();
                                    else
                                        this.StartTimer();
                                })
                            );

Using the "Bluetooth LE Explorer" app from Windows Store I've managed to list the characteristic, it is correctly displayed as "notifiable", but attempting to subscribe to it fails. The code inside the "SetNotification" subscription handler is never called.

from shiny.

fryette avatar fryette commented on July 18, 2024

I also experienced this issue, but in my case it was incorrect configuration for device which advertise characteristic. Check is it everything OK with nrfConnect application(check it on iOS and Android store), and if even nrfConnect fail -something wrong with your BLE configuration

from shiny.

ThumbGen avatar ThumbGen commented on July 18, 2024

I have just tried the ACR Bluetooth LE app and the problem exists there too (other apps like BLE Sim work correctly).

Reading https://stackoverflow.com/questions/17910322/android-ble-api-gatt-notification-not-received
I've noticed this sentence:

"All of the writeGattDescriptors must come first and complete before you issue any readCharacteristic calls."

No idea, I thought this might help...

from shiny.

aritchie avatar aritchie commented on July 18, 2024

@ThumbGen Did you try anything from the link you provided?

from shiny.

ThumbGen avatar ThumbGen commented on July 18, 2024

Sorry for the delayed reply, indeed it was a problem on my side.
I had to add the CCCD flag with notifications on the subscriber side; now the notifications are working and are absolutely awesome!

Thank you!

from shiny.

lock avatar lock commented on July 18, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from shiny.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.